specify / specify7

Specify 7
https://www.specifysoftware.org/products/specify-7/
GNU General Public License v2.0
66 stars 36 forks source link

Showing agents for a specify user in Security And Accounts is buggy #5058

Open realVinayak opened 4 months ago

realVinayak commented 4 months ago

If two agents, from different divisions, are assigned to a specify user, then only one of them is shown in the query cbx for choosing agents (even though, both are assigned)

image

This stems from below lines

https://github.com/specify/specify7/blob/a991a42658c83e626f3631326895cbe5ebe4edc4/specifyweb/frontend/js_src/lib/components/Security/UserHooks.tsx#L150-L158

This will return only one agent (bc of the limit), but that agent could be of the different division (than the one you are currently seeing). Actually, this bug will ALWAYS be there for two divisions (it'll be sorted, but only one is shown). In general, if you have N divisions, only one of them will show the agent (bc for rest of them, the limit = 1 will act as a side-effect, and the in clause will be same)

emenslin commented 3 months ago

Can recreate in edge (7.9.6)