Hi there,
When creating issues using the Jira API via Script Runner, the default security level is not set under the conditions below if the security level is not explicitly included in the input parameters:
- A create Issue screen includes the Security Level field, and the executing user has permission to set the security level.
Note: If the Security Level field is removed from the Create screen, the default security level is applied.
To resolve this, would the only options be either to remove the field from the Create screen or to explicitly include the security level in the input parameters?
Thank you.
2 Likes
To clarify
- You have an issue which does not have the Security Level field on the create screen
- You do have a Security Scheme and default security level set up. And it works when you create an issue with the UI
- You create an issue with the REST API without passing in a Security Level value
- The issue is created without the default security level set
Is that all correct?
Does this also happen if you use a different tool from ScriptRunner to create an issue?
Hi Matt,
Thank you for your reply.
-
You have an issue which does not have the Security Level field on the create screen
β No, the issue occurs when the Security Level field is present on the create screen.
-
You do have a Security Scheme and default security level set up. And it works when you create an issue with the UI
β Yes, the Security Level is properly configured, and it works fine when creating an issue via the UI.
-
You create an issue with the REST API without passing in a Security Level value
The issue is created without the default security level set
β We have not tested this behavior with the REST API yet.
-
Does this also happen if you use a different tool from ScriptRunner to create an issue?
β We have not tested it with any tool other than ScriptRunner yet.
Thanks for the clarification. Two more questions:
-
Is this Data Center or Cloud?
-
Does the user creating the issue have the Set Issue Security permission for the project?
Thank you for asking in such detail.
- Is this Data Center or Cloud?
βItβs Data Center.
- Does the user creating the issue have the Set Issue Security permission for the project?
βYes, the user has that.
Got it, I think. I expect that if the user creating the issue does not have permission to set the security level, then the expected default security level is used. But because the user does have the ability to set the security level, then it is expected that the security level is passed in to the REST API call.
Now, how are you creating issues using the REST API with ScriptRunner? And why not use the internal Jira Java API directly?
Hi Matt,
We are not using the REST API; instead, we are using the Jira Java API.
I posted about an issue occurring with the Jira Java API.
Thanks,
Wow, I really should read the original question, sorry
But is this in a post function context or a separate script console?
Are you able to post a snippet of the Groovy script that created an issue