Giter Site home page Giter Site logo

cca / koha_patron_import Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 481 KB

import patron records from Workday into Koha ILS

Home Page: https://library-staff.cca.edu/cgi-bin/koha/tools/import_borrowers.pl

License: Other

Python 98.45% Shell 1.55%
csv koha-ils patron-attributes patron-record student-records

koha_patron_import's People

Contributors

dependabot[bot] avatar phette23 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koha_patron_import's Issues

Add Prox number as barcode for new patrons

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.

patch_prox should check against actual Koha record

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.

make main scripts work in concert

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.

update names from Workday

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.

include middle names where available

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.

Add phone number to patron record

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.

Workday dual IDs issue

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.

use Koha prox number report

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.