I already create a custom field, then I went to my Worflow and into the transaction in which the issue pass from status "Done" to "Reopen" I want that the Custom Field increase the value, in this way I can have a counter for ReOpen Issues.
The problem is that I don't now the function that I can use to set the current value of the field and then increase it by one.
Do you know if there is a function that can do that? I mean establish a PostFunction into the transaction and establish the value to the Custom Field like "currentValue() + 1"
This is possible through a ScriptRunner post-function written in Groovy.
Assuming the name of your custom field is "Reopen Count", you can use something similar to this:
import com.atlassian.jira.component.ComponentAccessor def customFieldManager = ComponentAccessor.getCustomFieldManager() def reopenCountField = customFieldManager.getCustomFieldObjectByName("Reopen Count") def reopenCountVal = issue.getCustomFieldValue(reopenCountField) if (reopenCountVal != null) { reopenCountVal += 1 } else { reopenCountVal = 1 as double } issue.setCustomFieldValue(reopenCountField, reopenCountVal)
A few things to keep in mind:
Source:
If your on cloud here is a free plugin:
https://marketplace.atlassian.com/plugins/reopening-counter/cloud/overview
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does this add-on work ?
I've tried but it doesn't seem to count it.
Anyone who tried it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I figured it out.. it counts status change from "DONE" to "In Progress" or "To Do".
In my workflow, Reopened status("To Do") can be changed from "In Progress" or "Done", and that was why it didn't work for me.. because it does NOT count "In Progress" to "To Do"
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.