"Clones an issue and links" post function. How to set issue security level of linked issue?

Tsol
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2012

Hi everybody,

i'm using "Clones an issue and links" and i want to set a different security level for the linked issue.

I'm using the following code:

issue.securityLevel?.name = "Restricted to Reporter"

But the security level of the issue that is created after the execution of post function inherits the security level of the original issue.

Any ideas on that?

Thanks in advance,

Cheers,

Kostas

1 answer

1 accepted

0 votes
Answer accepted
Tsol
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2012

After some experiments i have found a workaround for setting the security level of the linked issue. The script is the following:

issue.setSecurityLevelId(securitylevel_id)

If you do not want to set any security level to your linked issue do not put an id between the brackets.

Suggest an answer

Log in or Sign up to answer