Bug 26991

Summary: Add action logs to search engine administration
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Searching - ElasticsearchAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: andrew, caroline.cyr-la-rose, david, jonathan.druart, martin.renvoize
Version: MainKeywords: Manual
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds logging of changes made to Elasticsearch. These can be viewed in the log viewer tool, where you can view all search engine changes, or limit to edit mapping and reset mapping actions.
Version(s) released in:
21.05.00,20.11.03
Circulation function:
Attachments: Bug 26991: Add action logs to search engine administration
Bug 26991: Add action logs to search engine administration
Bug 26991: Add action logs to search engine administration
Bug 26991: Add action logs to search engine administration

Description Fridolin Somers 2020-11-10 14:49:27 UTC
Search engine administration is very important, we should log who/when it is changed.
Comment 1 Fridolin Somers 2020-11-12 08:26:45 UTC
Created attachment 113542 [details] [review]
Bug 26991: Add action logs to search engine administration

Search engine administration is very important,
we should log who/when it is changed.
I don't add a preference system to disable it,
like there is no for preference system logs.

Test plan :
1) Use searchengine Elasticsearch
2) Go to Administation > Search engine configuration (Elasticsearch)
3) Click on 'Reset Mappings' and accept
4) Edit some lines and save
5) Go to 'Tools' > 'Log viewer'
6) Select only 'Search engine' in Modules and submit
7) Select only 'Edit mappings' in Actions
8) Check you see a log
9) Select only 'Reset mappings' in Actions
10) Check you see a log
Comment 2 David Nind 2020-12-02 18:16:20 UTC
Patch no longer applies 8-(..
Comment 3 Fridolin Somers 2020-12-03 14:33:28 UTC
Created attachment 114150 [details] [review]
Bug 26991: Add action logs to search engine administration

Search engine administration is very important,
we should log who/when it is changed.
I don't add a preference system to disable it,
like there is no for preference system logs.

Test plan :
1) Use searchengine Elasticsearch
2) Go to Administation > Search engine configuration (Elasticsearch)
3) Click on 'Reset Mappings' and accept
4) Edit some lines and save
5) Go to 'Tools' > 'Log viewer'
6) Select only 'Search engine' in Modules and submit
7) Select only 'Edit mappings' in Actions
8) Check you see a log
9) Select only 'Reset mappings' in Actions
10) Check you see a log
Comment 4 Fridolin Somers 2020-12-03 14:35:05 UTC
Updated on master, which is now 20.12
Comment 5 David Nind 2020-12-03 18:14:43 UTC
Created attachment 114157 [details] [review]
Bug 26991: Add action logs to search engine administration

Search engine administration is very important,
we should log who/when it is changed.
I don't add a preference system to disable it,
like there is no for preference system logs.

Test plan :
1) Use searchengine Elasticsearch
2) Go to Administation > Search engine configuration (Elasticsearch)
3) Click on 'Reset Mappings' and accept
4) Edit some lines and save
5) Go to 'Tools' > 'Log viewer'
6) Select only 'Search engine' in Modules and submit
7) Select only 'Edit mappings' in Actions
8) Check you see a log
9) Select only 'Reset mappings' in Actions
10) Check you see a log

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Martin Renvoize (ashimema) 2021-01-11 13:51:26 UTC
Created attachment 115032 [details] [review]
Bug 26991: Add action logs to search engine administration

Search engine administration is very important,
we should log who/when it is changed.
I don't add a preference system to disable it,
like there is no for preference system logs.

Test plan :
1) Use searchengine Elasticsearch
2) Go to Administation > Search engine configuration (Elasticsearch)
3) Click on 'Reset Mappings' and accept
4) Edit some lines and save
5) Go to 'Tools' > 'Log viewer'
6) Select only 'Search engine' in Modules and submit
7) Select only 'Edit mappings' in Actions
8) Check you see a log
9) Select only 'Reset mappings' in Actions
10) Check you see a log

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2021-01-11 13:51:59 UTC
Great addition, Passing QA
Comment 8 Jonathan Druart 2021-01-12 15:45:09 UTC
Could be improved to log what has been modified. Much more work however.
Comment 9 Jonathan Druart 2021-01-12 15:48:19 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 10 Fridolin Somers 2021-01-25 13:58:47 UTC
Small enhancement, I choose to push to 20.11.x to encourage Elasticsearch ;)

Pushed to 20.11.x for 20.11.03
Comment 11 Andrew Fuerste-Henry 2021-02-01 20:19:56 UTC
Enhancement, not backported to 20.05. Please ask if needed.