When I look for features for this project there is no features list. In diffrerent team-managed project I can see roadmap, backlog, board,reports, etc. How can active features project settings. Could you help me?
Hello,
you can achieve your goal with the following code, that you need to add as a post-function.
I assume, that the field "Quote Status" can be changed during the transition.
import com.atlassian.jira.component.ComponentAccessor
import java.sql.Timestamp
import java.util.Date
// Manager
def cfm = ComponentAccessor.getCustomFieldManager()
def issueManager = ComponentAccessor.getIssueManager()
def issueBefTrans = issueManager.getIssueObject(issue.getKey())
if (issue.getCustomFieldValue(cfm.getCustomFieldObject("customfield_15007")) != issueBefTrans.getCustomFieldValue(cfm.getCustomFieldObject("customfield_15007"))) {
cf_quoteStatusUpdatedOn = cfm.getCustomFieldObject("customfield_15008")
cf_quoteStatusUpdatedOn.getCustomFieldType().updateValue(cf_quoteStatusUpdatedOn, issue, new Timestamp(new Date().getTime()))
}Don't forget to adjust the customfield IDs to your environment.
'Quote Status' has the ID 15007
and 'Quote Status Updated On' has the ID 15008 in my environment.
This post-function has to be executed first during your transition, because the variable 'issue' holds the current fields incl. the values in screen. Whereas the variable 'issueBefTrans' holds all values before the transition. But this is only true, if the script will be executed first before the actual transition will be performed.
I don't know what documentation you use, but these sources offer everything you need:
https://scriptrunner.adaptavist.com/latest/jira/quickstart.html
and the official API:
https://docs.atlassian.com/jira/7.3.1/ (Our current JIRA version is 7.3.1)
Here is the list to all API versions:
https://docs.atlassian.com/jira/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.