Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

Power Scripts for Jira Cloud
Results will update as you type.
  • Get started
  • Configuration guides
  • Integration guides
  • Feature guides
  • Advanced features
  • Migration resources
  • Simple Issue Language
    • Getting started with SIL
    • SIL reference guide
    • SIL Functions library
      • Function Index
      • Packages
      • Array Functions
      • Basic Functions
      • Date and Interval Functions
      • Excel Functions
      • File Manipulation Functions
      • HTTP Functions
      • Incoming Mail Processing Functions
      • Integration with Other Systems
      • Jira Administration Functions
        • Custom Field Administration Functions
        • Dashboard Functions
        • Field Configuration Functions
        • Filter Administration Functions
        • Group Administration Functions
          • admAddGroupToProjectRole
          • admAddUserToGroup
          • admCreateGroup
          • admRemoveGroup
          • admRemoveGroupFromProjectRole
          • admRemoveUserFromGroup
        • Issue Administration Functions
        • Issue Type & IT Screen Scheme Administration Functions
        • Notification Administration Functions
        • Permissions Administration Functions
        • Priority Scheme Administration Functions
        • Project Administration Functions
        • Screen and Screen Schemes Administration Functions
        • System Administration Functions
        • User Administration Functions
      • Jira Integration Functions
      • Jira Service Management Functions
      • Jira Software Functions
      • Listener Functions
      • Math Functions
      • Parameter Functions
      • Scheduling Functions
      • String Functions
      • System Integration
      • Webhooks Functions
  • Tutorials and recipes
  • Jira Product Discovery support
  • Release notes
  • Help and support
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Group Administration Functions
    Updated Aug 11

    Group Administration Functions

    This section contains functions that enable users to handle group administration.

    Some of the functions below require an API token set up in PowerScripts.

    Functions Summary

    • admAddGroupToProjectRole — Adds a single group to a project role if the group is not already in that role.
    • admAddUserToGroup — Adds a single user to a group if the user is not already in that group.
    • admCreateGroup
    • admRemoveGroup — Removes a group from Jira.
    • admRemoveGroupFromProjectRole — Removes a single group from a project role if the group is in that role.
    • admRemoveUserFromGroup — Removes a single user from a group if the user is in that group.

     

    Example (requires API Token set up):

    const string groupName = "mygang"; string user = currentUser(); if(groupExists(groupName)) { runnerLog("Must remove group :" + groupName); removeGroup(groupName); } else { runnerLog("Group will be created :" + groupName); } if(createGroup(groupName)) { addUserToGroup(user, groupName); if(!userInGroup(groupName, user)) { return "nok-1"; } removeUserFromGroup(user, groupName); if(userInGroup(groupName, user)) { return "nok-2"; } removeGroup(groupName); return "ok"; } return "nok-3";

     

    Peacock

    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 13, "requestCorrelationId": "b3c3a2bcb28843beb3ec2b253fe4045a"}