To test:
1 - Have something on the SCO page that won't load
Add to SCOUserJS:
</script>
<img src="http://localhost:8080/silk/famfamfam.png"/>
<script>
2 - Enable the SCO and SCI system preferences:
WebBasedSelfCheck: Enable
SelfCheckInModuke: Enable
AutoSelfCheckAllowed: Allow
AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions
3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user
4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl
5 - Sign in using a patron
6 - Enter an unkown barcode, I used "DONTMATTER"
7 - If not logged out, click to 'Return to account summary'
8 - You are asked to sign in again
9 - Repeat with the SCI module
10 - Apply patch
11 - Repeat, but this time you can return to account
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5bab87f76b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 240f526d06)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
As suggested by David Nind. Thanks!
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b4ce5051c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c46d122fc1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
No need to carp about empty basket or no reply address.
Just add a simple explanation on the form.
Note that it makes no sense to show the form if the patron
has no email address. We need it as reply-to.
Test plan:
Try opac-sendbasket.pl?bib_list=null
Remove email address from your account, try again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35293612a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3266b9d5bc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
When misc/devel/install_plugins.pl does not find any plugins, it prints
the list of pluginsdir, but with a literal \n separating the dirs, and
no newline at the end.
To test:
- Edit koha-conf.xml and add a second entry for <pluginsdir>, so there
are two entries. The second one could just be a copy of the original.
- Run "perl misc/devel/install_plugins.pl"
- Note the output looks something like this:
No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins\n/var/lib/koha/kohadev/pluginsroot@kohadevbox:koha(master)$
- Apply the patch and run the script again. Output should be:
No plugins found
pluginsdir contains:
/var/lib/koha/kohadev/plugins
/var/lib/koha/kohadev/plugins
root@kohadevbox:koha(master)$
- Sign off
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4848def5e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f2a05fadd0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch makes the test independent from existing cash registers in
the system.
To test:
1. Enable UseCashRegisters on a fresh KTD
2. Add a cash register
3. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/cashups.t
=> FAIL: Tests fail!
4. Apply this patch
5. Repeat 3
=> SUCCESS: Tests pass!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4436a7d41a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19b543a51b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Resolve: Can't call method "metadata" on an undefined value at catalogue/MARCdetail.pl line 93
The proceeding lines check for $record and respond appropriately.
Test plan:
Call catalogue/MARCdetail.pl with an unexisting biblionumber.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a37ebc77b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d45bf88a9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha serves static .js files as application/javascript (if /etc/mime.types
says to) and serves them compressed, but output_with_http_headers uses the
currently-correct text/javascript mimetype, and Koha doesn't compress that.
Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable.
2. Open the browser Web Developer Tools to the Network tab
3. Load Cataloging - Advanced editor
4. Click on the line for the framework?frameworkcode=&callback=define load
5. Note the content-type text/javascript, no Content-Encoding line, and
the size of 1.9MB
6. Apply the patches from bug 36463 if they haven't been pushed, then this
patch, and reset_all
7. Repeat steps 1-4, and note a Content-Encoding: gzip header and a
Transferred size around 160KB
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>
(cherry picked from commit c52af2cef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e0c3032b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch simply adds application/json to the mod_deflate configuration
To test:
1 - Open the netowrk tab in firefox
2 - Load http://localhost:8081/api/v1/libraries
3 - Not the transferred size, and note no 'Content-Encoding: gzip" header
4 - Apply patch, reset_all (or edit /etc/koha/apache-shared.conf)
5 - Reload
6 - Note smaller size, note gzip header
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bccf7764c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d8afbbf661)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To Test:
1. Choose a User Eligible for a Guarantor:
1. Modify the user profile to include a new guarantor.
2. Upon selecting a guarantor, ensure that the empty option in the 'Relationship' dropdown appears as a blank box.
2. Select a User Eligible for a Guarantee:
1. Navigate to "Add Guarantee" in the top menu.
2. Verify that the guarantor field is automatically populated with the selected user.
3. Confirm that the 'Relationship' dropdown displays the empty option as 'Empty record.'
3. Apply Patch and Refresh the Page for Step 2:
1. After applying the patch, refresh the page for step 2.
2. Ensure that the empty option value for 'Relationship' is now displayed as blank.
4. Sign Off and Have a Great Day! 😊🎉#
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9de44f00f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75c3ff228e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Before applying the patch:
2. In the staff interface, navigate to a patron
3. Add a new staff message that contains multiple lines (e.g. using
enter for the next line)
4. Save the message and check the display.
It will be a single line.
5. Apply the patch and navigate back to the
patron
6. The message should now be displayed as multiple lines.
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>
(cherry picked from commit 5e8059a6f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 54bb9ffe16)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
In the Staff interface, when viewing (or editing) the authority MARC
subfield structure for a particular field, the Home button breadcrumb
on the top left of the screen appears twice.
This patch fixes that.
Test plan:
1) Try to view (or edit) the authority MARC subfield structure for
a particular field. Notice the 'Home' breadcrumb button/icon is
appearing twice.
2) Apply this patch.
3) Refresh the page, the 'Home' breadcrumb icon should now appear
only once.
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7df7819cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f7d4ca168)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
I lost too much time trying to know what the translation script outputs
sh: 1: Syntax error: end of file unexpected
To recreate:
touch 'koha-tmpl/intranet-tmpl/prog/en/modules/<' (yes, don't ask!)
koha-translate -i de-DE --dev kohadev
or
koha-translate -u de-DE --dev kohadev
And you get the shell error without any ideas what's happening!
With this patch applied you will not get any errors because the quote
will actually copy the file (what is expected).
But without the quote the cp command will fail and the explanation will be
displayed
sh: 1: Syntax error: end of file unexpected
Cannot copy /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/< to /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/de-DE/modules/< at /kohadevbox/koha/misc/translator/tmpl_process3.pl line 385.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0026ee3e97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2001b853f4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Since (a long time ago!)
commit 62aa3f4292
Bug 17216: Use Koha::AVC from mss.pl
This $sth2 is never fetched, we are retrieving the AV cat using
Koha::AV::Categories
Sponsored-by: The Research University in the Helmholtz Association (KIT)
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>
(cherry picked from commit 4158783eb2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a2ea0291e7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31422 implemented a warning sign, when a patron has a patron category that you are not allowed to set due to library limitations on the code.
It should appear right next to the field, but might appear on the other side of the page now being easily missed.
This patch simply removes the float:right CSS rule.
To test:
* User's login branch and home library is: Centerville
* Patron category "B - Board" is limited to Franklin
* Create a new patron: Board doesn't show
* Edit an existing patron with another patron category: Board doesn't show
* Edit a patron with Board category from Centerville
=> Check the warning icon with the tooltip is close to the category select
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7356a5cbd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3ba6bb9cdf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch fixes the syntax in marc21-retrieval-info-auth-dom.xml,
so that one can use the Zebra special retrieval elements documented
at https://software.indexdata.com/zebra/doc/special-retrieval.html
These are very useful when troubleshooting issues with authority
records in Zebra.
Test plan (using KTD):
1. yaz-client unix:/var/run/koha/kohadev/authoritysocket
2. Enter these commands:
. base authorities
. format xml
. elements zebra::snippet
. find e
. show 1
3. Result = diagnostic message:
Diagnostic message(s) from database:
[25] Specified element set name not valid for specified database
-- v2 addinfo 'zebra::snippet'
4. Apply the patch
5. Copy updated file: sudo cp debian/templates/marc21-retrieval-info-auth-dom.xml
/etc/koha/marc21-retrieval-info-auth-dom.xml
6. Stop and restart zebra (no need to rebuild the Zebra index):
. sudo koha-zebra --stop kohadev
. sudo pkill zebrasrv
. sudo koha-zebra --start kohadev
7. Repeat commands in step 2.
8. Result from show 1 = XML output:
Sent presentRequest (1+1).
Records: 1
Record type: XML
<record xmlns="http://www.indexdata.com/zebra/">
<snippet name="Any" type="w">Gontarski, S. <s>E</s></snippet>
</record>nextResultSetPosition = 2
Elapsed: 0.013929
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>
(cherry picked from commit 10d5f6ef37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f129c009a4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 10950 adds a pronouns text field to the patron record.
Currently it is hidden by system preference 'HidePersonalPatronDetailOnCirculation'.
This patch moves pronouns outside this system preference influence.
Test plan:
1) Add pronouns to a patron
2) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Don't hide"
3) Check you see pronouns in circulation page
/cgi-bin/koha/circ/circulation.pl?borrowernumber=X
4) Set system preference 'HidePersonalPatronDetailOnCirculation' to "Hide"
5) Refresh circulation page
=> Without patch pronouns are hidden
=> With patch pronouns are displayed
Signed-off-by: Hebah <hebah@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 07738adbf0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a728c65828)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. APPLY PATCH
2. Set up circ rules to allow for auto renewals.
3. Set AutoRenewalNotices to 'according to message prefs'
4. Make a branch specific version of the the AUTO_RENEWAL notice.
5. Find a patron belonging to that branch and set the message prefs to allow for a AUTO_RENEWAL. But no digest option!
6. Check some things out and make sure they are eligble for auto renewal.
7. Run the cron.
8. Make sure the patron gets the branch specific notice.
9. Delete the branch specific notice.
10. DO 6-7 again.
11. Make sure they now get the all library notice.
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied one line.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ade75ea561)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8607c04099)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
1) Add a basic circulation rule like : 0 hold allowed on patron category
'A' and set AllowHoldPolicyOverride to 'Allow'
2) Make a hold on a patron belongs to this category
3) Normally you should see a warning on item (override needed) but it's
not the case
4) Apply this patch
5) Refresh and repeat step 2
This patch comes from an alternative patch on the original bug (I'm including
the original test plan for your information) :
(Bug 30687 - alternative patch): Always allow to force hold pickup location
If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.
This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.
Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
pickup library match" is "item's home library"
6. Try to place a hold on biblio B
You should not be able to place a hold because there is no valid
pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
You should now see all valid pickup locations in a dropdown list
(with an exclamation mark in front of each option) with none selected
by default
9. Verify you can place a title-level hold and an item-level hold
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>
(cherry picked from commit 805ea1a00e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 204b5c76ce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This reverts commit ab93008da7.
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>
(cherry picked from commit 33da81f9fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aa149ff575)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Currently the index `pl` points to 008/15-17. It should
(additionally/instead?) point to 260a and/or 264a.
Test plan (for koha-testing-docker with ElasticSearch via `ktd --es7 up`)
Verify the old/broken behaviour:
* Go to Staff/Advanced Search
* Select "Publisher Location" and enter "cau", start search
* You will get some hits (~16), eg "Perl best practices / Damian Conway", which has 008 of "051222s2005 caua b 001 0 eng d" with "cau" on 15-17
* Edit this record (cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=5)
* Inspect 260$a, which should containt "Sebastopol, CA :"
* Go back to Advanced Search and search for "Publisher Location" = "Sebastopol"
* No hits!
Apply the patch!
* exit ktd and stop it (ktd --es7 down; ktd --es7 stop)
* start it again
* Go to Staff / Administration / Search Engine Config (Elasticsearch)
* Click on the Tab "Bibliographic records" and search/filter for "pl"
* you should see 3 entries for "pl", with Mapping values of "008_/15-17", "260a" and "264a"
* Go to Search,
* Select "Publisher Location" and enter "cau", start search
* same hits as befor
* Search again, but for "Sebastopol"
* Now you'll get 9 hits!!
Bonus: Test 264a
* Got to Admin / MARC bibl framework, select BKS -> MARC structure
* search for tag "264", edit subfields
* in tabs a, b, c: Check the "Editor" Checkbox (Visibility)
* Save changes
* find a book, eg again "Perl best practices" and edit it
* find field 264 and enter "Test" into 264a, Save
* Depending on your setup, you might have to manually re-index the book:
* enter ktd: ktd --shell
* reindex the one book (via --bn) or all (might also need a -d)
/usr/share/koha/bin/search_tools/rebuild_elasticsearch.pl -v -b -d
* Go again to Advanced Search, Publisher Location = "Test"
* You should find the book
If your NOT running ktd, you might be able to just edit the ElasticSearch Mappings to add / change the mapping for "pl" to point to "260a".
One rather harsh way to do this (which I needed to do, because the ES Mappings UI did not work for me) is via this SQL:
update search_marc_map set marc_field='260a' where marc_field='008_/15-17';
Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit df9bc0b86a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 342c65a680)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds a safe guard for when consumers pass _per_page=0 to
endpoints. This condition is checked for on a centralized place and
avoid reaching the controller in such scenarios that would provoke a
division by zero exception.
To test:
1. Apply the regression tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/pagination.t
=> FAIL: We expect a 400, but get a 500 instead
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! No more explosions for this!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 308bb0830c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b1e9ef93f2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9a4e3bd49f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9e8657aba7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
It appears this bug introduces the first actual use of this function in
the OPAC and thus exposes that bug 31261 didn't fully port the
Date_from_syspref from the intranet.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04d3cf07a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab7a3ff196)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds the flatpickr-futureinclusive data to the input field
for "Hold starts on date" in the OPAC.
We also add 'flatpickr-future' data to the input field for expiration
date as it also doesn't make sense to allow this to be a past data
either.
Test plan
1) Attempt to place a hold on an item from the OPAC
2) Expand the 'Show more options' dropdown
3) Note that without the patch 'Hold not needed after' allows setting to
a date in the past.
4) Enable `AllowHoldDateInFuture` and `OPACAllowHoldDateInFuture` system
preferences
5) The 'Hold starts on date' option should now appear if you refresh
your hold placing page in the OPAC.
6) Note that the above input also allows setting a past date
7) Apply patch
8) Neith input should allow past dates now.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c16ec21f4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e3bfca4f02)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha::Object depends on Koha::DateUtils, which depends on C4::Context,
which depends on Koha::Config::SysPref, which depends on... Koha::Object
Apart from the circular dependency, the dependency on C4::Context alone
is problematic as it loads a bunch of modules that are not needed at all
in Koha::Object (YAML::XS and ZOOM for instance).
As Koha::Object is used as a base for a lot of modules, we should take
care to only load the minimum required.
This patch moves some date parsing code to specific modules:
- Koha::DateTime::Format::RFC3339
- Koha::DateTime::Format::SQL
and it uses them in Koha::Object and Koha::DateUtils where it is
possible.
Test plan:
1. Do not apply the patch yet and run the following command:
`perl -cw Koha/Object.pm`
It should print several warnings about redefined subroutines, meaning
there is a circular dependency.
2. Apply the patch
3. Run `perl -cw Koha/Object.pm`. It should only say:
"Koha/Object.pm syntax OK"
4. Run the following command:
prove \
t/DateUtils.t \
t/Koha/DateTime/Format/RFC3339.t \
t/db_dependent/Koha/Object.t
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8d5299639e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b0c862533d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 31422 added a warning message when library limitations issue in patron edition page.
We should add this patron's messages in circ and details pages.
Like age limitations.
Test plan:
1) User's login branch and home library is: Centerville
2) Patron category "B - Board" is limited to Franklin
3) Edit a patron with Board category from Centerville
4) A message appears "The patron's current category (Board) is limited to other libraries."
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 841dc00ec8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ebd8a50e6e)
We aren't actually doing any error handling with the RequireJS waitSeconds
config, just leaving the advanced editor hanging on loading if it times out,
so instead we should disable it.
Test plan:
1. Set the preference EnableAdvancedCatalogingEditor to Enable
2. Load the Cataloging module home page in Firefox and open Firefox's
Web Developer Tools, and in the Network tab change from "No Throttling"
to "Regular 2G"
3. In the Cataloging page, click Advanced editor, and watch it attempt to
load for 30 seconds, followed by a setTimout error in the devtools console,
and then wait as long as you can stand for anything but the "Loading,
please wait..." to happen in the web page. Nothing ever will.
4. Apply the patch, restart, set EnableAdvancedCatalogingEditor back to
Enable, turn throttling on, load the Advanced editor again, and note that
even though it will take a minute or more to load through the throttling,
the editor does actually load.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 95394217f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c305b46821)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
If something explodes in Koha::REST::V1::Auth chances are that no logging will happen.
This patch makes sure they are!
To test:
1. Make sure you do NOT have 36420 on your tree
2. Make sure you are looking at the logs:
$ ktd --shell
k$ koha-plack --restart kohadev; tail -f /var/log/koha/kohadev/*.log
3. Use Postman or similar for hitting some known endpoint. Use
the user's cardnumber instead of the userid. On a default KTD launch, the
generated user's cardnumber is '42'.
GET /patrons
=> FAIL: You get a 500 error (expected, fixed on 36420) but no useful logging found.
4. Apply this patch
5. Ctrl+c on the logs and re-run the command
6. Repeat 3
=> SUCCESS: You get a 500, but you also get the exception information logged!
7. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[OK] prove t/db_dependent/api/v1/items.t t/db_dependent/api/v1/unhandled_exceptions.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e518e0be2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0705360fc8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3ed4e096b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 81089c1f24)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 29873200df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e3318be458)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
The issue is caused by these lines in circulation.js:
$("#finesholdsissues a[data-toggle='tab']").on("shown.bs.tab", function(e){
$(this).click();
});
When the user clicks on a hidden tab, 'shown.bs.tab' is triggered and
then another click event is triggered. And because the table was loaded
on tab click, it was loaded twice.
Visually it could have caused the rows to be duplicated (it was random,
probably due to timing, network latency, ...)
I don't know why we need to trigger a click in this case, but removing
this will probably break something else, so the fix here is to load the
table on 'shown.bs.tab' event instead of 'click'
This patch also contains a small fix in refreshReturnClaimsTable which
was reloading the table right after the table initialization.
Test plan:
1. Check out an item, and in the checkouts table, click "Claim returned"
2. Open the network tab of your browser's developer tools
3. Click on the "Claims" tab, verify that only one call is made to
svc/return_claims
4. Verify that the claims table is displayed correctly
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5783d01af0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4183ec10c0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
In commit f1078daf8f
Bug 34219: Allow getAll to receive additional URL parameters
We needed to call getAll instead of get to fetch all the vendors
Test plan:
Have more than 20 vendors and create/edit an agreement.
Notice that the vendor list contains all the vendors
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 17b134fcb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f353bd8d96)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.
To test:
1. Go to Administration > MARC Bibliographic framework test
--> There should be errors indicating subfields from 4XX fields
are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
--> It should now say that all subfields for each tag are in the
same tab (or ignored)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49a7950f38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 676d285a20)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch changes the conditional that determines if a patron attribute is displayed in the patron brief info. Instead of checking the value of the attribute we should check if the attribute is defined.
To test:
1. Create a patron attribute, eg. party_mode, check 'display in patron's brief info' and tie to the YES_NO authorised value.
2. Find a patron and set your attribute to Yes
3. Confirm you see the attribute and its value both in the "Additional attributes and identifiers" section of the patron detail page and in the patron brief info area
4. Set your attribute to No
5. Confirm you see the attribute and its value in "Additional attributes and identifiers" but it no longer shows in the brief info
6. Apply patch and restart_all
7. Notice that your attribute now displays in the brief info, such as Party mode: No
8. Set the attribute to the first empty option
9. Check the patron record brief info to confirm that the attribute does not display when the value is empty.
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 93d3b0b0f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7be415b656)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
XSLT output (if using the example file it should be a link saying
"Authority #<authid>")
Sponsored-by: Écoles nationales supérieure d'architecture (ENSA)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 01e2a6d983)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b63d96612b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To recreate:
1. Select two items from the catalog and begin a merge.
2. Notice that the title of the items, their biblionumber and a
hyperlink to their MARC record is available.
3. Apply the patch and refresh the page. The biblionumber for each title
is now hyperlinked and leads to the item’s bib records.
4. Sign off and have a great day :)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fcbb5fceb8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d7bed4435b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
* Apply patch
* Verify the option "Other" for gender is correctly displayed when:
* Editing a patron record in the staff interface
* Viewing the 'Details' tab of a patron in staff interface
* Triggering a "duplicate" patron warning and looking at the details
of the existing patron record
* Self registering a patron in the OPAC
* Viewing 'Personal details' tab in the OPAC for a registered patron
* If you are using ktd, run: gulp po:update --lang de-DE
* Verify string "gender" appears with the occurences of "Other"and
"Other:" in
misc/translator/Koha-messages.pot
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5f6c0f0c3e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c80f0882bd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Use code instead of name for filtering and escape regexp special
characters.
This patch also disables datatables' smart filtering as it is not
recommended to use with regexp filtering
https://datatables.net/reference/api/search()
Test plan:
1. Create a report in a group named "Foo + Bar" and in a subgroup named
"Baz + Quux"
2. Create other reports in group "Foo + Bar" but in other subgroups, as
well as in other groups. This is useful to see the effect of
filtering
3. Go to the saved reports page and verify that navigating between tabs
have the desired result. Same for the subgroup select
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit de91b2e5d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit de13938d0a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Edit a biblio record
2. Go to the 100 tab and click the plugin launcher icon for an author
tag i.e. next to 100$a
3. Search for an authority and observe the results
4. Notice that the number of times this authority has been "Used" in a
record is now a link, and clicking it does a search showing those
records.
Sponsored-by: Education Services Australia SCIS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 553126e5a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60e2c5d5f6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Table pseudonymized_transactions contains :
KEY `pseudonymized_transactions_ibfk_1` (`categorycode`),
KEY `pseudonymized_transactions_borrowers_ibfk_2` (`branchcode`),
KEY `pseudonymized_transactions_borrowers_ibfk_3` (`transaction_branchcode`)
To improve SQL queries performance, it needs more indexes, specially on itemnumber.
Looking at table statistics :
KEY `timeidx` (`datetime`),
KEY `branch_idx` (`branch`),
KEY `type_idx` (`type`),
KEY `itemnumber_idx` (`itemnumber`),
So index is need on pseudonymized_transactions columns :
itemnumber => For join with table items
transaction_type => For filter on type issue, return ...
datetime => For filter on date, this will help cleanup script
Test plan :
1) Run updatedatabase.pl
2) Check indexes are created in table pseudonymized_transactions
3) Run SQL query :
describe select * from pseudonymized_transactions join items using(itemnumber)
where transaction_type='issue' and datetime < date_sub(curdate(), INTERVAL 30 DAY)
=> You see the 3 new indexes used in 'possible_keys'.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0573d01eaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6ba45bc290)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
hen dateexpiry is in BorrowerUnwantedField it is hidden in patron edition form.
The problem is when editing an existing patron the value is re-computed with category settings, as if it where empty.
This comes from all fields in BorrowerUnwantedField beeing removed from %newdata in memberentry.pl.
Whe must skip dateexpiry.
Test plan :
1) Be sure dateexpiry is not in BorrowerUnwantedField
2) Define a patron category with enrollment period 12 month
3) Create a new patron in this category
4) Its expiration date is in now + 12 month
5) Edit the patron category to set enrollment period 6 month
6) Add dateexpiry in BorrowerUnwantedField
7) Edit the patron and save
=> Without patch the expiration date is changed to now + 6 month
=> With patch the exporation date is unchanged
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Perl-tidied.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 571521ba13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c65b3a3813)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>