Bug 19793 - Add email to batch patron modification
Summary: Add email to batch patron modification
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: David Roberts
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 27413
  Show dependency treegraph
 
Reported: 2017-12-11 20:51 UTC by Patrick Robitaille
Modified: 2021-01-12 10:47 UTC (History)
7 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
With this enhancement the primary email of patrons can be changed using the batch patron modification tool.
Version(s) released in:
20.05.00


Attachments
Bug 19793 - Add a field for email in batch patron modification (3.74 KB, patch)
2020-01-14 09:13 UTC, David Roberts
Details | Diff | Splinter Review
Bug 19793 - Add a field for email in batch patron modification (3.80 KB, patch)
2020-01-14 12:20 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 19793: Add a field for email in batch patron modification (4.38 KB, patch)
2020-01-20 21:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19793: Change label to match patron record: Primary email (2.07 KB, patch)
2020-01-20 21:50 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Robitaille 2017-12-11 20:51:16 UTC
Hi, 

It could be nice in batch patron modification tool's to add a new field for the email adrress. 

Patrick.
Comment 1 Katrin Fischer 2017-12-11 20:57:13 UTC
Hi Patrick, can you explain the use case?
Comment 2 Patrick Robitaille 2017-12-11 21:04:16 UTC
Hi,

This would be to avoid having to export data and import them again to change the user's email address. Because it possible to change the email adrress when you import a patron' field in default values.

Patrick.
Comment 3 Katrin Fischer 2017-12-11 21:08:47 UTC
Hi Patrick, sorry, I was not clear. I was wondering, because with batch patron modification you can only set to 1 value (same email for all) or empty a field out. Wondering what the use case is where you want to do that.
Comment 4 Sally 2017-12-12 12:36:12 UTC
Hi Katrin,

We have this as a local customisation on our install and it's saved hours.

We use it when we receive bouncebacks; we simultaneously empty the e-mail address field and add both circulation and OPAC messages to advise the patron/branch staff of the failure.
Comment 5 Liz Rea 2017-12-13 02:23:09 UTC
Adding the ability to batch modify a bunch of borrowers email fields to null might be useful, can see how that might be nice for librarians.
Comment 6 Liz Rea 2017-12-13 02:23:48 UTC
But I don't see much utility in allowing librarians to batch set a whole bunch of borrowers emails to the same thing.
Comment 7 Katrin Fischer 2017-12-13 06:16:34 UTC
Setting to the same might be interesting for testing, even if a rare case. I agree emptying out would make sense in some cases. 

Thx for being patient with me :) It's often interesting to learn why people want/need a thing and sometimes it helps to come up with an even better solution.
Comment 8 Patrick Robitaille 2017-12-14 16:02:31 UTC
Hi, 

This is for a particular demand form a library how have not acces to personal email adress of users. This new field will be used to add the same email address to be able to receive overdue notifications and then send them via another email platform that uses the host institution of the library which is actually the educational institution.

Patrick.
Comment 9 David Roberts 2020-01-14 09:13:28 UTC
Created attachment 97335 [details] [review]
Bug 19793 - Add a field for email in batch patron modification
Comment 10 David Roberts 2020-01-14 10:15:39 UTC
To test:

1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to edit
3) Add some data (e.g. test@foobar.com) into the Email address field, and click Save
4) The Primary Email address in the user record should now contain your email address
5) Test that running the tool again with the option to delete the data clears the field correctly
6) Repeat steps 1-5 with a file of user borrowernumbers
Comment 11 ByWater Sandboxes 2020-01-14 12:20:45 UTC
Created attachment 97347 [details] [review]
Bug 19793 - Add a field for email in batch patron modification

Signed-off-by: Sal <sally.healey@cheshiresharedservices.gov.uk>
Comment 12 Martin Renvoize 2020-01-14 15:30:00 UTC
Sponsored by PTFS-Europe
Comment 13 Katrin Fischer 2020-01-20 21:41:48 UTC
Hi Patrick, there are some small things that I've fixed in the patch for you:

1) Please make sure your editor uses 4 spaces instead of tabs, tabs are forbidden :)

 FAIL	tools/modborrowers.pl
   OK	  critic
   FAIL	  forbidden patterns
		forbidden pattern: tab char (line 267)
		forbidden pattern: tab char (line 268)
		forbidden pattern: tab char (line 269)
		forbidden pattern: tab char (line 270)
		forbidden pattern: tab char (line 271)
		forbidden pattern: tab char (line 272)

2) Make sure you include the test plan in your commit message.

3) Make sure you start the first line of your commit message with Bug XXXX: (not - as in bugzilla).

I'll continue testing and upload the patch later.
Comment 14 Katrin Fischer 2020-01-20 21:50:09 UTC
Created attachment 97647 [details] [review]
Bug 19793: Add a field for email in batch patron modification

This adds the email field to the patron batch modification tool.

To test:

1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to edit
3) Add some data (e.g. test@foobar.com) into the Email address field, and click Save
4) The Primary Email address in the user record should now contain your email address
5) Test that running the tool again with the option to delete the data clears the field correctly
6) Repeat steps 1-5 with a file of user borrowernumbers

Signed-off-by: Sal <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2020-01-20 21:50:13 UTC
Created attachment 97648 [details] [review]
Bug 19793: Change label to match patron record: Primary email

As we have multiple email fields in the patron record, we should
be clear which one can be changed from the batch mod now. Easiest
is to use the same label.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 David Roberts 2020-01-20 22:52:44 UTC
Thanks Katrin, I didn't know that. I'll try to do that in future! Thanks for QA'ing the patch and for your changes.

David (apparently AKA Patrick! :-D )


(In reply to Katrin Fischer from comment #13)
> Hi Patrick, there are some small things that I've fixed in the patch for you:
> 
> 1) Please make sure your editor uses 4 spaces instead of tabs, tabs are
> forbidden :)
> 
>  FAIL	tools/modborrowers.pl
>    OK	  critic
>    FAIL	  forbidden patterns
> 		forbidden pattern: tab char (line 267)
> 		forbidden pattern: tab char (line 268)
> 		forbidden pattern: tab char (line 269)
> 		forbidden pattern: tab char (line 270)
> 		forbidden pattern: tab char (line 271)
> 		forbidden pattern: tab char (line 272)
> 
> 2) Make sure you include the test plan in your commit message.
> 
> 3) Make sure you start the first line of your commit message with Bug XXXX:
> (not - as in bugzilla).
> 
> I'll continue testing and upload the patch later.
Comment 17 Katrin Fischer 2020-01-21 06:56:08 UTC
(In reply to David Roberts from comment #16)
> Thanks Katrin, I didn't know that. I'll try to do that in future! Thanks for
> QA'ing the patch and for your changes.
> 
> David (apparently AKA Patrick! :-D )

Sorry for that, apparently I was looking at the wrong comments :(
Comment 18 Martin Renvoize 2020-01-21 11:36:44 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 19 Joy Nelson 2020-02-06 22:34:10 UTC
Enhancement not backported to 19.11.x