Forums

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

If else in automation for jira advanced field editing JSON in Jira

prasad Biddika January 20, 2023

If I select Componet A1 "Reporter" filed need to set "Ram"

If I select Componet A2 "Reporter" filed need to set "Shyam"

If I select Componet A3 "Reporter" filed need to set "Srinu"

 

Please help in writing JSON for the above requirement

2 answers

1 vote
Ravi Sagar _Sparxsys_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

Hi @prasad Biddika 

JSON is a file format. You cannot add conditional logic in it. You have to manage these conditions in your automation.

Hope it helps.

Ravi

prasad Biddika January 21, 2023

Thanks for your response @Ravi Sagar _Sparxsys_ and @Bill Sheboy 

prasad Biddika January 22, 2023

thanks

prasad Biddika January 22, 2023

@Bill Sheboy and @Ravi Sagar _Sparxsys_ 

 

The above rule we created when issue is resolved in CE_SVT_DMS jira will clone in  5G CCDU Project its done

Our requirement is when any component is selected in CE_SVT_DMS the reporter field should set to any of the person for the cloned issue in 5G CCDU

 

Please suggest how can we achieve it

 

Thanks,

Prasad

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 25, 2023

Have you tried either using conditional logic to see the reporter when the issue is cloned, or to add an edit of the clone later to set the field (based on your conditions)?

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

Hi @prasad Biddika 

What have you tried thus far to solve this?  If you have a rule started, please post images of the complete rule and the audit log details.

A great deal of writing automation rules is about experimentation.  You try something based on your needs, the examples and documentation, and inspect/adapt toward the solution.

For your scenario, I recommend looking first at the advanced edit with JSON documentation to confirm the syntax, based on your field types: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/

And then review the conditional logic documentation to see which parts of the JSON to make dynamic: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

Finally, if things are still not working as you expect, try writing your JSON expression to the audit log to determine if your conditional logic works as you expect.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer