Skip to end of banner
Go to start of banner

How to add a user to a project Role using Run CLI Actions in Jira

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 10 Next »

This article explains how to add a user to a project role using the app Run CLI Actions in Jira on Server instance.

Instructions

For this scenario, use the addProjectRoleActors action and userId parameter where: 

  • addProjectRoleActors: adding users or groups to a project role.
  • userIdUser id for user management and other actions. For some actions, a comma-separated list of ids. 
  1. Ensure that the project role(s) exist on the global level. 

    The below example shows a project key "JIRACLI" that has a role defined as jira-software-users.

  2. Execute the below CLI action by navigating to Admin > Manage Apps > Run Actions :

    --action addProjectRoleActors --project "JIRACLI" --role "jira-software-users" --userId "Lucas"

  3. The result of the above cli action will be similar to as shown below:


    Info

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