Post function with multiple conditions Edited

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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

78 views 0 5
Read article

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