Hello,
I am attempting to use a groovy expression as a condition on a transition post function to comment on an issue (JMWE addon).
The goal is to add a comment to an issue if either option A or B are the value for a specific field. I'm looking to see if this is possible instead of create an additional post function for option "B". The custom field is a single select drop-down.
Here is what I have so far, which works for one value:
return (issue.get("customfield_19100").find { it.getValue() == "A"} != null)
I tried a few different expressions, but none seem to work in that way.
Thanks!
For single-select custom fields, the test is different, as documented here: https://innovalog.atlassian.net/wiki/spaces/JMWE/pages/107413622/User+created+custom+fields#Usercreatedcustomfields-Radiobuttons/Single-selectlist
Try:
issue.get("customfield_19100") == "A" || issue.get("customfield_19100") == "B"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying something very similar with two post functions but I can't get them to work consistently.
Example One Time Cost = 0, Recurring Cost = 10100, goes to done, but should go to the next approval
Post Function 1 -
Post Function 2 -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's because the condition of post-function 1 returns true if One Time Cost = 0. Maybe you meant to write:
issue.get("One-Time Cost") <= 10000 && issue.get("Recurring Cost") <= 10000
which would make more sense as it would then be the opposite of the condition of post-function 2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Fischer That makes perfect sense now that you mention it. What we actual need is the highest of the two fields value to be used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.
Read the story
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.