Bug 21431

Summary: Differentiate password change and password reset in action logs
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: PatronsAssignee: Marcel de Rooy <m.de.rooy>
Status: Needs documenting --- QA Contact: Martin Renvoize <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kebliss, kyle.m.hall, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Bug Depends on: 21178    
Bug Blocks:    
Attachments: Bug 21431: Add action parameter to set_password
Bug 21431: Add unit test
Bug 21431: Adjust template for logviewer
Bug 21431: Add action parameter to set_password
Bug 21431: Add unit test
Bug 21431: Adjust template for logviewer
Bug 21431: Add action parameter to set_password
Bug 21431: Add unit test
Bug 21431: Adjust template for logviewer

Description Marcel de Rooy 2018-09-27 13:34:04 UTC
How often password reset has been used ?

update_password just contains:
logaction( "MEMBERS", "CHANGE PASS", … )
So the log does not really tell you. The borrower_password_recovery has no autoincrement id; so no luck there too..

opac/opac-password-recovery.pl could perhaps send a different code to update_password ?
Comment 1 Marcel de Rooy 2018-10-11 10:58:09 UTC
Dep 21178 for update_password vs set_password
Comment 2 Katrin Fischer 2023-10-07 22:50:55 UTC
Hi Marcel, I don't fully understand the problem you describe. Is this still valid?
Comment 3 Marcel de Rooy 2023-11-02 13:11:30 UTC
(In reply to Katrin Fischer from comment #2)
> Hi Marcel, I don't fully understand the problem you describe. Is this still
> valid?

Yes it is. Will send a patch.
Comment 4 Marcel de Rooy 2023-11-02 13:42:44 UTC
Created attachment 158256 [details] [review]
Bug 21431: Add action parameter to set_password

Added to the call in opac-password-recovery.pl. This allows
differentiating between password change and password reset when
viewing the logs.

Test plan:
Enable BorrowersLog.
Do a password recovery on OPAC.
Check with log viewer for 'RESET PASS' action.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2023-11-02 13:42:46 UTC
Created attachment 158257 [details] [review]
Bug 21431: Add unit test

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2023-11-02 13:42:48 UTC
Created attachment 158258 [details] [review]
Bug 21431: Adjust template for logviewer

Test plan:
Verify that you can filter by reset password.
And that the uppercase code is replaced by a description.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Matt Blenkinsop 2023-11-02 15:51:48 UTC
Created attachment 158268 [details] [review]
Bug 21431: Add action parameter to set_password

Added to the call in opac-password-recovery.pl. This allows
differentiating between password change and password reset when
viewing the logs.

Test plan:
Enable BorrowersLog.
Do a password recovery on OPAC.
Check with log viewer for 'RESET PASS' action.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 8 Matt Blenkinsop 2023-11-02 15:51:50 UTC
Created attachment 158269 [details] [review]
Bug 21431: Add unit test

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 9 Matt Blenkinsop 2023-11-02 15:51:52 UTC
Created attachment 158270 [details] [review]
Bug 21431: Adjust template for logviewer

Test plan:
Verify that you can filter by reset password.
And that the uppercase code is replaced by a description.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 10 Marcel de Rooy 2023-11-03 07:16:50 UTC
(In reply to Matt Blenkinsop from comment #9)
> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>

Thx Matt !
Comment 11 Martin Renvoize 2023-11-08 12:29:30 UTC
Created attachment 158660 [details] [review]
Bug 21431: Add action parameter to set_password

Added to the call in opac-password-recovery.pl. This allows
differentiating between password change and password reset when
viewing the logs.

Test plan:
Enable BorrowersLog.
Do a password recovery on OPAC.
Check with log viewer for 'RESET PASS' action.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2023-11-08 12:29:33 UTC
Created attachment 158661 [details] [review]
Bug 21431: Add unit test

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Martin Renvoize 2023-11-08 12:29:35 UTC
Created attachment 158662 [details] [review]
Bug 21431: Adjust template for logviewer

Test plan:
Verify that you can filter by reset password.
And that the uppercase code is replaced by a description.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2023-11-08 12:30:13 UTC
All working as described.. QA scripts happy and tests passing.

Passing QA
Comment 15 Tomás Cohen Arazi 2023-11-09 17:50:39 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 16 Fridolin Somers 2023-11-11 07:28:54 UTC
Enhancement not pushed to 23.05.x
Comment 17 Katrin Fischer 2023-11-11 09:37:19 UTC
I believe we have a list of these in the manual (I see to remember translating these)