Hi Community,
Please help me to implemnt this two scripts groovy
1) - On issue type 'Analyze', I would like to add a new date field 'Qualification date' which automatically indicates the first time that a request of type 'Analyze' is moved. The objective is to know when a request has been moved for the first time
2) - On the 'Anomaly' issue types, I would like to add a 'Date P1' date field which automatically indicates the first time that an issue type 'anomaly' has 'Priority = P1'.
NB: This date can be the date of creation of the issue.
Best regards.
1) what do you mean by "moved". Do you mean "Move issue" action?
2) I think you will have to use two scripts, one for "initial transition" to cover requirement that it can be set when creating issue.
2.1) Create issue action - I would add scripted postfunction with script similar to script which is marked as Accepted answer here https://community.atlassian.com/t5/Jira-Questions/Scripted-post-function-to-set-a-date-value-in-custom-field/qaq-p/368278
2.2) You have to cover "Edit issue" operation. I would use script runner listeners functionality (https://scriptrunner.adaptavist.com/6.4.0/jira/listeners.html), you have to write similar script but you have to add condition for project(if Anomaly issue type is used in only one project) and issuetype to not to run the whole script for every "Edit issue" operation.
Do you need to help with scripts or this "suggestion" is enough?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.