Hi,
During an active sprint, if an issue description is edited then I would like to increment a counter, to know how many times description has been updated.
For this, I wrote the below piece of code to verify, if the issue is in active sprint or not. If the particular issue is in active sprint then the script should be looking for any updates to the 'description field' and update the counter.
Any ideas on how to validate if the description field is edited (updated), during an active sprint?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.greenhopper.service.sprint.Sprint
def description = issue.getDescription();
def sprintstatus =
(issue.getCustomFieldValue(
ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Sprint")
) as List).any {
(it as Sprint).active
}
if(sprintstatus == true) //if sprint is active
{
//check if the 'description' field of the issue is edited and if edited then increment the counter for every edit
}