cca / koha_patron_import Goto Github PK
View Code? Open in Web Editor NEWimport patron records from Workday into Koha ILS
Home Page: https://library-staff.cca.edu/cgi-bin/koha/tools/import_borrowers.pl
License: Other
import patron records from Workday into Koha ILS
Home Page: https://library-staff.cca.edu/cgi-bin/koha/tools/import_borrowers.pl
License: Other
Use the CSV mapping of UID<=>Prox numbers to ascertain what a student's Prox number is, then use that number as the barcode instead of their ID number. This way, starting this Fall, new users with the OneCard IDs will be able to swipe those and we don't have to manually add a library barcode to student IDs.
It seems like many students, while their prox numbers haven't changed across multiple prox reports, still don't have them in Koha. But the way the patch_prox_num script works is, to minimize HTTP requests, we just check against the most recent prox report and the last one we have on disk and only consider it a "changed" number if there's a difference there. There seem to be many situations where a student record is created or otherwise update such that their prox falls out of date but the script doesn't catch the change.
Paul sent me a couple example students to work with today. One still has their old cardnumber (not prox) so that should be a good test. We need the script to actually pull the Koha record, check for a prox num difference, and make an update if so. We can get rid of the code that compares a past prox report to the current one.
We should be able to feed the missing patrons JSON file created by the patch_prox_num script into create_koha_csv as that's the natural next step. Right now, you have to rename the missing patrons file (e.g. to employee_data.json) and also edit it so there's a top-level Report_Entry
key pointing to the array of people. The first step is easy but the second is annoying.
In addition to updating patron records with a current prox number from TouchNet, we should also update their names from the Workday data so preferred name changes migrate to Koha automatically. The prox update script should probably just become a general update script intended to be run on a very regular basis. For names, it would be good to allow a dry run to see how many changes we're making and whether there are potential problems. We could start with staff only and add students later, too.
Koha added a middle_name
field in 22.11 and it looks like we have middle names in the WD JSON export for some employees and students, though not all. So we can add a simple conditional check and populate that field if we have it.
Pronouns were also added in 22.11 but info does not appear in the JSON export.
We have phone data in the mobile_phone
property of the student JSON records. Look up the appropriate Koha field to use, then put this data in there. Note the phone numbers are in a variety of formats with no consistency, so if Koha does any validation the imports might fail.
New students have 2 ID numbers and the one printed on their library card is not the one we use in import.
Can we import multiple University ID patron attributes? If we can have a patron with two IDs we can work around this problem.
Rather than an API request for each patron to check their prox number, we could run a simple Koha report which lists username and borrower.cardnumber
pairs to check if a number has changed. This would greatly speed up the script and reduce the number of HTTP requests, but require an additional manual step since we probably don't want it to be a public JSON report.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.