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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a Javascript implementation. Removes any options with "(Inactive)" (case-insensitive) in the title of the Component.
Place in the Component Description in the Field Configuration of your target project.
This works on Create/Edit screens, as the Description is displayed. But will not work on inline editing of Components.
<script>$('#components').children('option').filter(function() {return this.title.match(/\(inactive\)/i);}).remove();</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This script did not work for me,
Added inactive to component description and added the java script in the Description of the Field Configuration.
Version 7.13.3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aron, "(Inactive)" needs to be in the Component Name, not the description.
Also, Archiving Components is available in newer versions of Jira:
https://confluence.atlassian.com/adminjiraserver/archiving-a-component-968669976.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.