I have a custom jira type called Objective that has two custom fields:
I'm new to the jira admin side of the house and have been investigating ways to enforce that Current Value is less than the Target Value. I've tried automation setups, smart fields, etc. and without using ScriptRunner (Groovy). I haven't had luck getting this complete. What suggestions do you have to address this?
Hi @Kurt Huhner -- Welcome to the Atlassian Community!
There is no way to compare two fields using built-in JQL searches, although marketplace apps which extend the features of JQL may help.
And, with built-in features, the values of one custom field cannot be limited based upon the values in another field during add / edit of a work item.
If you have tried doing this type of comparison with an automation rule, perhaps if you provide more context the community can offer better suggestions. For that, please post:
Kind regards,
Bill
Bill,
Thanks for the intro and suggetions!
I was able to do this check in Automation for a NEW Ticket creation. I couldn't get it done on Amendments.
I think it's doable in ScriptRunner (via Groovy) but I want to exhaust all other options first as I want to avoid coding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For existing work items, you could try a rule triggered on a change to either custom field...or a Scheduled trigger rule with JQL testing that both fields are not empty. Then the rule conditions could check if the values meet / do not meet your criteria.
The Scheduled trigger approach could help identify items already existing without any data changes...although it will be limited to checking at most 100 items due to service limits.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
I have got what I believed was the right syntax for your suggested approach, but the rule doesn't stop "invalid" values. Can you review this and see if I'm missing something silly?
I tested and entered 5 for Current Value and 2 for Target Value which should have caused a rejection, but the jira was created.
Rule Trigger:
Condition:
Flow:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kurt Huhner
First thing: for the rule you show, that will always try to transition the work item back to the same status it is currently in (i.e., a looping transition). Is that what you wanted?
Next, what are the types of those fields: number, select-option, etc.?
Next, I personally recommend never using the new-ish feature to add conditions directly to triggers.
Finally, after any changes and re-testing, please post images of the updated complete rule and the audit log details showing a rule execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.