Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with JMWE conditional set field post function

Lori Milam
Contributor
December 18, 2023

I am trying to implement a post function that will set the value of a custom select list field if the resolution is not set to 1 of 3 values.

 

So far I have selected the custom field I want to modify: { value: "N/A" }

I have the conditional execution condition as 
{{ (not issue.resolution.name == "Done") and (not issue.resolution.name == "Fixed") and (not issue.resolution.name == "Requirements Change") }}

But testing them within the creation of the post function against a test ticket that I know the resolution is set to Done, it returns false.

Can anyone help me figure out what I'm doing wrong on this?

1 answer

0 votes
Sayed Bares [ServiceRocket]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2023

@Lori Milam isn't that the expected behavior? you wanted to set the values if the resolution is NOT set to Done, Fixed, and Requirements Change and your issue's resolution is set to Done. Hence, your issue doesn't meet the condition and the post-function will not run. The post-function should run for any other resolutions.

Lori Milam
Contributor
December 19, 2023

Oh my gosh, you're right. I meant to put my issue is set to Duplicate not Done. And it returns false. This should return true I believe. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events