Updating the issue status in a database
In this recipe, we will see how to update the status of an issue in the JIRA database.
Getting ready
Go through the previous recipe to understand the workflow-related tables in JIRA.
How to do it...
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 
issuestatusfield in thejiraissuetable 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_idcolumn in theos_currentsteptable with the step id linked to the status you used in the previous step.step_idcan 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...