Hi All,
I need to capture the clsoing date (or last closing date) for each issue in the past too!
Can you please help me to how can we do that in scripted field? I mean: have you got a code?
I did it with post function but it fills the custom field with the closing occured now and he future.
Thanks in advance!
Rumi
changeHistoryManager.getChangeItemsForField(issue,
"status"
).reverse().
find
{it.toString ==
"Closed"
}?.getCreated()
Hi Jamie,
I find a script but it results the first closing date.
In case of the issue was reopened and then closed again - it's not good. I need the date of the last closing transition.
I am not very pro in scripting, can you please help how to modify the code?
import com.atlassian.jira.ComponentManager def componentManager = ComponentManager.getInstance() def changeHistoryManager = componentManager.getChangeHistoryManager() changeHistoryManager.getChangeItemsForField(issue, "status").find {it.toString == "Closed"}?.getCreated()
Thanks in advance,
Rumi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You just need to whip through the changelog and get the date for the last transition where it entered the Closed state. There are quite a few examples about that are very close to that.
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.