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

Voided user group entries show up on the assignment screen in the User's name #1008

Closed
2 of 4 tasks
nupoorkhandelwal opened this issue Jul 27, 2023 · 2 comments
Closed
2 of 4 tasks
Assignees

Comments

@nupoorkhandelwal
Copy link
Contributor

nupoorkhandelwal commented Jul 27, 2023

Describe the bug
Under assignment screen, we show up user group name of the user during assignment, so right now it shows the voided user group entries as well. Voided user groups as in, the user was earlier part of some user group and now has been removed from the group, and that group still shows along with his name.

To Reproduce
Steps to reproduce the behavior:

  1. Go to LAHI (Lend A Hand India) organisation.
  2. GO to assignment screen, select Assigned to as Alim in the filter
  3. See that user group names are coming along with his name which he is not part of now.
  4. See error in the attached screenshot.

Expected behavior
Ideally the user groups from which the user has been removed should not have come on the assignment screen

Test Data
Query to see his user group assignment details--

set role lahi;
select * from user_group where user_id in (select id from users where username = 'alims@lahi');

Screenshots

Image

Developer Checklist(Developer fixing the bug should fill this checklist)

  • Does the fix require extensive regression testing?
    • Yes
    • No
  • Are you mentioning the required scenarios that could be affected?
    • Yes
    • No
@himeshr himeshr self-assigned this Jul 27, 2023
himeshr added a commit to avniproject/avni-server that referenced this issue Jul 27, 2023
@himeshr
Copy link
Contributor

himeshr commented Jul 27, 2023

Code changes will only affect list of userGroups for Users. Its mostly a safe code change, as we are only filtering out voided userGroups from the users response.

Image

aUser has 15 userGroups which include 13 voided and 2 unvoided. (Everyone is hidden)

Image

@ashusvnath
Copy link

Verified using himeshr@power on staging.

Voided groups are no longer shown for assigned users in Subject assignment screen.

@ashusvnath ashusvnath self-assigned this Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants