Versions Compared

Key

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

Problem

After upgrading JIRA Misc Workflow Extensions to version 3.6.1 or JIRA Misc Custom Fields to version 1.6, scripts (in calculated custom fields or post-function execution conditions) that are using the following code will stop working:

...

This is due to a change in the JIRA API for accessing the Issue's Security Level. It now returns a Long (the Security Level ID) instead of a GenericValue.

Solution

You should modify the scripts that access the issue's security level through a call to issue.get("security"). You can either rely on the Security Level ID (a 5-digit numeric value), or use the IssueSecurityLevelManager to access the name of the Security Level:

...

Code Block
com.atlassian.jira.issue.security.IssueSecurityLevelManager islm = com.atlassian.jira.ComponentManager.getComponent(com.atlassian.jira.issue.security.IssueSecurityLevelManager.class);
 
if ("A Security Level Name".equals(islm.getIssueSecurityName(issue.get("security"))))
	[...]

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("custom-field","jmwe","calculated-custom-field","groovy","jmcf","beanshell") and type = "page" and space = "KB"
labels jmcf jmwe groovy custom-field calculated-custom-field BeanShell

...