Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use ScriptRunner to change project permission ?

Maahshid Vaziri August 1, 2022

Hello, :)

I want to change the access level for members of that project when the field status of a project is changed, I have done the actions related to the project permission, but I don't know how to write the script to run it after the field status is changed.

Thank you for your guidance.

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 1, 2022

Hi Maahshid

You can't use project permissions on a per-issue basis. If you adjust anything in project permissions based on the status of an issue, you're also changing the permissions on ALL other issues.

I suggest you look into workflow properties instead.

Maahshid Vaziri August 2, 2022

Hi Peter 

Thanks for your answer, Actually I want adjust project permission based on the status of project not issue, for exp if the status of the project change to "Closed" all issues related to this project have to be closed and no new issue be created on it.

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2022

There is no such thing as project status.

But what you are describing can be achieved by changing the permission scheme associated with a project.

PermissionSchemeManager is probably a good place to start

Maahshid Vaziri August 9, 2022

It is cotumefield I attached Screenshot, 

Capture.JPG

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2022

I am not familiar with the app that provides this project-level custom field.

Maahshid Vaziri August 9, 2022

I think it's not important or key point of my work, because automation rule find this costume field and run script, so now my question  :

in script how can I return project key and then read costume field?

TAGS
AUG Leaders

Atlassian Community Events