I have a post function on create to copy the value from "Hiring Manager" (a single user picker custom field), to the "Request Participants" field for JIRA service desk.
This post function works beautifully, as long as the hiring manager is not also the reporter of the issue, as reporters are automatically added as "Request Participants".
Since hiring managers tend to be reporters quite often, I wanted to make this a conditional execution, where this post-function on runs when a condition returns true. I have a similar condition on another workflow post-function working, however I cannot seem to get this one to work.
Without any kind of condition validator to tell me if the expression is returning true or false, I'm not sure what to do next.
I currently have the condition written as:
Can someone help point me to where my mistake is in my syntax?
I have been able to determine that part of my issue is due to the data not truly matching.
The custom field is a single user picker field, just like reporter. How can I get the outputs to match?
Ok, found some more info and updated my condition to
issue.get("customfield_15480").getName()!=issue.get("reporter") log.error("Conditional Execution" + issue.get("customfield_15480").getName() + issue.get("reporter"))
The log file now shows
ERROR jtillett 1028x3177582x4 iyq99u /secure/QuickCreateIssue.jspa [jmwe.plugins.functions.CopyValueFromOtherFieldPostFunction] Conditional Executionjtillettjtillett:3 2016-05-12 17:08:20,632 http-bio-8080-exec-14009 ERROR jtillett 1028x3177582x4 iyq99u /secure/QuickCreateIssue.jspa [jmwe.plugins.functions.CopyValueFromOtherFieldPostFunction] Unable to copy value from 'Hiring Manager' to 'Request participants' java.lang.NullPointerException
So if the log file says the output of either side of the != are both equal to jtillett only, and the post function is only supposed to fire if the condition is TRUE, and jtillett!=jtillett is a false statement, then why is it still trying to run with a false condition?
Hi there! Shannon from Statuspage here. 👋 With Cyber Monday quickly approaching, we're looking to hear from Atlassian customers – specifically from teams who touch incident response li...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs