We store an encrypted version of the passwords for vendor's interfaces, but we don't utf8 decode it after it is decrypted
Test plan:
0. Do not apply this patch
1. Create or edit a vendor and add at least one interface with non ascii
characters, eg. émyPassword❤
2. Go to the detail view of the vendor and click the "Show password"
link
=> The password is not correctly utf8-decoded
3. Apply this patch, repeat 2
=> The password is correctly displayed
4. Repeat 1 and 2
=> The password is correctly displayed
Note that maybe we should make sure the encrypt_hex is getting a valid
utf8-encoded variable.
We do not want to intercept /acquisitions/vendors/config
Ideally we should mock it separately
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We don't need to whole list of baskets and subscriptions
(cherry picked from commit 391b4d3b32b57c97bfb7e66ab394020ae7eed0e5)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cae75569e6e8f2bfe5a2e6d3acc111485f81cc1e)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This test is not really needed. It the new window opens correctly the
next test will pass.
And should fail if it does not.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Previous commit 'HistoryCheck now only considers same patron' added the following regression:
HistoryCheck is performed and shown in the OPAC even if no user is authenticated (using ILLOpacUnauthenticatedRequest).
This fixes that. History check is skipped unless a user exists.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit addresses all Hackfest QA related feedback:
1) Update of all strings that required update, including UI messages and
sys pref description
2) Moved the history check information from staffnotes to its own
pipe-separated illrequestattribute 'historycheck_requests'
3) Fix display of ILL request information on the history check screen
(Staff), including proper label naming (e.g. branchcode -> library),
show status description instead of code, uppercase labels.
4) Updated OPAC display to match Staff UI's display of matching history
requests
5) Removed ISSN criteria for matching requests check
6) Update tests accordingly
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Initial implementation checked existing ILLs for same patron and other patrons.
User testing reported ILLs for other patrons are not helpful, and makes this stage
screen show up much more frequently than it should.
This patch simplifies the original implementation to only consider the
patron of the request being placed for an ILL history check.
It also changes the ID matching to only 'DOI' or only 'Pubmed ID' if any of
those is set. This is to minimize scenarios where different articles from
the same journal come up as matching results e.g. same ISSN but different DOI.
It is also updating tests accordingly.
Other QA improvements
Improve HistoryCheck request list:
- Make link external and show icon (to prevent staff member from clicking away from the historyCheck screen unintentionally)
- Show requests' status
- Show requests' placed date
- Add id_prefix to request ID if possible
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
1) Apply patches
2) Run (ignore if using a sandbox):
$ reset_all
3) Visit ILL system preferences:
<staff_url>/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans
4) Enable ILLModule and ILLHistoryCheck system preferences
-- STAFF testing --
5) Create a new ILL request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
6) Pick type = 'Journal article', enter '123' for DOI, '42' for cardnumber and any library. Click create.
7) Repeat 5) and 6). Notice you're now on the 'Request history check' screen. Verify your previous ILL request is listed. Click 'Submit anyway'.
8) Repeat 5) and 6). But pick a different patron cardnumber this time e.g. '23529000035676'.
9) Verify you're not shown the 'Request history check' screen as its a different patron.
-- OPAC testing --
10) Place a new request through the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
11) Pick type = 'Journal article', enter '123' for DOI. Click 'Create'. Notice it shows the 'history check' screen listing the existing requests. Click 'Submit anyway'.
12) Return to the Staff UI:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
13) Click on the latest ILL request. Verify 'History check requests' is displayed and contains information relating to the already existing ILL requests.
-- Bonus testing --
16) Play around with ILLModuleDisclaimerByType and
ILLOpacUnauthenticatedRequest enabled at the same time as
HistoryCheck (easy)
17) Play around with ILLCheckAvailability and AutoILLBackendPriority
enabled at the same time as HistoryCheck
(reach out for help using these preferences)
Run tests:
$ prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
connexion is a product, added to ignore file
tablee -> tables
a few other small corrections
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch splits the controller in two:
* A controller for staff users use
* An unprivileged access controller
A new endpoint is added for publi access:
* `/public/patrons/:patron_id/ill/requests`
The public one makes use of the state-of-the-art in Koha for public
endpoints, using the `$c->auth->public` validation helper and leaving
the (newly added) public path spec with no special permissions
requirements.
The staff-oriented endpoint gets the right permissions added (at least
those used in the main `/ill/requests` endpoint.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ yarn api:bundle
k$ prove t/db_dependent/api/v1/ill_requests.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Wiko <https://www.wiko-berlin.de/>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Having branch transfers in the action logs would help to more fully show the cycle of holds that require transfers.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new syspref LogTransfers
5) Create and finish some transfers, note the new logs in the log
viewer!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
0) If k-t-d, run updatedatabase (ignore this if testing on a sandbox)
1) Enable ILLModule syspref:
{staff_url}/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModule
2) No need to install a backend as 35570 is in the tree
3) On a different browser session, without being lgoged in, access the create ILL request OPAC page directly:
{opac_url}/cgi-bin/koha/opac-illrequests.pl?method=create&backend=Standard
4) Notice you're presented with the login page, as expected
5) Enable ILLOpacUnauthenticatedRequest:
{staff_url}/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLOpacUnauthenticatedRequest
6) Repeat step 3) Notice you now get the create ILL request form, with some additional inputs at the top specific to an unauthenticated request (first name, last name, e-mail address)
6.5) (optional) Confirm the 'Make an Interlibrary loan request' link exists at the bottom of the search results page, while unauthenticated on OPAC:
{opac_url}/cgi-bin/koha/opac-search.pl?idx=&q=music&weight_search=1
This should only show for authenticated OPAC users if ILLOpacUnauthenticatedRequest is off.
7) Test the form, try submitting with some blank fields, change type and library after and before inputing data in the input fields, etc.
8) Submit the form successfully. Notice you're presented with the unauthenticated request submission confirmation screen with a message and request details.
9) Go back to Staff UI, logged in, access ILL requests and confirm the unauthenticated request submitted through the OPAC is there:
{staff_url}/cgi-bin/koha/ill/ill-requests.pl
10) Test that you can add a patron afterwards, if needed, by clicking 'Edit request' on the toolbar of the manage request page, and entering a patron ID
11) Test that you're able to 'confirm' the request by clicking 'Confirm request', as if it was a regular 'NEW' request.
Additional testing:
Make sure existing ILL functionality interacts with this new optional workflow behavior.
For this, we're using ILLModuleDisclaimerByType. ILLCheckAvailability or AutoILLBackendPriority can also be used but require more setup (plugins, credentials, etc)
1) Configure ILLModuleDisclaimerByType, visit
{staff_url}/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=ILLModuleDisclaimerByType
2) Click the 'edit' link at the bottom of the syspref and copy the example code from the description into the text box. Save.
3) Repeat the original test plan from above, but make sure the request type is not 'article' (as that type is bypassed). Use 'journal', for example. Submit the request making sure you fill in all mandatory fields.
4) Notice you're now presented with the ILL request disclaimer screen, hit Submit. Notice the request is created as before.
5) Return to Staff UI, logged in, confirm this 2nd unauthenticated request has been created and the type disclaimer info is stored and presented when viewing the request.
Run tests (k-t-d only):
prove t/db_dependent/Koha/ILL/Request/Config.t
prove t/db_dependent/selenium/opac_ill_requests.t
Sponsored-by: NHS England (National Health Service England)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Add unit tests for testing the new parameter without_restriction_types
of C4::Members::GetBorrowersToExpunge().
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
Test plan:
This test plan involves running a cronjob, not sure how easy this is in the sandboxes
1) In system preferences, click Search and then select the Acquisitions option from the left hand menu
2) Enable MarcOrderingAutomation
3) Paste the following into MarcFieldsToOrder
price: 975$p
quantity: 975$q
budget_code: 975$h
4) Paste the following into MarcItemFieldsToOrder
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l
Now save the sysprefs
5) In the administration homepage, under Acquisition parameters there should now be a link called "MARC order accounts"
6) Click on this and click the New account button
7) Choose a vendor and a budget
8) Enter a description and make sure you don't set a value in the 'Basket name field' input
9) Enter the following in download directory - "/var/lib/koha/kohadev/tmp/koha_kohadev_upload"
10) Select any record matching settings you want (not important for the test plan, this uses the same code as the marc file staging that already exists in Koha)
11) Check Yes under Check for embedded item record data
12) Click submit
13) We now need to upload a MARC file into the directory that we put in the account. The easiest way to do this is through the marc staging tool
14) Navigate to Cataloging > Stage MARC records for import
15) Upload the file attached to this bug using the Choose file button
16) Click Upload file.
17) Leave the page without completing the new form that appears, we don't want to stage this file. The file we uploaded is now in the directory ready for the cronjob to process as if it had been transferred via SFTP.
18) In the CLI run, perl misc/cronjobs/marc_ordering_process.pl -v -c
19) The logging should show that the file has been processed for that account
20) Navigate to Acquisitions
21) Search for the Vendor that you put in the MARC ordering account
22) There should now be a basket titled: '{random_hash}_orderstest.marcxml'
23) In the ordering account, set the 'Basket name field' to be 975$a
24) Repeat steps 14 -22, the basket should now be called "This is the basket name" which has been pulled from the file
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds the borrowernumber as a parameter to the overwrite_calc_fine
plugin hook. E.g., the borrower is needed for calculating graduated fines.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This new hook allows to overwrite the koha standard calculation of fines.
This can be useful if your library has a fine policy with graduated fines
per overdue letter.
To test:
1) Apply patch.
2) Run prove -v t/db_dependent/Circulation/CalcFine.t
3) Run prove -v t/db_dependent/Koha/Plugins/Overdues.t
4) Sign off.
Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This bug will rename the UseEmailReceipts to AutomaticEmailReceipts, to
make it clearer the purpose of this syspref. This is because the receipts
dropdown is no longer conditional, and will always show, even if
AutomaticEmailReceipts is switched off.
To test (steps a-e before applying patch):
a) search sysprefs for 'EmailReceipts'
1) note the name is currently 'UseEmailReceipts'
2) enable this syspref
b) go to members/maninvoice.pl?borrowernumber=51
1) enter an amount (e.g. 100)
2) save & pay, confirm
c) go to members/boraccount.pl?borrowernumber=51
1) note that the receipt dropdown is visible
d) go to members/notices.pl?borrowernumber=51
1) note that a receipt was automatically sent
e) apply the patch, upgrade the db schema
f) search sysprefs for 'EmailReceipts'
1) note the name is now 'AutomaticEmailReceipts'
g) go to members/maninvoice.pl?borrowernumber=51
1) enter an amount (e.g. 100)
2) save & pay, confirm
h) go to members/boraccount.pl?borrowernumber=51
1) note that the receipt dropdown is no longer visible
i) go to members/notices.pl?borrowernumber=51
1) note that a receipt was automatically sent again
j) disable the 'AutomaticEmailReceipts' syspref
k) go to members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=19
1) add a valid email address
k) go to members/maninvoice.pl?borrowernumber=51
1) enter an amount (e.g. 100)
2) save & pay, confirm
l) go to members/boraccount.pl?borrowernumber=51
1) note that the receipt dropdown is now visible
m) go to members/notices.pl?borrowernumber=51
1) note that a receipt was NOT automatically sent
n) go to members/boraccount.pl?borrowernumber=51
1) on any account line where a payment is made, click receipts > email
o) go to members/notices.pl?borrowernumber=51
1) confirm a manual notice has been generated
p) make coffee & have a mini disco
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
to keep the syspref names consistent with the existings values. Also "ES" is not as self-documenting as "Elasticsearch".
No code change, so the test plan stays the same.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Adjust existing and add new
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Currently, when reporting authority field to the bibliographic records,
the merge function uses the first matching authority field.
However, authorities can provide multiple versions of the same field, with
different languages, identified by a code in the $7 field.
French reference for languages codes for example, but any code system could be
used:
https://documentation.abes.fr/sudoc/formats/unmb/DonneesCodees/CodesZone104.htm#$d
This patch introduces the LanguageToReportOnMerge system preference, which
allows to specify a language code.
When set, if there is an authority field with the given language code, it will
be used to report to the bibliographic record.
If the system preference is not set, or there is no matching field, the default
behavior will apply: the first field will be used.
The $7 in the authority field can be in a short or long form:
- the short form is 2 characters long. Example: ba
- the long form is 8 characters long, with the short form in position 5 and 6
(starting from 1). Example: ba0yba0y
Test plan:
----------
1) Edit the 'Personal Name' authority type framework to make the 100 field
repeatable
2) Add an authority with several languages, like this (the order is important):
100 _7ba0yda0y
_a伊東豊雄
100 _7ba0yba0y
_aItō
3) Add a bibliographic record linked to that authority.
(Click on the "tag editor" icon next to the 100$a field in the bibliographic record to
search for the authority, then Search main heading ($a only): contains Itō)
Note that you can choose which version you want when searching for the
authority, under the "Get it!" column
For this example, choose the latin version: Itō
You should now have this in your bibliographic record:
100 _aItō
_92646
4) Edit the authority, you don't have to change anything, just edit and save.
Note that your bibliographic record now looks like this:
100 _7ba0yda0y
_a伊東豊雄
_92646
The first 100 field of the authority has been reported back to the bibliographic
record, regardless of what you chose when selecting the authority.
5) Apply the patch, set the LanguageToReportOnMerge system preference to: 'ba'
6) Edit the authority again, and check that your bibliographic record now looks
like this, according to the system preference:
100 _7ba0yba0y
_aItō
_92646
7) Edit the authority again, but set the $7 of the latin field to its short
form:
100 _7ba0yda0y
_a伊東豊雄
100 _7ba
_aItō
8) Check that the bibliographic record still has the latin field reported:
100 _7ba
_aItō
_92646
9) prove koha/t/db_dependent/Authority/Merge.t
10) Sign-off :)
Sponsored-by: ENSA
Works smoothly, both with UNIMARC/MARC21
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This new method name better reflects the fact that it now creates - and stores - the PseudonymizedTransaction object
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
Run the tests before and after applying this patch:
perl t/db_dependent/Koha/Pseudonymization.t
They should fail before this patch and pass after applying patch.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
These tests prove the bug:
perl t/db_dependent/Koha/Pseudonymization.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>