• Community
  • Products
  • Jira
  • Questions
  • How do I deactivate an existing component so it can not be used anymore but I do not want to delete it since the historic (its usage) must not be lost.

How do I deactivate an existing component so it can not be used anymore but I do not want to delete it since the historic (its usage) must not be lost.

 

2 answers

1 accepted

1 vote

Hi @René Blouin,

Unfortunately it's not possible to do that. If you delete a component, you have the option of either assigning all issues with that component to a different component, or deleting the component from those issues. Feel free to raise a suggestion in our JIRA instance to add this functionality.

I can think of one work around off the top of my head, you could maybe consider adding a custom field (such as a label field) that you could then add the original component detail to for historical tracking? You would need to bulk add the details to the issues that had the original component before deleting it, as the component will be removed from the issues on deletion. If you make sure the field isn't available on any screens, your users won't be able to add or delete from the field, but you can still run searches and queries on it. It's a manual workaround, and depending on your requirements it may not be worth it, but it is an option.

Thanks,

Warren

Hi, I wanted to make sure I was not missing it before using a workaround since what I am looking for is exactly the same thing arleady implement with the Custom field of type "Select List single choice" where there is a disable option, which only makes it invisible in the drop down list. I will raise the suggestion in your Jira instance. Thank you very much! René Blouin

Although this is already answered, I figured I'd share my solution also. 

Because for my use case I was only concerned with not using legacy components while creating new tickets, I used a script validator on the Create transition (using Script Runner) to prevent using any component that had "(L)" in its name:

import com.opensymphony.workflow.InvalidInputException
import org.apache.log4j.Category;
log.setLevel(org.apache.log4j.Level.DEBUG);
 
String error = "";
for (int i = 0; i < issue.componentObjects.size(); i++) {
 if (issue.componentObjects.getAt(i)?.getName().matches(/.*(\(L\)).*/)) {
 throw new InvalidInputException("components", error); } }

When I want to "archive" a component, I just add the "(L)" in the beginning of its name, e.g., (L) API

 

 

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,323 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot