Condition to check if user in custom field is also the reporter

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?

7 answers

1 accepted

1 vote
Accepted answer

Solved it! Below is the proper syntax in case any one else has any of these issues:


I have been able to determine that part of my issue is due to the data not truly matching. 

issue.get("reporter") returns


issue.get("customfield_15480") returns


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

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'

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?

This is not Script Runner, so I'll remove that plugin tag. 

My mistake, I thought all the groovy stuff came from the script runner plugin

Is there a way to bump this for help?

I would just advise you to put the correct plugin's tag on the question, because the developers don't trawl through every single question on the offchance it's about their plugin.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

256 views 6 0
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you