How can I use the (great) https://marketplace.atlassian.com/plugins/com.atlassian.plugin.automation.jira-automation-plugin to set Issue Security Level ?
I have tried:
level=OnlySeeOwn
level=10000
$issue.level=OnlySeeOwn
$issue.level=10000
the latter 2 as "expanded".
But the SL is not changed
Community moderators have prevented the ability to post new answers.
Thanks for the answer. Mis-read this at first, and then re-read to realize we had to use security instead of level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cant add a screenshot here for some reason, but I run a groovy script (via the apdatavist Scriptrunner - soon to be paid for... :-( ) {code}npn@docs02:/pack/jira-groovy$ cat /pack/jira-groovy/set-security-level-from-parent.groovy import com.atlassian.jira.issue.Issue import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.util.ImportUtils import com.atlassian.jira.issue.index.IssueIndexManager import com.atlassian.jira.issue.security.IssueSecurityLevelManager import com.atlassian.jira.issue.security.IssueSecuritySchemeManager String issuekey = issue.key System.out.println("script=set-security-level-from-parent.groovy action=StartScript key=" + issuekey); Issue parentissue = issue.getParentObject() String parentissuekey=parentissue.key System.out.println("script=set-security-level-from-parent.groovy action=StartScript key=" + issuekey + " parentkey=" + parentissuekey) Integer parentsecuritylevel = parentissue.securityLevel?.id String parentsecuritylevelname = parentissue.securityLevel?.name if (parentsecuritylevel == 10000) { System.out.println("script=set-security-level-from-parent.groovy action=StartScript key=" + issuekey + " Set Security Level to " + parentsecuritylevelname + " from " + parentissuekey) issue.setSecurityLevelId(parentsecuritylevel) } System.out.println("script=set-security-level-from-parent.groovy action=EndScript"); {code} Feel free to use :-) I know the imports can be cleaned up.... PS: 10000 is the only Security Level I have on projects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Norman, how did you setup the "change of security level" on the transition? When I select "Post function" -> "Update Issue field" there is no "Security Level" field to set/change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes - And no.... I actually had to make a workflow Transition setting the Security Level, and then letting the Automation perform that to make it work.... not optimal, but it works....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any luck getting this to work Normann?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Strange part is I can but almost whatever fieldname in, the "Errors" column stays empty in the Audit log
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.