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

LIMS-1238: Speed up query to list persons on visit #886

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Dec 20, 2024

JIRA ticket: LIMS-1238

Summary:

Speed up the query to show the users on a visit. Also tidy up some of the code around it.

Changes:

  • The $sid option was looking at an invalid table name, so presumably not used and now deleted
  • Remove the addPersonOrProposalSearch function and move it's code into getUsers, add the joins to ProposalHasPerson and LabContact at the same time rather than always joining them.
  • Fix some typos in comments
  • Remove unnecessary concat's and lower's in the search function
  • If a visit is specified, use regex to split into proposal code, proposal number and visit number and then match those separately, rather than matching on the concat of all 3.

To test:

  • Go to the Synchweb home page, hover over the little persons icon next to each visit, check the people displayed match that shown on prod, but faster
  • Go into a visit, hover over the "Users" button at the top, check the same information is displayed
  • Modify line 266 of client/src/js/modules/admin/routes.js from manage_users to a permission you have (eg manage_vusers)
  • Go to /admin/users, you should see your name and fedid, but you can search to see more people
  • Check the search bar works on given name, family name and login
  • Click on a person, check you can see their basic info

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

Successfully merging this pull request may close these issues.

1 participant