Thank you for contacting us. I'm happy to help you.
As of now, that's not possible, I'm afraid. To add values to a custom field in a project, the user needs to have 'Update project' permission in all the projects these values are used in. However, this permission will let users update other project-related settings.
We have a related feature to add granulation to this permission: https://youtrack.jetbrains.com/issue/JT-46360. Please feel free to vote for it, as it increases its priority and subscribes you to the email notifications. To do so, sign in to JetBrains YouTrack and hit the thumbs-up icon.
I tried to make new items through the API. I used a user token with "Project Admin" rights (YouTrack Administration, YouTrack scope). But it didn't work, I got a 403 error.
When I used the administrator token, everything worked. Why is that?
Why the Project Admin can add items to the enum list, but can't do the same through the API?
Why the Project Admin can add items to the enum list, but can't do the same through the API?
As a general note, the YouTrack frontend also sends REST API requests to the backend. So if you can do something via UI, you can do it by using the REST API directly.
I use a workflow API call so that the entire team can add items to the enum list.
It's a pity that you can't restrict access to workflow for project admins. We are thinking about moving the script to the middleware so that the script and token are not available to all project admins.
Hi!
I'm Sergey from the YouTrack team.
Thank you for contacting us. I'm happy to help you.
As of now, that's not possible, I'm afraid. To add values to a custom field in a project, the user needs to have 'Update project' permission in all the projects these values are used in. However, this permission will let users update other project-related settings.
We have a related feature to add granulation to this permission: https://youtrack.jetbrains.com/issue/JT-46360. Please feel free to vote for it, as it increases its priority and subscribes you to the email notifications. To do so, sign in to JetBrains YouTrack and hit the thumbs-up icon.
Hi!
I tried to make new items through the API. I used a user token with "Project Admin" rights (YouTrack Administration, YouTrack scope). But it didn't work, I got a 403 error.
When I used the administrator token, everything worked. Why is that?
Why the Project Admin can add items to the enum list, but can't do the same through the API?
It works, my mistake.
Thanks for the update.
Glad to hear that you've resolved the issue.
As a general note, the YouTrack frontend also sends REST API requests to the backend. So if you can do something via UI, you can do it by using the REST API directly.
I use a workflow API call so that the entire team can add items to the enum list.
It's a pity that you can't restrict access to workflow for project admins. We are thinking about moving the script to the middleware so that the script and token are not available to all project admins.