Versions Compared

Key

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

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

Instructions

For this scenario, we use the addProjectRoleActors and  action and userId CLI actions.parameter where: 

  • addProjectRoleActors:  Add adds users or groups to a project role., and,
  • userId:  User id provides the User 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.IDs is required. 
Note

Ensure that the project

...

role(s) exists on the global level.

...

 

  1. Consider the following example shows a project key ", JIRACLI" , that has a role defined as Jira_users.
    Image Removed
    Execute the below CLI action by navigating as jira-software-users:
    Image Added
  2. Navigate to Admin > Manage Apps > Run Actions to execute the following CLI action:

    Code Block
    themeMidnight
    --action addProjectRoleActors --project "JIRACLI" --role "Jira_jira-software-users" --userId "Lucas"

    Image Removed

    note

    Image Added


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

Image Added

Info
titleInfo
  • Make sure you have installed the

...

  • Run CLI action in Jira

...

  • v9.2

...

  • app as the action addProjectRoleActors is compatible with

...

titleInfo
  • the app from v9.2.
  • It is recommended to test this scenario in a test

...

  • environment before implementing it in production.