Versions Compared

Key

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

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

Instructions

For this scenario, we use the addProjectRoleActors and userId CLI actions. 

  • addProjectRoleActorsAdd users or groups to a project role.
  • userIdUser id for user management and other actions. For some actions, a comma-separated list of ids. For Cloud, use an account id or a public name.
  1. Ensure that the project roles are added on the global level. The below example shows a project key "JIRACLI" that has a role defined as Jira_users.
    Image Modified
  2. Execute the below CLI action by navigating to Admin → Admin > Manage Apps → Apps > Run Actions :

    Code Block
    themeMidnight
    --action addProjectRoleActors --project "JIRACLI" --role "Jira_users" --userId "Lucas"

    Note

    Make sure you have installed the app Run app, Run CLI action in Jira version 9.2to execute Jira CLI action.


  3. The result of the above code block is as follows:
    Output in Jira:

    Image Modified

    Info
    titleInfo

    It is recommended to test this scenario in a test environment before implementing it in production.