Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-20377

As a user, I want to generate a User Workload Report for a user who doesn't have Browse Projects permission

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • Reports
    • 1
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      User picker on the User Workload Report page seems to behave differently than other user pickers. If the user does not have the Browse Users global permission, the user picker won't allow any values to be entered. This behaves differently than other user pickers, which won't suggest any values when typing, but will accept exact usernames.

      Problem Definition

      User picker on the User Workload Report page seems to behave differently than other user pickers. If the user does not have the Browse Users global permission, the user picker won't allow any values to be entered. This is different than other user pickers, which won't suggest any values when typing, but will accept exact usernames.

      This seems to be by design, since we explicitly check for global permissions for the specified user:

      public void validate(ProjectActionSupport action, Map params) {
              super.validate(action, params);
              final String developer = (String) params.get("developer");
              final boolean canPickUsers = action.hasGlobalPermission(GlobalPermissionKey.USER_PICKER);
      
              if (!TextUtils.stringSet(developer)) {
                  action.addError("developer", action.getText("report.developerworkload.developer.is.required"));
              } else if (!canPickUsers) {
                  action.addError("developer", action.getText("report.developerworkload.developer.does.not.exist"));
              } else if (userManager.getUserByName(developer) == null) {
                  action.addError("developer", action.getText("report.developerworkload.developer.does.not.exist"));
              }
          }
      

      It would be nice to be able to specify any user, just like all other user pickers in Jira.

      How to replicate

      1. Create a sample Scrum project named SCRUM.
      2. Navigate to Cog Icon > Issues > Time tracking and make sure it is enabled.
      3. Navigate to Cog Icon > System > Global permissions. Delete the groups jira-software-users and jira-core-users from the Browse Users permission. The only remaining group should be jira-administrators.
      4. Create 2 non-admin users called one and two.
      5. Navigate to Cog Icon > Issues > Custom field > Add custom field and add a User picker custom field. Select all screens in the next page.
      6. While logged-in as an admin user, create a new issue. Try entering the values one or two in the user picker custom field and note how Jira provides suggestions.
      7. Sign off Jira.
      8. Sign into Jira using one of the non-admin users created earlier.
      9. Create a new issue. Try entering a username in the user picker custom field. Note how Jira won't provide suggestions. Now enter an exact username in the custom field, and note how Jira accepts it.
      10. Navigate to Projects > SCRUM > Reports > Switch report > All reports > User Workload Report.
      11. Try entering an exact username in the user picker. Note how Jira won't accept any values, showing the following error message:
        The user you selected does not exist, or you do not have permission to select users. 
        
      12. Sign off Jira, and sign-in back as an admin user.
      13. Navigate to Projects > SCRUM > Reports > Switch report > All reports > User Workload Report.
      14. Try entering some usernames in the user picker, and note how Jira provides suggestions normally.

      Suggested Solution

      Change the behavior on the user picker for this report, to allow entering exact usernames.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vfontes Vinicius Fontes
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: