Forums

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

Automation: "Edit issue" to add values to multi-select fields not working

Daniella Eguiguren November 10, 2023

tl;dr: Advice needed on why I don't have the ability to add values to multi-select fields rather than overwrite them when using Jira automation.

Background

I have created a new rule that when an issue is created inside an epic, the issue should check if the epic has been tagged with a specific component (ex: Engineering). If that's true, then the child issue should also be tagged with that component. That works well, but based on the standard functionality of automation, it overwrites the new issue's components completely, not adding to them.

For example: The epic was just associated with one component, "engineering." When I created the new issue I tagged it as "design," but didn't add "engineering" to the components field to test the automation. The automation then overwrote the components field to just say "engineering," rather than "design, engineering." That part, according to Atlassian documentation, is working as intended because I didn't ask it to add the component, so it overwrote it.

Issue

I want the epic's component to be added to the issue's component list, not overwrite any other components the issue was already tagged with upon creation. The documentation has steps for this, called "adding values to multi-select fields." It should work in theory, but I don't have the ability to do what the instructions say.

Instead, in my version of Jira, if I use the "copy from issue" function (called "Add components from current issue"), I lose the ability to add anything else to the field. So I can't add a second component like the instructions state I should be able to. Screenshot attached of what I see.

Screenshot 2023-11-10 at 12.15.56 PM.png

Theory

I had an inkling it had to do with how our Components field itself was set-up, but it's already set up to be a multi-select, here is how a ticket I have is tagged:

Screenshot 2023-11-10 at 12.21.01 PM.png

Any thoughts on why I can't do what the documentation noted?

 

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 10, 2023

Hi @Daniella Eguiguren -- Welcome to the Atlassian Community!

Context is important for automation rule conditions and actions.  And without seeing your entire rule, I hypothesize you have a branching error that is causing this. 

Please post an image of your complete automation rule, images of any relevant actions / conditions / branches, and an image of the audit log details showing the rule execution.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

A rule structure to do what you ask could be:

  • trigger: issue created
  • action: re-fetch issue
    • When using the Issue Created trigger, it is important to follow that with the re-fetch action.  The reason is this specific trigger can fire so quickly that the data is not yet available to the rule, leading to unexpected behaviors and errors.
  • condition: check if the issue has a parent
  • condition: check if the parent has the component you want to add
  • action: edit issue, to add the components from the parent
    • use the ... menu to the right of the field to select COPY
    • select the field to change to "Add Components from Parent issue"

 

Kind regards,
Bill

Daniella Eguiguren November 10, 2023

Hi Bill,

Appreciate your response. Attaching my flow JIC.
Screenshot 2023-11-10 at 1.14.39 PM.png

I see what you are suggesting in your bullets, but that's mainly what I have. Except for the re-fetch action. Do you think that would cause my automation UI to change? 

Just to phrase my question a different way: I am not saying my automation rule is not working, I am saying the Jira Automation UI I am seeing that allows me to configure rules doesn't match what the documentation screenshots are showing.

Supposedly after you select "add components from parents issue" as you and I write above, you should be able to add other components manually, as in: type them in as a list. And in my browser, I don't have the box at all. I can type in either manual component names OR "add components from parents issue." Not both.

Do you see the option on your end to add manual component names like the documentation shows here?

Screenshot 2023-11-10 at 1.19.13 PM.png

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 10, 2023

Thanks for that information.  If I miss following up on any of your questions, please let me know...

For the UI differences, I wonder if that is both the browser / operating system differences, and changes to automation over time.  The documentation does not always keep up with the product improvements :^)

I recommend adding the re-fetch to prevent / reduce the changes of any unexpected rule behavior with that Issue Created trigger.

When changing the Components field with the built-in editor, you are correct that you may either set the values (with add / remove) or copy them from some other issue...but not both at once. A work-around if you want to do both is to edit using advanced edit with JSON, as described here: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Components

You can directly enter the Components when using the SET option; that will then show the drop-down list as in your image from the documentation.

Like Daniella Eguiguren likes this
Daniella Eguiguren November 10, 2023

Thanks, Bill!

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 10, 2023

To confirm, is your rule working as expected or is there still a problem with it?

Suggest an answer

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

Atlassian Community Events