Forums

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

JSON Guide this is not working for me

NAREIN CM November 9, 2023

{
"fields": {
"Estimated Drafting Hours": "{{issue.Group of Job}} == 'A' ? 8.0 : {{issue.Group of Job}} == 'B' ? 5.0 : {{issue.Group of Job}} == 'C' ? 3.0 : {{issue.Group of Job}} == 'D' ? 1.5 : {{issue.Group of Job}} == 'E' ? 1.0 : 0",
"Estimated Checking Hours": "{{issue.Group of Job}} == 'A' ? 1.5 : {{issue.Group of Job}} == 'B' ? 1.0 : {{issue.Group of Job}} == 'C' ? 0.5 : {{issue.Group of Job}} == 'D' ? 0.25 : {{issue.Group of Job}} == 'E' ? 0.25 : 0",
"Actual Drafting Hours": 0,
"Actual Checking Hours": 0
}
}

1 answer

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.
November 9, 2023

Hi @NAREIN CM 

What is the context for using that JSON?  Is this in an automation for Jira rule?

If that is the case, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

If that expression is being used in an automation rule, I suspect it is a syntax the rule action cannot parse.  For example, you appear to be using conditional handling for setting the Estimated Drafting Hours and Estimated Checking Hours fields.  Instead, please consider using conditional rule handling for the smart values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events