Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markup problem details role seems to be required in order for users to show up in the assignment dropdown #4970

Open
jonkri opened this issue May 22, 2024 · 6 comments

Comments

@jonkri
Copy link
Contributor

jonkri commented May 22, 2024

Describe the bug

If a user is missing the Markup problem details role then that user doesn't seem to show up in the assignment dropdown in the inspection form. This is the case even if the user has the Manage shortlist permission.

To Reproduce

Steps to reproduce the behavior:

  1. Create a body user with the following permissions: Create reports/updates as anonymous user, Create reports/updates as the council, Default to creating reports/updates as the council, Manage shortlist, Edit reports and Edit report category.
  2. Try to assign a report to the body user created in Step 1.

Expected behavior

The user created in Step 1 above shows up in the assignment dropdown.

Screenshots

Not applicable.

Desktop (please complete the following information):

Not applicable.

Smartphone (please complete the following information):

Not applicable.

Additional context

Not applicable.

@jonkri
Copy link
Contributor Author

jonkri commented May 27, 2024

Related to #4855, when a user doesn't show up in the dropdown because of this, and the same user shortlists the problem, the wrong user is displayed in the assignment dropdown.

@jonkri
Copy link
Contributor Author

jonkri commented Jun 17, 2024

Would it make sense to display users with the Manage shortlist (planned_reports) permission in the assignment dropdown instead?

-[% inspectors = c.user.from_body.staff_with_permission('report_inspect') %]
+[% inspectors = c.user.from_body.staff_with_permission('planned_reports') %]

@dracos
Copy link
Member

dracos commented Jun 20, 2024

In our database, looks like we currently have:

  • 1,191 users with both permissions
  • 307 users with report_inspect but not planned_reports
  • 9 with planned_reports but not report_inspect

I can't easily say whether any of those use the shortlist assignment or not, but from that I'd say whilst we could almost certainly add planned_reports to the list on top of report_inspect users, I don't think we could change it from one to the other.

@jonkri
Copy link
Contributor Author

jonkri commented Jun 20, 2024

Interesting!

Adding planned_reports to the list on top of report_inspect users would work for us.

@dracos
Copy link
Member

dracos commented Jun 20, 2024

Although... having thought about it some more, is there any point to someone being able to be assigned if they can't then look at their shortlist? What do we do with this, would need a bit of looking to see what it's used for.

@jonkri
Copy link
Contributor Author

jonkri commented Jul 7, 2024

is there any point to someone being able to be assigned if they can't then look at their shortlist?

That's a good question!

I guess the only point to it would be if...

  • certain report_inspect users (managers) would like to make “private” assignments that the assignees can't see, while
  • the assignees should not be able to see the assignment or shortlist themselves to reports.

If this scenario is irrelevant then I would suggest that we only display planned_reports users in the assignment dropdown like I suggested above since adding planned_reports to the list on top of report_inspect users would in this case have these drawbacks:

  • The “logic” for assignments and shortlists permissions seemingly becomes unnecessarily complicated.
  • If the planned_reports permission is accidentally left out there could be a situation where users seem to be assigned but can't see their shortlist. This situation can't happen if the users without the planned_reports permission aren't displayed in the assignment dropdown in the first place.

Perhaps you could identify the managers of these 307 users (that have the report_inspect permission but not the planned_reports permission) and contact the managers to see if they would mind adding the planned_reports permission to the report_inspect users. If this is feasible then we could carry out a change like the one I suggested without changing the content of the assignment dropdown.

Also, perhaps it could be interesting to check how many of the 307 users that you mentioned that are actually assigned to reports (and not being able to see the reports in their shortlist). If no report_inspect users are assigned this could perhaps indicate that they shouldn't be in the assignment dropdown in the first place. In this case the managers could be asked if the users can be removed from the assignment dropdown, which would have the extra benefit of making the dropdown less cluttered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants