The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Need help with JMWE post function Condition

CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
May 21, 2024

for task workflow when status is in new and if attachment was not added when status is New it should add a comment that Please supply image and ticket should assign to hub exceptions user. i know we can do this through automation but we want to use workflow only here.

i have created a custom field called image attached with values Yes and No.

when image attached value is No then it should add comment to that ticket like "please add comment" and assign it to user. in post function i added comment on issue by jmwe and selected add comment only if below condition is true. in that i added condition like
{{ issue.fields.customfield_26597 == "No" }}

but its not adding comment. can you help?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
David Fischer
Community Champion
May 22, 2024

Hi @CHINNAMUTHEVISAI.SATYANARAYANASHARMA 

If the custom field is a Checkboxes type custom field, then the condition should be:

{{ issue.fields.customfield_26597 | find({value:"No"}) }}

If it's a Radio buttons or single-select field, use:

{{ issue.fields.customfield_26597.value == "No" }}
CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
May 22, 2024

Thanks. this is working as expected.

CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
May 22, 2024

is it possible to assign issue to some one in above case from workflow?

David Fischer
Community Champion
May 23, 2024

Sure, you can use the Assign Issue post function with the same conditional execution code

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events