Hi,
I would like to cleanup the available components in a JIRA project. We used components for different situations/reasons, but now we have a clear view what components we would like to use. But, when I delete a component, I suppose that it is also removed from the issues?
My request, I would like to make a few components not visible anymore when I create a new issue, but they should still be linked to the older issues. How should I do this in Jira?
Greetings,
Dieter
Hi Dieter,
When you delete a component that has related issues, you get the choice whether to remove it from the issues or to swap:
delete-component.jpg
Unfortunately, JIRA doesn't offer a simple way to archive (i.e. prevent selection on create, but still keep on the older/existing issues).
This is the feature request, if you want to vote for it: https://jira.atlassian.com/browse/JRA-10507.
There are a couple of workarounds people have suggested:
There might be other suggestions, but I hope these are helpful.
Sam
First of all, I going to vote for the archive component feature.
I think that we are going for the renaming 'Z-Inactive MyCompnent' workaround.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a pretty longstanding request, I'm afraid. Seems unlikely Atlassian will improve this in the near future, but who knows!
Anyway, if my answer was helpful, please consider up-voting or accepting it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I am using python code for automatic removing components
from atlassian import Jira
from var import config
import logging
ATLASSIAN_USER = config.JIRA_LOGIN
ATLASSIAN_PASSWORD = config.JIRA_PASSWORD
logging.basicConfig(level=logging.ERROR)
server = Jira(
url=config.JIRA_URL,
username=ATLASSIAN_USER,
password=ATLASSIAN_PASSWORD)
def remove_from_project_unneccessary_component(project_key, remove):
components = server.get_project_components(project_key)
print("Prepare to remove components for {} project without any links to issue".format(project_key))
for component in components:
component_id = component.get('id')
issue_count = server.get_component_related_issues(component_id).get('issueCount')
if issue_count == 0:
if remove:
server.delete_component(component_id)
print("Review component {}".format(component.get('name')))
projects = server.get_all_projects(included_archived=True)
for project in projects:
project_key = project.get('key')
remove_from_project_unneccessary_component(project_key, remove=True)
Hope it helps
Cheers,
Gonchik TSymzhitov
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.
Hi,
Thank you for your quick response.
I would like to keep the components that now are linked to the current issues. But, I would like to filter the list of components when I add a new issue.
This way I keep the history of linked components linked to issue and for new issues I would like to have less components available to select.
Greetings,
Dieter
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.