In this recipe, we will see how to update the status of an issue in the JIRA database.
The following are the steps to update the status of an issue in JIRA database:
Stop the JIRA server.
Connect to the JIRA database.
Update the
issuestatus
field in thejiraissue
table with the status you need:UPDATE jiraissue SET issuestatus = (SELECT id FROM issuestatus WHERE pname = 'Done') WHERE id = 10000;
Here, 10000 is the id of the issue to be updated.
Modify the
step_id
column in theos_currentstep
table with the step id linked to the status you used in the previous step.step_id
can be found in the workflow XML alongside the step name within brackets, as shown in the following screenshot:As you can see, the status DONE in the above workflow is linked to the Done step with an ID value 3. Now, the
step_id
column can be updated as follows...