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 Suite Apps for Jira
Results will update as you type.
  • Get started with Power Suite Apps for Jira
  • Power Scripts for Jira
  • Power Actions for Jira
  • Power Custom Fields
  • Power Database Fields
  • Power Dashboard Reports and Gadgets
  • SIL Connector modules
  • Simple Issue Language
  • Tutorials and recipes
    • Recipes by Add-on
      • Power Actions Recipes
      • Power Scripts Recipes
        • Add internal comments to Jira Service Desk requests
        • Add a group as participants in Jira Service Desk
        • Add participants automatically to new Jira Service Desk requests
        • Adjust an estimate according to assignee
        • Assign issues to the previous assignee
        • Assign issues automatically based on workload
        • Assign an issue while maintaining the user load
        • Assign users based on a decision table using SIL™
        • Create a sub-task automatically based on custom field selection
        • Create story subtasks and close them when story is closed
        • Calculate the due date based on custom field values
        • Copy data from the parent issue
        • Copy the reporter and watchers on duplicate issues
        • Copy a custom field value to another field when changed
        • Copy watchers to sub-tasks
        • Create a Select All option in a dropdown list
        • Create a custom cascading dropdown field
        • Use validators based on date range
        • Set default values for system fields on the Create screen
        • Disable inline edits
        • Filter based on multiple criteria by using a non-Boolean JQL function
        • Hide the Create issue button until an attachment is added
        • Hide specific priorities for certain projects
        • Hide specific issue types for certain users
        • Compare two fields with custom JQL
        • Get the time spent by an issue in certain statuses
        • Hide fields for users with no developer role
        • Hide the comment field during a transition
        • Hide time-tracking information
        • Insight REST API
        • Perform searches with LDAP
        • Limit the number of characters in a text-entry field
        • Limit the assignee to a specific group
        • Limit the number of user votes per month
        • Map story points to hours and automatically log work on completion
        • Automatically move unresolved issues to next sprint and update story points
        • Automatically update the custom field ID and/or name in filters
        • Create custom JQL functions for nested issue reporting
        • Prepopulate fields during a transition
        • Replicate the native Jira email handler
        • Require users to log work before transitioning an issue
        • Ensure that issues have attachments
        • Require fields in subtasks
        • Use a workflow validator based on logged hours
        • Require the fix versions when resolving an issue
        • Reset a field
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Assign issues automatically based on workload
    Updated Nov 19, 2024

    Assign issues automatically based on workload

    This function returns the user in the group that has the least number of issues
    the function takes a group name as an input parameter.

    To invoke, you'd script like this:

    string user = getUserLeastIssues("auto-assign-users");

    Script

    string username; int countIssues; string [] groupUsers; string [] groups = {argv[0]}; groupUsers = usersInGroups(groups); for(string u in groupUsers) { string jql = "project = EX AND statusCategory in (\"To Do\", \"In Progress\") and assignee = " + u; int tempCount = countIssues(jql); if(isNull(username) || (countIssues > tempCount)) { username = u; countIssues = tempCount; } } return username;

    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 13, "requestCorrelationId": "6fd7688b95a14190ad5843272398c78e"}