Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Assets And Inventory plugin lets you integrate workflows and asset objects.

...

Context parameters for Groovy Scripts

Please see Sample Groovy Scripts for more examples.

Variable NameDescription
asset

Access AIP asset class instance. Only valid for Default Groovy Script and Attribute Groovey Script. See https://confluence.snapbytes.com/x/-YZ2AQ.

issue

Access current issue. Instance of com.atlassian.jira.issue.Issue. see https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/issue/Issue.html

originalIssue

Access original issue before the transition. Instance of com.atlassian.jira.issue.Issue. see https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/issue/Issue.html

ComponentAccessorAccess JIRA componenets. See https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/component/ComponentAccessor.html
customFieldManager

Access JIRA Custom Field Manager class. See https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/issue/CustomFieldManager.html

Example:

def issueManager = ComponentAccessor.getIssueManager() def customFieldManager = ComponentAccessor.getCustomFieldManager() def cField = customFieldManager.getCustomFieldObject("customfield_id") def cFieldValue = issue.getCustomFieldValue(cField)   issue.setSummary(cFieldValue + " " + issue.summary);

loggedInUser

ApplicationUser instance for current logged in user. See https://docs.atlassian.com/software/jira/docs/api/7.6.1/index.html?com/atlassian/jira/user/ApplicationUser.html

Example:

 loggedInUser == issue.getAssignee()

...