When using the Jira API (v2) i also like to set the Restrictions.
I did try to set it using:
fields: {issuerestriction: { 'issuerestrictions': { 'projectrole': [ {'restrictionValue': 'xx'} ] } }
This returns me an error when using the API:
{"issuerestriction":"Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: N/A; line: -1, column: -1]"}}
Is there an other way to set the Security level / Restriction when using the API for a Next-Gen project?
Hi
It seems that you're not using the right payload for your update. As you're calling the key "issuerestriction" twice and all keys should be wrapped in quotes (depending on which language you use). Your payload should look like the below sent with a "PUT" HTTP method
payload = {
"fields": {"issuerestriction": {"projectrole": [{"restrictionValue": "10xxx"}]}}
}
Where value "10xxx" is the project role id. With that, you can set the restrictions on your Team Managed projects.
Tnx that working!!.. I was looking to the structure when i did a get on a ticket.. and then it shows it like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.
Register here ⬇️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.