Looking to use JSU to lookup the value of a custom field (value = Client) and then require another field (value = Cost) to be greater than 0 before transitioning to complete.
If the custom field is not true (value = Client), then the issue can be transitioned to complete without restrictions.
I'm able to set a validator for Fields Required on one or the other, but not sure how to do both. It's almost like I want a pre-condition like they have in the post functions option.
Any thoughts on this? Should I use script runner instead?
Hello Justin,
If I understand correctly you have two fields Client and Custome filed (I'll call it field_A)
And Client must be greater than 0, Client>0, and filed_A != Client
I see you wrote you use JSU, you can use a condition Value Field (JSU) to check the value of cost and a value of field_A.
Add conditions on your workflow transition, you can have multiple conditions.
Hi Red, thanks for responding.
When I try to use conditions it only allows transitions to work items meets both of those requirements -- which is good, but if for example the field that has Client has something else in it, then it cannot transition either.
Let me try to reiterate my requirements a bit clearer:
Issue Type of Bug
Field A is a dropdown
Field B is a value
Scenario:
If Field A = Client AND Field B = value greater than 0, user can transition to complete.
If Field A != Client, user can transition to complete.
If Field A = Client and Field B != Value greater than 0, do not allow transition, but rather display a message indicating it needs a value.
Does that help clarify a bit?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Justin,
Thanks for the explanation.
Comparing fields part i think this could help, add a postfunction insted of condition Precondition: Value Field (JSU) you can add multiple preconditions, when creating preconditions you'll se Combine with Result of previous Preconditions: it has options Combine with Result of previous Preconditions and options are:
Discard the result of previous precondition
AND
OR
the part about displaying a message indicating it needs a value, ill look into it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the follow up, really appreciate your assistance.
I've removed my conditions and moved everything to a postfunction as you suggest, but it doesn't seem to be adhering to any of my rules. Here is a screenshot:
Is there a specific order this needs to be set to function properly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.