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-1003: Fix searching of container inspections #825

Conversation

ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Sep 4, 2024

JIRA ticket: LIMS-1003

Summary:

If you go to the imaging admin page and (under inspections) type something in the search bar, you either get every container ever or an error 500.
The paginate function expects the last 2 values in $args to be the start and end of the range required. The search code was adding to $args after the start/end values had been added, so if you searched for a number, you just got every container ever, and if you searched for text you got an error about a "non-numeric value".

Changes:

  • Move the code for searching higher up, before the counting of results.
  • Simplify the search code by removing unnecessary LOWER() and CONCAT() calls, and appending the search text to $args twice in one go.

To test:

  • Go to the imaging admin page (/admin/imaging/)
  • Under inspections, search for 38893. Only one result should appear, for proposal in38893.
  • Search for 2151_thaum. 14 results should appear, for proposal mx34066.

@ndg63276 ndg63276 changed the base branch from master to pre-release/2024-R4.4 October 1, 2024 09:54
@ndg63276 ndg63276 merged commit 5552ece into pre-release/2024-R4.4 Oct 1, 2024
2 checks passed
ndg63276 added a commit that referenced this pull request Oct 22, 2024
* LIMS-1003: Fix searching of container inspections (#825)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-380: Fix position of autoPROC images (#831)

* LIMS-380: Fix position of autoPROC images

* LIMS-380: Just use iframe size of 98%

* Set width/height to percentage value (#838)

---------

Co-authored-by: Mark Williams <[email protected]>
Co-authored-by: Guilherme Francisco <[email protected]>

* LIMS-1430: Fix bugs on prepare for data collection page (#829)

* LIMS-1430: Allow queuing even if no visible samples

* LIMS-1430: Show number of samples to queue

* LIMS-1430: Watch all subsamples for changes

* LIMS-1430: Remove TODO list

* LIMS-1430: Display number is of data collections, not samples

* LIMS-1430: Dont allow queueing if hidden data collections are invalid

* Update client/src/js/modules/imaging/views/queuecontainer.js

Co-authored-by: Guilherme Francisco <[email protected]>

---------

Co-authored-by: Mark Williams <[email protected]>
Co-authored-by: Guilherme Francisco <[email protected]>

* LIMS-1390: Fix searching of data collection groups (#833)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1286: Show ERA status on calendar and visits list (#834)

Co-authored-by: Mark Williams <[email protected]>

* LIMS-1354: Migrate from ActiveMQ to RabbitMQ (#826)

* LIMS-1354: Migrate from ActiveMQ to RabbitMQ

* Unwrap try...catch

* Add routing_key and vhost

* Add polyfill for BCMath as php-bcmath extension is not installed but required by php-amqplib for AMQP

---------

Co-authored-by: Mark Williams <[email protected]>
Co-authored-by: Guilherme Francisco <[email protected]>
Co-authored-by: James Hall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants