ISSUE #5486 - Incorrect pin colour until you click into the new ticket #5492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #5486
Description
The order of ticket properties was affecting the conditional colour of pins.
Using
useWatch
was not enough as that relied on the "registered" fields. Calling "useForm.reset" was unregistering and reregistering the fields, and useWatch was not catching the value upon registrationTest cases
Setup
Create a template that includes pins with conditional (configurable) colour and make sure to have some of them rendered before the conditional property, and some after. A valid template, for instance, could include the following:
(If you already have it, you may use the template "Pins With color (custom property)". Otherwise, feel free to use the following template:
Next create 2 tickets (A and B) and set the pin condition value to something such that the conditional pins will display a colour which is not the default one (in the template provided above, the gray colour is the default one)
test cases