Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,766
Community Members
 
Community Events
165
Community Groups

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

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.PNGCapture1.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 M Funk Community Leader 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 M Funk Community Leader Jun 02, 2022

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

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 M Funk Community Leader Jun 03, 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}}

All working now, than you John!!

Like John M Funk likes this
John M Funk Community Leader Jun 03, 2022

Great!

John M Funk Community Leader Jun 03, 2022

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

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 M Funk Community Leader Jun 08, 2022

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

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 M Funk Community Leader Jun 08, 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. 

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 M Funk likes this
John M Funk Community Leader Jun 08, 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. 

Thank you very much!!

Like John M Funk likes this
John M Funk Community Leader Jun 08, 2022

You are very welcome!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,124 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you