• 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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

121 views 4 9
Read article

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