- Decide on a file format to store a list of IDs and names that can be deployed via the settings repo
- Some IDs will repeat as we want to list all subsidiaries with the parent company's ID
- Decide on a caching strategy (memcache?) to cache either the whole list or specific lookups
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T228765 Epic: matching gifts HEP integration (was employer field V2) | |||
Resolved | None | T249921 Create employer autocomplete for payments-wiki | |||
Resolved | jgleeson | T251199 Backend - Create MW API to expose employer data |
Event Timeline
Change 594330 had a related patch set uploaded (by Jgleeson; owner: Jgleeson):
[mediawiki/extensions/DonationInterface@master] WIP: Create MW API to expose employer data
To test this patch:
- Add a csv to a location accessible form within your paymentswiki install and populate it with rows of company data consisting of 'id,name' format. (no single quotes)
- Add $wgDonationInterfaceEmployersListDataFileLocation to your LocalSettings.php and set it to the full path of the file you've just created.
You can then jump right in and test with the API Explorer via this URL (vagrant users):
https://payments.wiki.local.wmftest.net:4430/w/index.php?title=Special:ApiSandbox#action=employerSearch&format=json&employer=abc
Or you can also pull down the frontend patch here and then:
- Open up a donation form and append '&variant=employer' to the URL
I went ahead and tested it and it works! I'm curious though what the plans are for testing and adding caching. If it's outside the scope of this ticket, I'm probably good to +2 after a closer line reading of the code, but just wanted to check what we're thinking there.
From @jgleeson in irc chat: hey mepps thanks for reminded me about caching them employers data. It looks like we missed that part off the tech-talk idea that I was working from but now looking at the code I think it would benefit from some type of in-memory cache. we did chat about redis as an alternative to the csv but I guess we could also use them together to compliment each other. I'm gonna look at how that'll work.
Change 594330 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Create MW API to expose employer data
Change 605633 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/DonationInterface@master] Doc and default value for wgDonationInterfaceEmployersListDataFileLocation
Change 605633 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Doc and default value for $wgDonationInterfaceEmployersListDataFileLocation