• 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

This widget could not be displayed.

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

281 views 5 0
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