Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to remove a user as a Project Admin for multiple projects using the app, Run CLI Actions in Jira, on a datacenter instance.

...

  1. Consider the following example which shows a project key, TC, and has a role defined as jira-administrators:

  2. Create a csv file(ex: projects.csv) with the below parameters:
  3. Place the projects.csv under the relevant folder, that is /var/atlassian/application-data/home/cli-plugin. This location is based on your Jira instance.
  4. Navigate to Admin > Manage Apps > Run Actions to execute the following CLI action:

    Code Block
    themeMidnight
    --action run --server http://example.test.stage --password xxxxxxx --user xxxxxxx
    
    --action runFromCsv --file "remove.csv" --common "--action removeProjectRoleActors"
    

  5. Click on Run and below is the required output:

    Code Block
    themeMidnight
    Run: --action runFromCsv --file "remove.csv" --common "--action removeProjectRoleActors"
    
    Run: --project "JIRA" --role "jira-administrators" --userId "Amulya" --category "standard" --action removeProjectRoleActors
    'jira-administrators' role updated for project JIRA
    
    Run: --project "QA" --role "jira-administrators" --userId "Amulya" --category "standard" --action removeProjectRoleActors
    'jira-administrators' role updated for project QA
    
    Run: --project "BUMP" --role "jira-administrators" --userId "Amulya" --action removeProjectRoleActors
    'jira-administrators' role updated for project BUMP
    
    Run: --project "TC" --role "jira-administrators" --userId "Amulya" --action removeProjectRoleActors
    'jira-administrators' role updated for project TC
    
    Run: --project "ZJCLI" --role "jira-administrators" --userId "Amulya" --action removeProjectRoleActors
    'jira-administrators' role updated for project ZJCLI
    
    Run completed successfully. 5 actions were successful from file: /var/atlassian/application-data/home/cli-plugin/remove.csv
    
    Run completed successfully. 1 actions were successful


    Image Modified

  6. The result of the above actions is shown in the following screenshot:
    Image Modified



Info
  • Make sure you have installed the Run CLI Actions in Jira v9.2 app as the action removeProjectRoleActors is compatible only with the app from v9.2.
  • It is recommended to test this scenario in a test environment before implementing it in production. 

...