Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update components manually through the database

Jonathan Kernan October 12, 2014

Is it possible to update components by directly accessing the JIRA database and running some SQL?

My problem is that I am updating all issues with new components and moving issues into different projects. If I do a bulk edit, I have to edit all issues that allow you to edit the change component field(Open,In progress, etc..).

If an issue is open is closed you have to reopen it, edit the change component field and close it with the previous fix resolution. This gets quite tedious when you consider the number of possible resolutions. You also have to track the reopened issues to make sure they don't become accidentally closed. If I could edit the components for an issue regardless of the status(i.e. not have to reopen issues), then a bulk edit would be perfect. 

I did some testing by adding a component to a dummy issue. In the components column in the jiraissues table, I expected the component id to be present but is null.  

Is it possible to add/remove components directly in this fashion?

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Jonathan Kernan October 13, 2014

I managed to overcome this by editing the workflow to allow editing on all issues regardless of their status.

This page provided me with the solution

https://confluence.atlassian.com/display/JIRA/Allow+editing+of+Closed+Issues 

Just need to remember to revert the workflow step property after the bulk edit.

 

 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 12, 2014

You're looking in the wrong place, components on issues are handled via the nodeassociation table (and if you add stuff to that, you need to think about the counter table as well)

However, the standard advice here is that you NEVER touch a JIRA database directly.

If you absolutely must do it with SQL, then you absolutely MUST do it in this order:

  • Stop JIRA
  • Take a full backup of the database
  • Restore it to test that it is valid
  • Make your edits
  • Restart JIRA
  • In most cases (if you've amended anything related to issues or versions), re-index the whole thing

It is critical that JIRA is not running when you do this.  I can't emphasise how much damage you can do with a running JIRA...

TAGS
AUG Leaders

Atlassian Community Events