Forums

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

Help adding a value to a field with Automation

Rodrigo Xavier
Contributor
July 14, 2023

Hi everyone how are you all.

I'm making an automation that runs whenever a new item is created.

It checks if the Components field has the values KPMG or GAD, so far so good.

After that, he must add a new value in the Components field and that's my problem, I'm not able to do that. It only gives me the option to edit the field. I need him to enter more value in that field. Is it possible to do that?

Jira.PNG

2 answers

2 accepted

2 votes
Answer accepted
John Funk
Community Champion
July 14, 2023

Hi Rodrigo,

Automation cannot force the user to enter a value. The rule itself can enter a value (i.e. update it) but can't force validation. 

Rodrigo Xavier
Contributor
July 15, 2023

Hi @John Funk  Thank you very much for your feedback. John what I need is to automatically add the value in the field. For example, if the field has the value KPMG, it will automatically insert the value Audit, so the field will remain KPMG, Audit.

What I've seen in automation is just "updating" the field, so it will always update the field value and not add another one. Would it be possible

Like # people like this
John Funk
Community Champion
July 17, 2023

Take a look at this previous post and see if that helps you. You are probably going to have to use the Advanced process. 

https://community.atlassian.com/t5/Jira-Software-questions/In-Jira-Automation-how-do-I-add-to-a-component-and-not-clear-the/qaq-p/2194124

Rodrigo Xavier
Contributor
July 17, 2023

Thank you my friend. I'll look into it and post info if I can.

Like John Funk likes this
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 8, 2024

For the sake of other users that might come across this, the edit issue action can either set the value to that field or copy from another related issue.  The problem here is that it cannot just add a value to that field.  However there is a way to achieve this. Using the More options at the bottom of an Edit Issue action to use an advanced json it is possible to do this.

In my example, I had a component with a name of xyz

Screenshot 2024-02-08 at 11.36.42 AM.png

You will need to make sure that you do not select the component field from the dropdown menu as you cannot set the same field via that menu and json in the same action.  The specific example json code used here was:

{
"update": {
"components": [
{
"add": {"name":"xyz"}
}
]
}
}

 I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events