Skip to end of banner
Go to start of banner

How to remove a user from the project role for multiple projects using the app Run CLI action for Jira on Datacenter instance.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This article explains how to remove a user as Project Admin for multiple projects using the app Run CLI action for Jira on Datacenter instance.

Instructions

For this scenario, use the runFromCsv and removeProjectRoleActors actions where: 

  • removeProjectRoleActorsRemove users or groups from a project role.
  • runFromCsv: Run actions generated from a CSV file.

    Ensure that the project role(s) and userId(s) exists on the global level. 

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

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

    --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:

    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



  6. The result of the above action is similar to the following screenshot:



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