Forums

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

Smart Values

Osvaldo EJ May 25, 2022

Hi there, 

 

I want to carry out an automation of a field. What I want is that everytime that a field value changes, the other field also changes. However, I'm new to JIRA and I know little about smart values. I've tried to automate it by asking JIRA to edit an issue field whenever another field changes its value. 

 

However, I do not know where shall I introduce the code, the small and thin bar aboeve, or beneath "More options". Is there any difference between the two?

 

Just in case it's useful, what I was doing is to introduce the following:

 

{
{{#=}}{{issue.Worked till Completion}} + 5 {{/}}
}

 

The error I was getting before was something with JSON, that I've read that are Jira Functions...

 

EXTRA: Is there an atalassian course on this I can have a look at?

 

Thanks in advance.

2 answers

2 accepted

0 votes
Answer accepted
Osvaldo EJ June 1, 2022

Hi John

 

What I want to do is to sum up a set of fields into the value of another field.

 

Which is the reason why I created the following formula:

 

{{#=}}{{issue.Worked till Completionfield}} + {{issue.All Relevant info attached}} + {{issue.If RFI, relevant platform/log updated accordingly}} + {{issue.Analyst understood & Clearly outlined}} + {{issue.Conclusion clear & plausible}} + {{issue.Understood the economic rationale for the transactions}} + {{issue.Addressed all relevant risks}} + {{issue.Analyst addressed material red flags }} + {{issue.If SAR, submitted to the nominated officer}} {{/}}

 

as far as I have induced:

{{#=}} is for opening the code

{{/}} is for closing

and what I have between {{}} is the name of the field.

 

This is what I inputed in "Automation" (pic 1)

Capture.PNG Capture1.PNG

However, I got the following error (pic 2):

 

The truth is that I do not know whether I'm working with smart values, or JSONs... I do not know either if in more options i should write something...

Thank you in advance.

0 votes
Answer accepted
John Funk
Community Champion
May 25, 2022

Hi Osvaldo - Welcome to the Atlassian Community!

Can you post screenshots of both your rule and the error messages you get?

John Funk
Community Champion
June 2, 2022

What are the actually field names of the fields being summed up? 

Osvaldo EJ June 3, 2022

What follows "issue" --> e.g.: {{issue.All Relevant info attached}}     In this case it would be "All Relevant info attached" the name of the field.

John Funk
Community Champion
June 3, 2022

I see "Worked till Completionfield" in your formula. It should not have the word field in it if that is not the action name of the field. I suspect that should just be: 

[[issue.Worked till Completion}}

Osvaldo EJ June 3, 2022

All working now, than you John!!

Like • John Funk likes this
John Funk
Community Champion
June 3, 2022

Great!

John Funk
Community Champion
June 3, 2022

Can you click on the Accept Answer button above to close this one out? Thanks!

Osvaldo EJ June 8, 2022

May I ask you something else? Or shall I open another thread? (I opted for the latter since it's kinda the same code).

 

So I've changed the name of the fields to exactly as displayed in the formula -->

{{#=}}{{issue.Administrative Alert worked till completion}} + {{issue.Administrative All relevant info been attached}} + {{issue.Administrative If RFI relevant platform or log updated accordingly}} + {{issue.Administrative Analyst understood & clearly outlined}} + {{issue.Procedural Conclusion clear & plausible}} + {{issue.Procedural Analyst understood economic rationale for the transactions}} + {{issue.Procedural Analyst addressed all relevant risks}} + {{issue.Regulatory Analyst addressed material red flags}} + {{issue.Regulatory If SAR Analyst submitted to the nominated officer}} {{/}}}}

 

However, I get this error now:

ould not convert the field value to a number. Please ensure the value is a number, math expression or smart-value that can be converted into a number.
Total Score: 1}}
No fields or field values to edit for issues (could be due to some field values not existing in a given project):

What's the matter with the automation? Before it worked perfectly...

 

Thank you in advance

John Funk
Community Champion
June 8, 2022

So it was working and all you did was change the names of the fields? How did you change the names? And where? 

Osvaldo EJ June 8, 2022

It was working, then I just changed the name of the fields in Settings> Issues >> Custom Field.... 

 

And then changed the formula (for the one above), as well as the name of the field triggering the change of value to the ones i set in settings. And then I got that error...

John Funk
Community Champion
June 8, 2022

You might want to change over to {{issue.customfield_16748}} instead of the name then. Where 16748 is the id of each custom field. That way you can change the name of the field and it should not give you any problems moving forward. 

Osvaldo EJ June 8, 2022

That's a real titbit !!! 

 

Thank you so much. However... from where can I get that id of the field? And if you do not mind, I'll ask you something else... Is there any jira manual or something like that? I'd love to learn more, but the posts about JSON and Smart Values (whose difference I do not get well, by the way), are not insightful enough I'd say (no offense),

 

Thank you very much!

Like • John Funk likes this
John Funk
Community Champion
June 8, 2022

Just navigate to the field like you did to change the name. Then check the URL for the field. You will see it there.  :-)

You use Smart Values in the fields for updates. And JSON in the Advanced section. 

Osvaldo EJ June 8, 2022

Thank you very much!!

Like • John Funk likes this
John Funk
Community Champion
June 8, 2022

You are very welcome!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events