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

reports (item usage) combination search broken #10

Open
kaibolay opened this issue Apr 1, 2023 · 4 comments
Open

reports (item usage) combination search broken #10

kaibolay opened this issue Apr 1, 2023 · 4 comments

Comments

@kaibolay
Copy link
Contributor

kaibolay commented Apr 1, 2023

For example searching for "Subject" (e.g. Comics) and "Last checkout date" does not return any results.

@kaibolay
Copy link
Contributor Author

kaibolay commented Nov 4, 2023

It seems like all reports are broken - I don't observe any requests to the backend.

@kaibolay
Copy link
Contributor Author

kaibolay commented Nov 4, 2023

Aha! "Last checkout date" is a required field and needs to be set. If it's not set no request is sent - but also no error is displayed.

@kaibolay
Copy link
Contributor Author

kaibolay commented Nov 4, 2023

GET https://librarian.gssb.org/api/reports/itemUsage?category=Buch&lastCheckoutDate=2023-11-04 results in HTTP Status Code 400 Bad Request with

{
  "error": "SQL Error",
  "errorCode": "ER_PARSE_ERROR",
  "mesage": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version 
      for the right syntax to use near 
      'where category = 'Buch'\n      group by a.barcode\n      having last_checkout_date' at line 3"
}

@kaibolay
Copy link
Contributor Author

kaibolay commented Nov 4, 2023

The SQL error was fixed with eed8e59

I still need to improve the feedback when no date is selected. Should display and error and highlight the date picker - or alternatively the field should be pre-populated (e.g. with today's date) so that it is always set.

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

No branches or pull requests

1 participant