Defaulting Issue Security

Originally asked by Howard Kenny on 19 January 2021 (original question)


Hey,

How do I set an issue security? I’ve referenced this, but it doesn’t cover a default: https://docs.idalko.com/exalate/display/ED/How+to+synchronize+SecurityLevel+issue+field+in+Jira+Server

I thought it would simply be the below, but it errors:
issue.securityLevel = “General”

Cheers,

Howard


Comments:

Howard Kenny commented on 19 January 2021

NB. I’ve found a temporary workaround by putting a post-function on the Create transition in the workflow, but it would still be good to know how Exalate should handle it.

Answer by Francis Martens (Exalate) on 19 January 2021

Hi Howard Kenny

Did you try the following snippet

import com.exalate.basic.domain.hubobject.v1. BasicHubIssueSecurityLevel
issue.securityLevel = new BasicHubIssueSecurityLevel(null, "name", "description")

where “name” should be the name of the default


Comments:

Howard Kenny commented on 19 January 2021

Hi,

I didn’t because I didn’t know what the Description would be. Thank you.