Is there any SQL queries to update Closed tickets ? i want to update only the priority.
I strongle reccomend DO NOT make any updates via SQL. reasons:
Instead SQL try this code example (you could run it via SCriptRunner)
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.MutableIssue MutableIssue issue = ComponentAccessor.getIssueManager().getIssueObject("ZV2-1"); issue.setPriorityId("1"); //1 is for blocking priority ComponentAccessor.getIssueManager().updateIssue(ComponentAccessor.getJiraAuthenticationContext().getUser().getDirectoryUser(), issue, EventDispatchOption.ISSUE_UPDATED, false);
Is there any specific reasony you want to updated tickets in the database?
Don't you want to enabled editing closed issues? This way you can edit the issues normally.
Or you can add a transition to the Closed status. The transition could have a screen with the Priority field on it or you can add a post function to this transition to set the priority.
How do we enable editing closed tickets ? is there any other way we can enable globally without modifying the workflows ?
I don't think there is. You must remove the step property from the workflow to enable editing of the Closed issues.
Further to the answers from @Tibor Hegyi [META-INF] and Vasiliy Zverev I would suggest you amend the workflow to allow you to edit closed issues (you can and probably should revert this once you have made your change). Then use the bulk edit feature to select the issues you want to update the priority on and make that change. Again this may require you to adjust your permission settings.
You also MUST stop JIRA if you run SQL, back up the database before hand, and in most cases, re-index from scratch. What you mistakenly think is a "simple" SQL update can cost you hours of down-time.
Do this with the JIRA Automation Plugin. You can intercept issue updated events, and update the priority field with zero programming.
As a general rule of thumb, never update the database if there's another way to solve your problem. Updating the database directly will lead to a plethora of problems (out of date caches, broken indexes, etc.) unless you know what you are doing.
It looks like you're new here. Sign in or register to get started.