Bug 25845 - Cannot limit system logs to 'api' interface
Summary: Cannot limit system logs to 'api' interface
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on: 22600
Blocks: 26086
  Show dependency treegraph
 
Reported: 2020-06-22 19:25 UTC by Nick Clemens (kidclamp)
Modified: 2021-06-14 21:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds the option to limit viewing logged actions done by API only
Version(s) released in:
20.11.00, 20.05.03
Circulation function:


Attachments
Bug 25845: Add 'api' to the log viewer interface options (2.55 KB, patch)
2020-06-23 14:13 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 25845: Add 'api' to the log viewer interface options (2.61 KB, patch)
2020-06-30 00:41 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 25845: (QA follow-up) Call it REST API instead of just API (1023 bytes, patch)
2020-07-20 12:51 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2020-06-22 19:25:44 UTC
Bug 22600 added the 'api' interface to the system, we should also add this as a limit in the tools
Comment 1 Tomás Cohen Arazi (tcohen) 2020-06-23 14:13:29 UTC
Created attachment 106210 [details] [review]
Bug 25845: Add 'api' to the log viewer interface options

This patch simply adds the API option to the log viewer.

To test:
1. Have BorrowersLog set
2. Update some patron using the API. For example
   curl --location --request PUT 'http://koha:koha@kohadev-intra.mydnsname.org:8081/api/v1/patrons/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Tomasito",
"surname": "None",
"address": "Address",
"category_id": "ST",
"city": "Córdoba",
"library_id": "MPL"
}'
3. Open the log viewer
=> FAIL: There's no way to filter on interface, choosing API
4. Apply this patch
5. Reload the log viewer
=> SUCCESS: There are options to filter by 'API' interface
=> SUCCESS: Filtering by 'API' works
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Nick Clemens (kidclamp) 2020-06-30 00:41:31 UTC
Created attachment 106421 [details] [review]
Bug 25845: Add 'api' to the log viewer interface options

This patch simply adds the API option to the log viewer.

To test:
1. Have BorrowersLog set
2. Update some patron using the API. For example
   curl --location --request PUT 'http://koha:koha@kohadev-intra.mydnsname.org:8081/api/v1/patrons/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Tomasito",
"surname": "None",
"address": "Address",
"category_id": "ST",
"city": "Córdoba",
"library_id": "MPL"
}'
3. Open the log viewer
=> FAIL: There's no way to filter on interface, choosing API
4. Apply this patch
5. Reload the log viewer
=> SUCCESS: There are options to filter by 'API' interface
=> SUCCESS: Filtering by 'API' works
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens (kidclamp) 2020-06-30 00:41:45 UTC
Trivial, passing QA
Comment 4 Jonathan Druart 2020-07-20 10:49:08 UTC
I think we should use "REST API", not simply "API".
Comment 5 Tomás Cohen Arazi (tcohen) 2020-07-20 12:51:20 UTC
Created attachment 107098 [details] [review]
Bug 25845: (QA follow-up) Call it REST API instead of just API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Jonathan Druart 2020-07-22 08:31:42 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass (lukeg) 2020-07-28 15:21:00 UTC
backported to 20.05.x for 20.05.03
Comment 8 Aleisha Amohia 2020-08-03 23:35:15 UTC
enhancement, not backported to 19.11.x
Comment 9 Nick Clemens (kidclamp) 2020-08-04 11:44:19 UTC
(In reply to Aleisha Amohia from comment #8)
> enhancement, not backported to 19.11.x

Hi Aliesha, the api logs exist in 19.11 but cannot be searched specifically, the patch adds a string to allow selecting them. Would you reconsider?