Bug 37360 - Add 'Protected Status' as one of the things that can be updated via Batch Patron Modification tool
Summary: Add 'Protected Status' as one of the things that can be updated via Batch Pat...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jake Deery
QA Contact: Testopia
URL:
Keywords:
Depends on: 36085 37755
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-15 12:00 UTC by Andrew Auld
Modified: 2024-11-13 17:14 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 37360: Add protected as a borrower mod option (7.48 KB, patch)
2024-09-02 09:55 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 37360: Add protected as a borrower mod option (7.54 KB, patch)
2024-09-03 15:28 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 37360: (follow-up) added bool type to modborrowers (3.21 KB, patch)
2024-10-04 11:37 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 37360: Add protected as a borrower mod option (7.59 KB, patch)
2024-10-18 13:37 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 37360: (follow-up) added bool type to modborrowers (3.27 KB, patch)
2024-10-18 13:37 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 37360: Add protected as a borrower mod option (7.39 KB, patch)
2024-10-24 14:35 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 37360: (follow-up) added bool type to modborrowers (3.22 KB, patch)
2024-10-24 14:35 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 37360: Add protected as a borrower mod option (7.49 KB, patch)
2024-10-24 14:38 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 37360: (follow-up) added bool type to modborrowers (3.27 KB, patch)
2024-10-24 14:38 UTC, Jake Deery
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Auld 2024-07-15 12:00:55 UTC
The new 'Protected Status' characteristic is something that could usefully be included as editable via Batch Patron Modification.

Please consider adding.
Comment 1 Chanel Wheeler 2024-08-02 21:02:27 UTC
+1
Comment 2 Jake Deery 2024-09-02 09:55:18 UTC
Created attachment 170932 [details] [review]
Bug 37360: Add protected as a borrower mod option

This patch adds protected status as a batch borrower modification
option, if the user performing the modification is a superlibrarian.

TO TEST:

a)  login as a superlibrarian
b)  attempt to batch modify these k.t.d user barcodes:
    1)  23529000035676
    2)  23529001000463
    3)  23529000050113
c)  notice that there is no protected option
d)  APPLY PATCH
e)  repeat step b
f)  notice that protected is now an option
g)  set all borrowers to protected (yes)
    1)  notice that the status has changed, in each individual user
	record
h)  set all borrowers to unprotected (no)
    1)  notice that the status has changed, in each individual user
	record
i)  set the proctedted status back to yes, but also set some other
    random options (e.g. city to Cork)
    1)  notice that the city and protected status are both updated
j)  use the disabled checkbox next to protected
    1)  notice that this always sets the protected status to zero
k)  SIGN OFF
Comment 3 Jake Deery 2024-09-02 09:58:18 UTC
Thanks in advance for the sign-off and QA :-)

Jake.
Comment 4 ByWater Sandboxes 2024-09-03 15:28:49 UTC
Created attachment 170991 [details] [review]
Bug 37360: Add protected as a borrower mod option

This patch adds protected status as a batch borrower modification
option, if the user performing the modification is a superlibrarian.

TO TEST:

a)  login as a superlibrarian
b)  attempt to batch modify these k.t.d user barcodes:
    1)  23529000035676
    2)  23529001000463
    3)  23529000050113
c)  notice that there is no protected option
d)  APPLY PATCH
e)  repeat step b
f)  notice that protected is now an option
g)  set all borrowers to protected (yes)
    1)  notice that the status has changed, in each individual user
	record
h)  set all borrowers to unprotected (no)
    1)  notice that the status has changed, in each individual user
	record
i)  set the proctedted status back to yes, but also set some other
    random options (e.g. city to Cork)
    1)  notice that the city and protected status are both updated
j)  use the disabled checkbox next to protected
    1)  notice that this always sets the protected status to zero
k)  SIGN OFF

Signed-off-by: Catrina <catrina@bywatersolutions.com>
Comment 5 Catrina Berka 2024-09-03 15:30:04 UTC
Test plan works as described. Selecting the box to clear the value on "Protected" sets the users to "No" (not protected) - some clarifying helper text might be useful there.
Comment 6 Jake Deery 2024-09-04 08:00:58 UTC
Thanks for the sign-off, Catrina. I could add a tooltip, but it might also be worth considering properly documenting this?

Jake.
Comment 7 Nick Clemens (kidclamp) 2024-09-16 19:29:01 UTC
Just curious, why push, push, unshift for the options for the dropdown? 
Could you just define them all at once or push the empty option first?

I think the bigger issue is that the values will not be translatable, failing for this


You also change the check for empty fields from a truth check to only assigning if not empty string, then checking if defined, is there a reason for that?
Comment 8 Jake Deery 2024-10-04 11:08:17 UTC
Thanks for the feedback. Because this hasn't been done before, I sort of adapted what's there. I guess the solution would be to put the Yes/No text within the template? I can put together a follow-up to address this.

Jake.
Comment 9 Jake Deery 2024-10-04 11:37:59 UTC
Created attachment 172385 [details] [review]
Bug 37360: (follow-up) added bool type to modborrowers

This follow-up patch adds a bool type to modborrowers, so that the
options can be translated within the template files.
Comment 10 Jake Deery 2024-10-04 11:38:40 UTC
All done – thanks for the FQA on this one. I think this is a much cleaner solution.

Jake.
Comment 11 Kristi 2024-10-11 18:53:40 UTC
Looks like this one has been signed off already. Should it be marked as Signed off status?
Comment 12 Brendan Lawlor 2024-10-18 13:37:26 UTC
Created attachment 172977 [details] [review]
Bug 37360: Add protected as a borrower mod option

This patch adds protected status as a batch borrower modification
option, if the user performing the modification is a superlibrarian.

TO TEST:

a)  login as a superlibrarian
b)  attempt to batch modify these k.t.d user barcodes:
    1)  23529000035676
    2)  23529001000463
    3)  23529000050113
c)  notice that there is no protected option
d)  APPLY PATCH
e)  repeat step b
f)  notice that protected is now an option
g)  set all borrowers to protected (yes)
    1)  notice that the status has changed, in each individual user
	record
h)  set all borrowers to unprotected (no)
    1)  notice that the status has changed, in each individual user
	record
i)  set the proctedted status back to yes, but also set some other
    random options (e.g. city to Cork)
    1)  notice that the city and protected status are both updated
j)  use the disabled checkbox next to protected
    1)  notice that this always sets the protected status to zero
k)  SIGN OFF

Signed-off-by: Catrina <catrina@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 13 Brendan Lawlor 2024-10-18 13:37:28 UTC
Created attachment 172978 [details] [review]
Bug 37360: (follow-up) added bool type to modborrowers

This follow-up patch adds a bool type to modborrowers, so that the
options can be translated within the template files.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 14 Jake Deery 2024-10-24 14:35:33 UTC
Created attachment 173273 [details] [review]
Bug 37360: Add protected as a borrower mod option

This patch adds protected status as a batch borrower modification
option, if the user performing the modification is a superlibrarian.

TO TEST:

a)  login as a superlibrarian
b)  attempt to batch modify these k.t.d user barcodes:
    1)  23529000035676
    2)  23529001000463
    3)  23529000050113
c)  notice that there is no protected option
d)  APPLY PATCH
e)  repeat step b
f)  notice that protected is now an option
g)  set all borrowers to protected (yes)
    1)  notice that the status has changed, in each individual user
	record
h)  set all borrowers to unprotected (no)
    1)  notice that the status has changed, in each individual user
	record
i)  set the proctedted status back to yes, but also set some other
    random options (e.g. city to Cork)
    1)  notice that the city and protected status are both updated
j)  use the disabled checkbox next to protected
    1)  notice that this always sets the protected status to zero
k)  SIGN OFF
Comment 15 Jake Deery 2024-10-24 14:35:42 UTC
Created attachment 173274 [details] [review]
Bug 37360: (follow-up) added bool type to modborrowers

This follow-up patch adds a bool type to modborrowers, so that the
options can be translated within the template files.
Comment 16 Jake Deery 2024-10-24 14:37:05 UTC
Ah whoops, removed the SO lines... one tick
Comment 17 Jake Deery 2024-10-24 14:38:46 UTC
Created attachment 173275 [details] [review]
Bug 37360: Add protected as a borrower mod option

This patch adds protected status as a batch borrower modification
option, if the user performing the modification is a superlibrarian.

TO TEST:

a)  login as a superlibrarian
b)  attempt to batch modify these k.t.d user barcodes:
    1)  23529000035676
    2)  23529001000463
    3)  23529000050113
c)  notice that there is no protected option
d)  APPLY PATCH
e)  repeat step b
f)  notice that protected is now an option
g)  set all borrowers to protected (yes)
    1)  notice that the status has changed, in each individual user
	record
h)  set all borrowers to unprotected (no)
    1)  notice that the status has changed, in each individual user
	record
i)  set the proctedted status back to yes, but also set some other
    random options (e.g. city to Cork)
    1)  notice that the city and protected status are both updated
j)  use the disabled checkbox next to protected
    1)  notice that this always sets the protected status to zero
k)  SIGN OFF

Signed-off-by: Catrina <catrina@bywatersolutions.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 18 Jake Deery 2024-10-24 14:38:54 UTC
Created attachment 173276 [details] [review]
Bug 37360: (follow-up) added bool type to modborrowers

This follow-up patch adds a bool type to modborrowers, so that the
options can be translated within the template files.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 19 Jake Deery 2024-10-24 14:39:16 UTC
Those patches are now rebased on main :-)

Jake.
Comment 20 Jake Deery 2024-11-13 17:14:29 UTC
Any chance of a QA for this one in time for 24.11?