Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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 Leaders.
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

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 Leaders.
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 Leaders.
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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events