Post function with multiple conditions

Jimmy Liang April 18, 2017

Using the JIRA MISC Workflow extension, I want to do the following:

Set assignee to Joe Smith and set priority to P1 (Critcal) IF

1) the issue type is a bug issue type AND 2) if the reporter is Jane Smith

 

Current configuration --

I have two post functions (one to set the assignee and another to set the priority) with the following conditions:

Conditional exeuection checked

Line 1 {{ issue.fields.issuetype.name == "Bug" }}
Line 2{{ issue.fields.reporter.name == "jane.smith" }}

I tested the condition, and both yielded false , but the assignee and priority were set when a story issue type was created.  Is it possible to use multiple conditions?  If so, I'm guessing I set it up improperly.  Is there an easier way to do this?

Thanks.

1 answer

0 votes
John S July 3, 2017

if I understand your requirement correctly hopefully this works:

{{ "true" if ( issue.fields.issuetype.name == "Bug" and issue.fields.reporter.name == "jane.smith" ) else "false" }}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events