https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41145

--- Comment #11 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 190150
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190150&action=edit
Bug 41145: Do not delete the existing extended_attribute values when importing
patrons

Since bug 26744 was upstreamed when you use the Import patron tool or the
import_patrons.pl script from the commandline and pass a
preserve-extended-attributes parameter the borrowerlogs inaccurately have an
entry added where the attribute 'before' value is empty.

Test plan:
1. Create a patron attribute type named 'INSTID': Koha administration > Patrons
and circulation > Patron attribute types > New patron attribute type.
2. Download the patron started CSV from: Tools > Import patrons > click the
'Download a Starter CSV file with all the columns.' link
3. Save values in the: cardnumber, surname, firstname, branchcode,
categorycode, auth_method, lang, and patron_attributes columns
4. Make sure your value in the patron_attributes column is INSTID:1234
5. Import this csv file:
cd misc
./import_patrons.pl --file <filename>.csv --matchpoint cardnumber --default
branchcode=CPL --overwrite --preserve-extended-attributes --verbose --verbose
--confirm

6. Navigate to the patron account in your browser
7. Click 'Modification log' and observe how many entries there are
8. Repeat step 5
9. Notice there is a new entry in your Modification log with an info column
value of: { "attribute.INSTID" : { "after" : "1234", "before" : "" } }
10. Repeat step 5 and notice another new entry in the Modification log with an
empty "before" value

11. Apply patch
12. Repeat step 5 and notice no new entry in the Modification log
13. Edit your csv and change the patron_attributes value to: INSTID:5678
14. Repeat step 5 and notice the new modification log entry with an info column
value of: { "attribute.INSTID" : { "after" : "5678", "before" : "1234" } }

15. Add another new patron attribute type to your Koha named 'home'
16. edit your csv and change the patron_attributes value to:
INSTID:5678,home:town
17. Repeat step 5
18. Notice a new Modification log entry with the value of: { "attribute.home" :
{ "after" : "town", "before" : "" } }

Sponsored-by: Auckland University of Technology
Signed-off-by: David Nind <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to