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)
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)
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)
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)