The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to use Jira Automation to remove a Component

Janene Pappas
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 Champions.
September 9, 2020

Our team has a default set of Components we add to every JSD issue when created. I'd like to write an automation that non-agent users can manually trigger to remove a specific Component. I am guessing I'll have to do this in a couple of steps:

1) Get the current set of Components on an issue

2) Set the Components to a modified set with the specific one removed.

I see the smart value for Components is simply fields.components, but I'm not clear on how to manipulated the set.

TIA!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Benoit
Contributor
November 14, 2023

Here is the easy way to do it:

In JSON format in a modify issue use this syntax:
{
"update": {
"components": [{
"remove": {"name": "Component_Name_To_Remove"}
}]
}
}

0 votes
Fahad Siddiqui
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 Champions.
September 9, 2020

Hi @Janene Pappas ,

please check the below link may be this will help to fix your issue.

https://support.atlassian.com/jira-service-desk-cloud/docs/when-if-and-then-statements/

Janene Pappas
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 Champions.
September 10, 2020

Hi Fahad, 

That link doesn't really help me. I already know how to use if-else branches but this doesn't get me how to remove a Component from an issue. 

Like • Rabbit Stoddard likes this
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events