Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
1
-
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
- Create a sample Scrum project named SCRUM.
- Navigate to Cog Icon > Issues > Time tracking and make sure it is enabled.
- 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.
- Create 2 non-admin users called one and two.
- Navigate to Cog Icon > Issues > Custom field > Add custom field and add a User picker custom field. Select all screens in the next page.
- 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.
- Sign off Jira.
- Sign into Jira using one of the non-admin users created earlier.
- 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.
- Navigate to Projects > SCRUM > Reports > Switch report > All reports > User Workload Report.
- 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.
- Sign off Jira, and sign-in back as an admin user.
- Navigate to Projects > SCRUM > Reports > Switch report > All reports > User Workload Report.
- 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
- is blocked by
-
GHS-255687 Loading...