Jonathan Druart [Fri, 9 Jul 2021 14:01:43 +0000 (16:01 +0200)]
Bug 20529: Remove other occurrences of decodeURIComponent from browser.js
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 417cbafa8cb73130eb6eeacd12717ad3c39e6401) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Victor Grousset [Mon, 16 Apr 2018 16:55:48 +0000 (18:55 +0200)]
Bug 20529: Fix "Return to results" link broken by a double quote
(in the search query)
cause: decodeURIComponent used when URI encoding was necessary. (At
least in main usecase of this feature)
It could have been a copy and paste error. From the above
browseRecords() function.
== Test plan ==
1. Search in the staff catalogue «a "alice"»
Replace a and alice with whatever than will return a result for you
2. Click on the first result
3. Check the "Return to results" link
It should be like
staff_url://cgi-bin/koha/catalogue/search.pl?idx=kw&q=a
This is the bug. Because when clicking the link, your search will be
'kw,wrdl: a'
instead of
'kw,wrdl: a "alice"'
4. Apply this patch.
5. Search in the staff catalogue «a "alice"»
Replace a and alice with whatever than will return a result for you
6. Click on the first result
7. Check the "Return to results" link
The link should preserve the full query
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8c0215dfc22cf768c13272971c3a51cfb29def1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 3 Sep 2021 15:13:21 +0000 (11:13 -0400)]
Bug 28774: DBRev 20.11.09.001
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4892d293526d5edae15a8ebc73eb27ac64edd386) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 28 Jul 2021 12:23:50 +0000 (12:23 +0000)]
Bug 28774: Don't store blank values for rental discount
This patch adds 'can_be_blank => 0' for the rentaldiscount rule to prevent
storing blank values in the database
Additionally, if there is no charge we do not need to check for a discount
and can simply return
To test:
1 - Set rental discount to "" to a rule in circulation rules
2 - Checkout an item that will follow this rule
3 - Check the intranet log:
[WARN] Argument "" isn't numeric in subtraction (-) at /kohadevbox/koha/C4/Circulation.pm line 3385.
4 - Apply patch and restart all
5 - Update database
6 - Set the rule to "" again
7 - Check the DB, no rule is stored
SELECT * FROM circulation_rules WHERE rule_name = 'rentaldiscount';
8 - Checkout the item again
9 - No warns in log
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11ec644edfeb5342b5b9d8c8bc5469e9b980c58b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 19 Aug 2021 14:49:34 +0000 (10:49 -0400)]
Bug 28885: Skip invalid biblios for OpacBrowseResults
If a record is deleted from Koha, but is for some reason not deleted from the search indexes, OpacBrowseResults can cause an ISE if the deleted record is in the search results for any given item. OpacBrowseResults loops through the search results, and checks if there is a biblionumber, but does *not* check to see if a result was pulled from the database for that biblionumber. It simply assumes the result must exist.
We should be checking to ensure the biblionumber was valid before operating on the biblio object.
Test Plan:
1) Use zebra for searching
2) Disable koha-indexer
3) Enable OpacBrowseResults
4) Perform a search
5) Delete an item in the search results
6) View on of the remaining items in the search results
7) Note the error
8) Apply this patch
9) Restart plack
10) Reload the page
11) The error should be gone!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a478eb1b4f52d3fb1fa2e8526511e5eb11df1619) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28744: Better handling of undefined to_api_mapping
We always had some mapping because of the DB vs. API object definition discrepancies. But bug 25260 revamps the reserves table, and it is a perfect match. It highlights this edge case: if no mapping defined, then and undef from_api_mapping is generated (as opposed to an empty hashref) and this leads to errors in the query translation from the API.
This patch makes a small change so this method always returns an empty
hashref.
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t
=> FAIL: Test fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. 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>
JD amended patch: remove uneeded commented lines
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1d6108206d1e4d459d08ee289582f1c017666aaf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Didier Gautheron [Mon, 23 Aug 2021 13:19:03 +0000 (15:19 +0200)]
Bug 28891: (bug 23916 follow up) Always use 'Checkout on' as default Checkout history sort column
To test:
1 - Unset RecordStaffUserOnCheckout
2 - Check out an item
3 - Display Checkout history, table is sorted by 'Checkout on' column
4 - Set RecordStaffUserOnCheckout
5 - Display Checkout history, table is sorted by 'Renewed' column
6 - Apply patch
7 - Redo 1, 3, 4 and 5, table is always sorted by 'Checkout on'
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3157940f867d571931d7ecac875a41c73e862e88) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Wed, 4 Aug 2021 08:11:10 +0000 (22:11 -1000)]
Bug 28554: Fix t/db_dependent/AuthorisedValues.t
Fixes where sort on lib breaks the test.
Also removes useless params in search_by_koha_field()
Run prove t/db_dependent/AuthorisedValues.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 28695239723bb878f37d137f721ce822ce4807e1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Fri, 11 Jun 2021 11:42:00 +0000 (13:42 +0200)]
Bug 28554: In itemsearch sort item types filter by description
In itemsearch form, the item types filter should be sorted by description.
Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0bf6226f7e8bd6b1fd3147fdb8fb56b055368652) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Fri, 11 Jun 2021 11:35:41 +0000 (13:35 +0200)]
Bug 28554: In Koha::AuthorisedValues sort by description
In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.
Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value
Seems change in search_by_marc_field can not be tested in interface
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ee27af1cd97b2d7188867cfe0fc77c0f90aff1c8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 26 Aug 2021 19:07:53 +0000 (19:07 +0000)]
Bug 25619: Adjust POD and move date check before logging
Potentially we could have logged a change when no date was passed.
This patch moves the test before logging and updates POD
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 38d47aa4ef295f53868ae8e891cdaa2ce014687e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 11 Aug 2021 11:17:13 +0000 (13:17 +0200)]
Bug 25619: Adjust POD
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7934147a9b92a53a0b8cf3e06624787cce76582d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 22 Jul 2021 10:24:12 +0000 (06:24 -0400)]
Bug 25619: (QA follow-up) Fix subtest description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b73c75954b99c10c042b3241cee5dd77562b2cf1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 16 Jul 2021 18:26:37 +0000 (14:26 -0400)]
Bug 25619: Unit Tests
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e3e40243542aac548df06dd76d4ac6eef21c318a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 16 Jul 2021 17:50:29 +0000 (13:50 -0400)]
Bug 25619: Add ability to adjust expiration date for waiting holds
There are times when an item that is waiting for pickup needs to have the expiration date extended. This would give staff the ability to modify one by one, as needed, the reserves.expirationdate for a given item awaiting pickup.
Test Plan:
1) Place a hold, trap an item for it such that is is waiting
2) Attempt to update the expiration date
3) Note the new date is not saved
4) Apply this patch, restart all the things!
5) Attempt to update the expiration date
6) The new date should be saved!
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 00232f0bd75b44ba57038b97bc4c07333a107267) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6653aeaf14652bf856275a43084ec5f4dd991b63) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Andreas Roussos [Mon, 17 Aug 2020 08:57:03 +0000 (10:57 +0200)]
Bug 26223: include item information in OPAC ISBD view
The ISBD view in the OPAC interface does not display item information.
This patch fixes that.
Test plan:
0) Have a biblio with at least one item attached to it and include one
of the following snippets in the OPACISBD system preference,
depending on your MARC flavour:
MARC21:
#952|<br/><h2>Items</h2><table><th>Copy number</th><th>Shelving
location</th><th>Koha item type</th><th>Barcode</th><th>Call number
(Full call number)</th><th>Materials specified (bound volume or
other part)</th>|<tr><td>{952t} </td><td> {952c} </td><td> {952y}
</td><td> {952p} </td><td> {952o} </td><td> {9523}</td></tr>|</table>
UNIMARC:
#995|<br/><h2>Items</h2><table><th>Copy number</th><th>Shelving
location</th><th>Koha collection</th><th>Barcode</th><th>Call number
(Full call number)</th><th>Numbering (volume or other part)</th>|
<tr><td>{9956} </td><td> {995e} </td><td> {995h} </td><td> {995f}
</td><td> {995k} </td><td> {995l}</td></tr>|</table>
Switch to the OPAC ISBD view for your biblio; notice how it does
not display item information.
1) Apply the patch, and restart Plack/memcached if necessary.
2) Refresh the OPAC ISBD view page, this time you should see item
information as per the OPACISBD system preference setting.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit faddc2072d26475143c25a8527f0cc5f8e0978fe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 19 Aug 2021 10:34:58 +0000 (12:34 +0200)]
Bug 28881: (bug 23376 follow-up) Fix suggestion display on order receive page
On bug 23376 we replaced $order, from hashref Koha::Acq::Order, but 2
occurrences have not been corrected.
It causes a bug on the order receive page when the bib is linked with a
suggestion.
Test plan:
Create an order from bib A, create a suggestion for purchase on bib A
(OPAC)
Receive the order.
Without the patch: Notice the "Suggested by: (suggestion #)"
With the patch you see the info of the suggester
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 14a690078a90641abb377d2a2fbda8039f23f5c7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 30 Aug 2021 12:43:35 +0000 (14:43 +0200)]
Bug 28812: Improve robustness of selector
Use the same fix as bug 28828.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 95a389f07931323b2bfcb365ad2d06272a65e2bf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Didier Gautheron [Thu, 26 Aug 2021 13:27:45 +0000 (15:27 +0200)]
Bug 28812: (bug 7882 follow up) Copy all subfields in plugin editor
To test:
1- Create a notice with a 700$a and 700$d
2- Click on 700 $a field Tag Editor
3- Only 700$a is copied in search windows eg /authorities/auth_finder.pl pop up
4- Apply patch
5- Redo 2
6- 700$a is copied in 'Search main heading ($a only)' and $d is copied in 'Search main heading'
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d35efbd1fbfd19f6fe4b3e5a924fe0c95cb4da13) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Mon, 7 Jun 2021 22:17:46 +0000 (22:17 +0000)]
Bug 28525: Dont let TinyMCE do code cleanup
If you look at Bug 24764 and Bug 26942 we adjusted the TinyMCE for the News tool so it will not do some types of automatic code clean up.
The TinyMCE editor for system preferences which can be enabled by 'UseWYSIWYGinSystemPreferences' has the same problems.
We should make the configurations the same.
To Test:
1. Turn on 'UseWYSIWYGinSystemPreferences'
2. Go to a system preference like 'RestrictedPageContent'
3. Try entering something like '<i class="fa fa-facebook-official" aria-hidden="true">TEST</i>' in the Source Code window
4. It gets cleaned up by the editor
5. Try something like '<a href="https://www.test.com" referrerpolicy=""no-referrer-when-downgrade">TEST</a>'
6. It's cleaned up by the editor.
7. Try something like '<link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet">'
8. Cleaned up by editor.
9. Apply patch
10. Try step 3, 5, and 7 again.
11. It should not be changed by the editor
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 995d080e39230305dc6d3336db8ca2ab6308e829) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28861: Item type column always hidden in OPAC holds history
This patch fixes the 'Requested item type' column not showing for holds
history in OPAC.
It was due to a template variable not being set. When solved, it become
clear that an import was missing for a template plugin.
To test:
1. Enable AllowHoldItemTypeSelection
2. Add a couple item-type constrained holds
3. See them in the holds history page
=> SUCCESS: Item type column shows
4. Enable OPACHoldsHistory
5. Look for them in the OPAC
=> FAIL: The item type column doesn't show
6. Apply this patch
7. Repeat 5
=> SUCCESS: The column shows! The item type is described!
8. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e43bf2d62c34e6310fa39f8bb10869f88f026ee6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 28 Jul 2021 13:32:24 +0000 (13:32 +0000)]
Bug 28776: Warns from GetItemsInfo when biblio marked as serial
GetItemsInfo sorts the items using serial fields if the biblio is
defined as a serial
The fields may not be defined. We can add a fallback to blank in this case
To test:
1 - Mark a record with items as serial in the marc (942$s)
2 - At least one of the items should have no enumchron defined
3 - Load the detail page
4 - Warns in logs:
[WARN] Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/C4/Items.pm line 811.
5 - Apply patch and restart all
6 - Reload the details page
7 - No more warns
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6ea41db079ae2b8362608eb35ec64cbc958c315c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 17 Aug 2021 20:19:29 +0000 (10:19 -1000)]
Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t
In test suite db_dependent/Koha/Patrons.t actually shows :
1..10
ok 1 - Patron with no dateofbirth is always valid for any category
ok 2 - Today=2020-02-28, dob=2015-03-01, is 5, should be valid=0
ok 3 - Today=2020-02-28, dob=2015-02-27, is 5, should be valid=1
ok 4 - Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0
ok 5 - Today=2020-02-28, dob=2015-02-28, is 7, should be valid=1
ok 6 - Today=2020-02-28, dob=2009-02-27, is 11, should be valid=0
ok 7 - Today=2020-02-28, dob=2016-08-27, is 3, should be valid=0
ok 8 - Today=2020-02-28, dob=2009-03-01, is 11, should be valid=1
ok 9 - Today=2020-02-28, dob=2007-08-27, is 12, should be valid=0
ok 10 - Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1
Some ages are incorrect :
1) dob=2009-03-01, is 11
=> it is age 10
so valid=1 in category 5 to 10
2) dob=2015-03-01, is 5
=> it is age 4
so valid=0 in category 5 to 10
3) dob=2015-02-28, is 7
=> this date of birth is already tested
I suppose here dob is wrong, age wanted is 7 in the middle of age restrictions.
so dob=2013-02-28
This patch fixes ages.
Also adds the category code 'AGE_5_10' in messages to display age limits
Test plan :
Run prove -v t/db_dependent/Koha/Patrons.t without and with patch
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ebf2c9e98f919dbaa632c143baf670fd19d30e58) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 18 Aug 2021 14:25:26 +0000 (16:25 +0200)]
Bug 28802: Fix Asset.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bd572eccc4c5196392a8e4714706306c0d3259aa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 3 Aug 2021 08:57:10 +0000 (22:57 -1000)]
Bug 28802: Untranslatable strings in browser.js
File koha-tmpl/intranet-tmpl/js/browser.js is not parsed by translation
process, which uses koha-tmpl/intranet-tmpl/prog/js/**/*.js
We must move it to prog/js.
Test plan :
1) Perform a search on staff interface
2) Click on a result
3) Check you see records browser
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8eab53c8baa06cc429267c7d14f7a3919242a5b1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Janusz Kaczmarek [Sun, 21 Dec 2014 08:31:47 +0000 (09:31 +0100)]
Bug 26852: subfield $e missing in X11 definition of MARC21 headings
This patch adds $e to 111 and 611, but removes it from 100 and 110 as it's
used for the relator term there and should not be copied. Same for 111$j.
Test plan:
1. Have a biblio record with, for example, 711 field with a $e subfield.
2. Have two auth records: one with 111 field reflecting the 711 field and second similar but without $e subfield
3. Have LinkerModule set to Default
4. Run link_bibs_to_authorities.pl
5. 711 should remain unlinked since there were two record found by the Default Linker and no one was chosen.
6. Apply the patch.
7. Run link_bibs_to_authorities.pl
8. 711 should be linked now.
Repeat testing in similar fashion for authorities:
9. 100/110 $e
10. 111 $j
NB zebra index definition is OK:
kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
in etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
Signed-off-by: Sara Brown <sbrown@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 847f1e8fc3d494f482d12b22afff43b601d189f4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 6 Aug 2021 08:03:27 +0000 (08:03 +0000)]
Bug 28784: (QA follow-up) Remove num_paragraph cookie from include
Still found in opac-bottom.inc.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ca3a0547a9baa96f8b8f66570c8cbf70f82d9d45) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 3 Aug 2021 12:17:02 +0000 (12:17 +0000)]
Bug 28784: (follow-up) Always make three search boxes
The previous patch removed search_boxes_loop - that's okay, it was always
getting the same three values.
If we don't do something in the template though, we get no boxes
Ultimately this should be a include, and not a hardcoded loop, but keeping changes
small for backporting
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c0ea6da0c5a8f4b95c2561b96f40c4433e47fb45) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 3 Aug 2021 08:58:47 +0000 (10:58 +0200)]
Bug 28784: Remove code related to num_paragraph cookie
It could lead to server freeze if set to a big value (we are pushing
into an array and so RAM is being fulfilled, and CPU is looping).
I don't understand the point of this cookie.
var numPar = $("#booleansearch fieldset p").size();
if (numPar > [% search_boxes_count | html %]){
jQuery.cookie("num_paragraph", numPar,{ path: '/'});
}else{
jQuery.removeCookie("num_paragraph", { path: '/'});
}
But "#booleansearch fieldset p" does not exist, it's not 'p' but 'div'
elements.
I've removed the code related to num_paragraph and the "Return to the
last advanced search" feature still works as before.
From this comment:
# determine what to display next to the search boxes (ie, boolean option
# shouldn't appear on the first one, scan indexes should, adding a new
# box should only appear on the last, etc.
The only bit that is not working as described is "adding a new box
should only appear on the last", but it has been working this way for
a long time already I think, and I don't see it as a bug.
Test plan:
Read the code, check that the above is correct.
Search for regression in this "return to last adv search" feature added
by bug 13307.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 18183bdf34d67e0a97b993ee06c996343c83cb84) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Mon, 16 Aug 2021 21:23:47 +0000 (21:23 +0000)]
Bug 28868: Add back mastheadsearch class name
In masthead.inc there is a wrapper for the main search bar called #opac-main-search. Prior to Bug 20168 that warpper had a class name of 'mastheadsearch'.
Historically CSS/JS customization of the main search bar was done via the mastheadsearch class.
Test plan:
1. Inscept the element on the OPAC main page and see the element with an ID of 'opac-main-search'.
2. Apply patch
3. Inscept that same element and you should now also see a class of 'mastheadsearch'.
4. Nothing visually should be different with the patch applied.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f603e999f59cf253f3cc950749b93f129cfd4a11) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Mon, 9 Aug 2021 20:07:53 +0000 (10:07 -1000)]
Bug 28834: Correct wording biblios/authorities in tools home
In tools home, we actually see 2 wordings : biblios/bibliographic authorities/authority
Looks like bibliographic is more correct.
Test plan :
1) Apply patch and look at words in tools home /cgi-bin/koha/tools/tools-home.pl
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1c38be34a64faaa5011e75423567e6b354adcb2b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Tue, 10 Aug 2021 13:21:18 +0000 (15:21 +0200)]
Bug 28779: (QA follow-up) Even more specific message
For the detail page, the MARC view etc. we use the text:
The record you requested does not exist (488).
I think this is better than "not found", because that sounds
like it might be an issue with the search index, which we can
rule out in this case.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 970fcc3af48d8b613b45af5111fe4cab8b8a7f28) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 30 Jul 2021 14:39:39 +0000 (14:39 +0000)]
Bug 28779: (QA follow-up) More specific message and soem cleanup
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit de1f144aa32b732e34b399afce3da3e9862e1f1a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28779: Skip processing of non-existent biblios
Just checking with a regex that whether an input looks like a biblionumber
is not enough, we need to also verify there is a biblio really existing
in the database and skip processing of hold request for non-existent
biblionumbers.
To test:
1) Go to page /cgi-bin/koha/reserve/request.pl?biblionumbers=XXXXX
where XXXXX is non-existent biblionumber, notice internal server error
2) Apply patch
3) Repeat step 1 and notice we cannot place a hold
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9f1a5069ed836f99988cabbeb052ff245e96fb52) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Mon, 19 Apr 2021 11:49:25 +0000 (11:49 +0000)]
Bug 27847: Don't obscure page when checkin modal is non-blocking
This patch changes the series of events striggered when a non-blocking
modal dialog is displayed during checkin. If the "TransfersBlockCirc"
preference is set to "Don't block," the user can continue to check in
even though a transfer dialog has appeared. This patch hides the modal's
"backdrop" element so that the modal doesn't look like one which blocks
further action.
There is no Bootstrap backdrop option which both hides the backdrop and
makes it non-blocking, so we have to use the default non-blocking option
and "manually" hide the backdrop.
The "show.bs.modal" event must be added in order to make the
necessary change before the modal is displayed. This prevents the
darkened backdrop from appearing and then being hidden.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Set the "TransfersBlockCirc" preference to "Don't block."
- Check in an item which belongs to another library.
- A modal dialog should be displayed: "Please return this item to XXX"
- The page "behind" the modal should not be darkened, and the cursor
focus should remain in the check-in field.
- Checking in an item which as a hold should still trigger the
"blocking" behavior: The modal must be dismissed by clicking one of
its buttons (not the backdrop) and the page behind the modal should be
darkend.
- Test with "TransfersBlockCirc" set to "Block." Checking in an item
belonging to another library should trigger the "blocking" modal
behavior.
- Test that other checkins still work correctly.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9b35524e53fbbd05a15e4686d847a3071639b601) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Mon, 9 Aug 2021 13:41:45 +0000 (13:41 +0000)]
Bug 28764: (QA follow-up) Add comment, remove two defined's
If we no longer offer the sortfield with :asc actively, we should
probably write it somewhere too.
Replaced a few defined tests by empty test. No need to split empty
string or zero etc.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eed750ba95de3aa7dffce0a73073099d40c40a2e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 30 Jul 2021 10:54:47 +0000 (10:54 +0000)]
Bug 28764: Alter sort dropdown to use direction parameter
This code is odd -we build a select in the template, then turn it into a list of links using javascript
This patch adds a direction data element and uses it while building the links
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0d2208b9f155dd56a53073f9e674973931351de4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 27 Jul 2021 11:27:21 +0000 (11:27 +0000)]
Bug 28764: Parse direction parameter in public list view
This patch adds a check for a 'direction' paramter in list sorting.
It maintains the existing syntax for sorting 'sortfield=field:direction'
but adds support for the form used in paginations and more commonly thtoughout
Koha' sortfield=field&direction=direction'
To test:
1 - Create a public list
2 - Add enough items to generate two pages (40 worked for me)
3 - View the list and enforce sorting by date added descending:
sortfield=dateadded:desc
4 - Note the titles shown
5 - Click to second page using the pagination bar
6 - Note the same titles are shown, in a reversed order
7 - Apply patch
8 - repeat 305
9 - Second page is sorted correctly!
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 13c0679fa0ac58cb404bed29f77b512be6cdf08d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 10 Aug 2021 09:14:03 +0000 (23:14 -1000)]
Bug 28835: Fix ability to pass list contents to batch record modification
Bug 12759 added the ability to pass list contents to batch record
modification/deletion tools.
Patch Bug 22417 [Restore the 'add to list' feature] removed the fetch
of lists in batch_record_modification.pl I don't understand why.
It still exists in batch_delete_records.pl.
Note that this is needed when first form is displayed.
Test plan :
1) Create a private and a public list of records
2) Open Tools > Batch record modification
3) Check you can use the lists
4) Open Tools > Batch record deletion
5) Check you can use the lists
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 533640b07737ed1e3ecb9dced62672ab3376d7d4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 9 Aug 2021 12:09:13 +0000 (12:09 +0000)]
Bug 28828: Fix unimarc_field_4XX.tt and marc21_linking_section.tt value builders
Find closest ul for value builders.
Since Bug 22399 changes in biblio editor, value builder unimarc_field_4XX.tt JavaScript
code does not do its job anymore.
This is because a div is added and this call is now wrong:
var subfields = whichfield.parentNode.parentNode.getElementsByTagName('input');
Test plan 1:
1) Use a UNIMARC DB
2) Define value builder unimarc_field_4XX on 463$t
3) Create a record B1 with 200$a, 200$f
4) Create a new record B2
5) Click on value builder in 463$t
6) Search for record B1
7) Click on "Choose"
=> Without patch only 463$t is filled with a value
=> With patch 463 $t, $a, $0 and $9 are filled with a value
Test plan 2:
1) Use a MARC_21 DB
2) Define plugin marc21_linking_section.pl on 773$t
3) Make sure 773$t and other subfields are visible in intranet/editor
4) Create a new record in basic cataloging editor
5) Click on value builder in 773$t
6) Search fro a record
7) Click on "Choose"
=> Without patch fields are not fileld
=> With patch subfields are correctly filled
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0a2f68248fefe2cbfed96408c0f7a6993a27e126) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Wed, 16 Jun 2021 09:17:19 +0000 (11:17 +0200)]
Bug 28569: In opac-suggestions.pl preselect user library
In OPAC new purchase suggestion opac-suggestions.pl for library combobox :
actually first value is selected, user library should be selected.
Test plan :
1) Create a new library named 'ZZZ top'
2) Set this library on a user U1
2) Loggin at OPAC with user U1
3) Create a new suggestion
=> Check library 'ZZZ top' is preselected
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 52e4227e7e8b6178067502f44d868f69bb517d04) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
There was another permission check for edit_items directly below,
so instead of changing them to both be edit_items, I think we
can now remove one.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5602a405cc650f9390ad3ce643abf1c6880b1cc8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28727: Show edit item link when user has edit items permission
To test:
1: log in as a user with edit_items but not edit_catalogue
2: confirm you do not get an Edit Item link on moredetail.pl
3: apply patch, restart, reload
4: confirm link now shows
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f7e29181e011decfca60f8b3b6c0960e9ca2f0ae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 22 Jun 2021 09:46:55 +0000 (11:46 +0200)]
Bug 28611: Fix width to 50% for additem form elements
This patch suggests to set the width of select and input to 50%
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 668bd234eea22b5c92fc352bf7d858e300dde99a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 4 Aug 2021 09:12:41 +0000 (11:12 +0200)]
Bug 28630: Improve date comparisons in tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 72213935f3383833e4ea5842ab00483999fb0d1f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 25 Jun 2021 09:33:18 +0000 (10:33 +0100)]
Bug 28630: Add unit tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2d3bc2e933cd3208cc7bd4da7dc1c6e712849e21) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 25 Jun 2021 08:50:50 +0000 (09:50 +0100)]
Bug 28630: Add track_login_daily to ILSDI::AuthenticatePatron
This patch adds a call to track_login_daily for the AuthenticatePatron
method in ILSDI.
Many libraries use this ILSDI endpoint for electron book borrowing and
need to maintain the lastseen based on this type of lending.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c1315c6a58878861619c1d9afa4c42acb26de584) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 23 Jul 2021 17:56:39 +0000 (17:56 +0000)]
Bug 28754: Only adjust holds on specific biblio and don't go past end of array
Our query for lowest priority holds only needs to adjust holds on the biblio we are looking at
so I add biblionumber
Additionally we can simply find the end of the array and use that rather than 99998
so I set new_rank to scalar @priority
Lastly, we don't need to fetch the lowest priority holds if we are ignoring lowest priority
so I move it into the conditional
To test:
1 - Add holds with lowest priorty to 2 records in the catalog
2 - Add a hold on a third record
3 - Note errors in log like:
[2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649
4 - Apply patch and restart all the things
5 - Add a new hold on third record - no warns
6 - Make one of the holds on third record have lowestPriority (click rightmost arrow with line at bottom)
7 - Note no warns
8 - Adjust other holds on record and note no warns
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a1748ae566cda791d3b9a9878574601c34f8bf73) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 30 Jul 2021 19:20:29 +0000 (19:20 +0000)]
Bug 28533: Fix other ocurrence
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f8798251724b58abffd86fc760144487ed2775d1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 9 Jun 2021 12:59:27 +0000 (12:59 +0000)]
Bug 28533: Set subfields to 'undef' if whole field request in itemcallnumebr system preference
This patch undefines the CNsubfields variable when the whole field is requested
Note that the substr returns '' when no characters are found, so we test if the string eq ''
Testing 'truth' doesn't work because "0" is a valid option
To test:
1 - Edit a record, add an 082 field
082 0 0 ‡aalpha‡bbeta‡0delta
2 - Set itemcallnumber system preference to 082
3 - Attempt to add/edit items
4 - ISE
5 - Apply patch, restart all the things
6 - Add/edit items - no error
7 - Confirm the itemcallnumber field is populated with "alpha beta delta"
8 - Set itemcallnumber system preference to '0820'
9 - Add/edit items
10 - Confirm itemcallnumber is populated with 'delta'
Signed-off-by: Salman Ali <salman.ali@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit afa107e480f90d2abbad7afd94063f62fb3874fa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 14 Apr 2021 18:19:40 +0000 (18:19 +0000)]
Bug 28057: Use the biblioitem's biblionumber for checking availability
The loop here gets items from the record, plus analytic items. Because of this
we need to check more than 1 record - we decide to do this via biblioitems.
We need to preserve that, but when checking ItemsAnyAvailableAndNotRestricted we
cannot assume that the biblionumber and biblioitemnumber are the same (they should be
but this may not be the best of all possible worlds)
I simply switch the call here
To test:
1 - Apply patch
2 - Test placing holds on single bibs and multiple bibs
3 - Confirm it works as expected
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8258ebe2fbf41ce3c80db08bd0b37b789af01ce0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 13 Jul 2021 10:54:59 +0000 (10:54 +0000)]
Bug 28704: Library MARCOrgCode field needs maxlength attribute
This patch adds a maxlength attribute to the "MARC organization code"
field in the form for adding and editing libraries. The maxlength, 16,
matches the limit of the table column.
To reproduce the problem, go to Administration -> Libraries.
- Add or edit a library
- Fill the "MARC organization code" field with a string longer than 16
characters, e.g. Decriminalization
- When you save the record you will see an error.
Apply the patch and add or edit a library.
- Confirm that you cannot enter more than 16 characters in the "MARC
organization code" field.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7091aeab8d30c0ea5169e677c3685842bf215e92) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Find a bib with 1 item, place 3 bib-level holds on it (just to make
sure there's at least one title on your holds ratio page)
2 - Go to the holds ratio page in circulation
3 - mouse over the Holds Ratio column, see that the number there is a
link to http://[your koha]/cgi-bin/koha/circ/reserveratios.pl#, the
page you're already on
4 - apply patch, restart_all, reload page
5 - link now goes to the holds page for that title
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 242e9c36f9c4cd8a9d5284a7347de7ab787eb2a7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 22 Jul 2021 18:35:13 +0000 (18:35 +0000)]
Bug 28733: Correct position of desks link in admin menu
This patch moves the "Desks" link from the "Basic parameters" section to
the "Patrons and circulation" section, matching the category of the link
on the Administration home page.
To test, apply the patch and go to an administration page which includes
the left-hand navigation sidebar, e.g. Administration -> Libraries.
In the sidebar, the "Desks" link should be in the "Patrons and
circulation" section, under "Item circulation alterts," matching its
position on the Administration home page.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 28733: (follow-up) Add manage_libraries permission check
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30ccfb1882a66bc86decad142ecc9e45219dfa04) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 15 Jul 2021 13:00:14 +0000 (13:00 +0000)]
Bug 28689: Extra %s in alert message when saving an items
This patch removes an unnecessary %s in the text built to show when
there are errors in the cataloging add item form.
To reproduce, open the add item form in cataloging and click "Add item"
without filling in all mandatory fields. You should see an alert message
that contains, "- %s 1 mandatory fields empty (highlighted)"
To test, apply the patch and return to the add item form. Now when you
save an incomplete form the message should omit the %s:
Jonathan Druart [Fri, 30 Jul 2021 14:07:09 +0000 (14:07 +0000)]
Bug 28567: DBRev 21.06.00.011
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bf4223067b0b24e632ada710692827a5adcf5130) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 25 Jun 2021 10:44:19 +0000 (12:44 +0200)]
Bug 28567: Fix 0 vs "" vs undef on the admin library form
There are two things here:
* Branches.pickup_location has a default = 1 in DB, we should not set to undef if 0
or it will be set to 1 when stored.
* The other fields are all text (varchar, mediumtext or longtext) and
can be NULL. They are correct set to NULL when a new library is created
but set to an empty string when the library is modified. That's not
consistent
Test plan:
0. Don't apply the patch
1. Create a new library, set pickup location to "No"
2. Save
=> Pickup location is set to YES
=> In DB notice that the different values you didn't fill in are set to
NULL
3. Edit the library
4. Save
=> In DB notice that the different values you didn't fill in are now set
to an empty string
5. Apply the patch, restart_all
6. Run the updatedatabase script
=> In DB all the empty string values are set to NULL
7. Repeat 1 to 4 and confirm that everything is now working as expected
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a844a2211f58cb6f19efa88568bca300287dcd60) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 28 Jul 2021 10:24:14 +0000 (12:24 +0200)]
Bug 28632: Prevent api/v1/patrons.t to fail on dates comparison
# Failed test 'Returned patron from update matches expected'
# at t/db_dependent/api/v1/patrons.t line 537.
# Structures begin differing at:
# $got->{updated_on} = '2021-07-27T13:33:53+00:00'
# $expected->{updated_on} = '2021-07-27T13:33:52+00:00'
# Looks like you failed 1 test of 42.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5d922670184c66a48de07c0e9683824364b8e0be) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
David Cook [Thu, 27 May 2021 03:34:30 +0000 (03:34 +0000)]
Bug 28469: Move "Skip to main content" to top of OPAC page
This patch moves the "Skip to main content" button out of the nav
element and to the top of the <body> element, so that it's the first
(potentially) viewable element on the page.
This means you can inject content above the navbar, which has
a relative position, and it won't disrupt the display of the
"Skip to main content" button.
To test:
1) Apply patch
2) Same test plan as Bug 22807:
Go to any page in the OPAC and hit the tab key. The "Skip to main
content" link should appear. Tabbing away from it should cause the link
to hide. Hitting the ENTER key when the link is highlighted should cause
the page to scroll to the main content.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 97e81df59ecfcd1509863381dafdf7c114fe1b7b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 26 Jul 2021 09:19:17 +0000 (11:19 +0200)]
Bug 28620: Replace remaining occurrence in test
Not useful but won't hurt either.
At least all our occurrences are identical now.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b8ac93d0b755fa3caccb9e05a82ceae01f185005) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Wed, 23 Jun 2021 11:59:21 +0000 (11:59 +0000)]
Bug 28620: Remove trailing space when logging with log4perl
Trivial change.
Do sed -i -r -e'/log4perl/ s/\s%n$/%n/' on the log4perl configs.
Test plan:
Update your own config.
Trigger some logging and check that logfile.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 662885aaf4457056b389b0e2c75947d18b7a5a9e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 26 Jul 2021 09:01:10 +0000 (11:01 +0200)]
Bug 28408: Add new column to the table settings config
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2c736d3b1bf83687e83d7be0e8a3d07ce7934476) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 28 May 2021 12:52:03 +0000 (12:52 +0000)]
Bug 28408: Add 'Last updated' column to suggestions table
We have specific meanings for the different dates in suggestions
Managed - means the status was changed or the suggestion edited, but doesn't change if item type updated
Modification - implies an edit of the subscript, not updated if status changed alone
Updated - this is the date field in the DB, which is actually a timestamp
The cronjob purge_suggestions.pl uses teh 'date' field
For a user, a suggestion can look old in the interface, but be considered recent by the script
To clear the confusion we should show the timestamp as well
To test:
1 - Add a suggestion
2 - In the DB, pretend you set it in the past:
UPDATE suggestions SET manageddate='2021-01-01', suggesteddate='2021-01-01', date='2021-01-01 12:12:12';
3 - Click 'Go' In Organize by: Status
4 - Note the suggestion looks old now
5 - Check the box, and click 'Update item types with:' -> Submit
6 - Prganize by status again
7 - No change?
8 - Check the DB:
SELECT date FROM suggestions;
9 - The field is updated
10 - Apply patch
11 - Organize by status again
12 - See the 'Last updated' ate set to today
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dacfa0bd20124a90dd802db11135728b29c6b1b4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 12 May 2021 17:00:57 +0000 (17:00 +0000)]
Bug 28336: Add missing input for item_action
To test:
1 - Stage a marc file of authorities
2 - Manage the staged file
3 - Attempt to change the matching rule
4 - 500 Error, in intranet-error.log:
[Wed May 12 16:53:03.046652 2021] [cgi:error] [pid 52072] [client 172.19.0.1:50580] AH01215: C4::ImportBatch::SetImportBatchItemAction(): DBI Exception: DBD::mysql::st execute failed: Column 'item_action' cannot be null [for Statement "UPDATE import_batches SET item_action = ? WHERE import_batch_id = ?" with ParamValues: 0=undef, 1="1"] at /kohadevbox/koha/tools/manage-marc-import.pl line 160: /kohadevbox/koha/tools/manage-marc-import.pl, referer: http://localhost:8081/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=1
5 - Apply patch
6 - Reload page and change matching rule
7 - Success!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c7531a0442bfb048a0b3c30d215f86bd2ecd512d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 26 May 2021 12:17:41 +0000 (12:17 +0000)]
Bug 27885: (follow-up) Use biblionumbers instead of biblionumber in form action for club search
This simply matches the code on the patrons search tab
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 12cf90bdc1ba519b1f735a097d505f49101b2abe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 5 Mar 2021 17:32:28 +0000 (17:32 +0000)]
Bug 27885: Populate biblionumbers parameter using biblionumbers array
Currently we send $biblionumbers as the parameter, but this is just apassthrough form when a list of biblios is selected for placing a hold
If passed a single biblionumber we push it into @biblionumbers and use that for building the biblio loop
This patch uses @biblionumbers to avoid sending a blank variable in the URL
To test:
1 - On the staff client click 'place hold' for an individual record
2 - Use the form to find a patron
3 - Note the url is:
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=
4 - Apply patch
5 - Repeat
6 - The url is now like:
http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumbers=248
(but with whatever biblionumber you chose)
7 - Perform a search and select multiple biblios and confirm you can place holds as before
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
JD Amended patch: Add missing space
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7cca187cc4bbe5651615a05400fc65bd46b5fe46) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 17 Jun 2021 12:36:01 +0000 (12:36 +0000)]
Bug 22801: (follow-up) Use date-of-publication directly
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d1c7333fbfca7cdae943f2e82efb08f429370866) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch uses %index_field_convert to perform 'yr' limit.
Test plan:
1) Apply patch
2) Use Elasticsearch searchengine
3) Go to advanced search with 'More options'
4) Perform a search with a year limit (value or range)
5) Check results are correct
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7ab5837808b447275e8b1119da4806b00d1edcb6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28747: Clarify working on RestrictionBlockRenewal
To test, apply patch, restart services and reload page, confirm that now the syspref says "from the staff interface."
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8b8db671b4b1e7873ed34b3419b27342413c2b7e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Mon, 12 Jul 2021 13:29:27 +0000 (13:29 +0000)]
Bug 28679: Unable to click "Log in to your account" when GoogleOpenIDConnect is enabled
This patch corrects the login link in the OPAC when GoogleOpenIDConnect
is enabled. It removes modal-related markup which was causing the link
to fail.
To test, apply the patch and enable the GoogleOpenIDConnect system
preference.
- In the OPAC, click the "Log in to your account" link in the header.
You should be redirected to a Google authentication form.
- Disable the GoogleOpenIDConnect preference. The login link in the OPAC
should trigger a modal login form.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 16965456b136b4d92651756623f64cf9510f0212) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Wed, 30 Jun 2021 15:42:50 +0000 (15:42 +0000)]
Bug 28631: Holds History title link returns "not found" error
This patch corrects a broken path in the OPAC holds history page.
This patch also corrects the breadcrumb markup which didn't conform to
the new Bootstrap 4 pattern.
To test, apply the patch and log into the OPAC as a patron who has past
or current holds.
- View the "your holds history" page.
- Click a title link in the table of holds. It should take you to the
correct bibliographic detail page.
- Check the breadcrumbs of the page. They should look consistent with
breadcrumb navigation on other pages in the OPAC.
Signed-off-by: Kelly <kelly@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1668bd85579fd0020ca763b4a990ba896b0538e9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 10 Mar 2021 15:45:18 +0000 (10:45 -0500)]
Bug 27908: Add support for circulation status 1 ( other ) for damaged items
Some libraries would like to transmit if an item is damaged via the
circulation status field. There is no specific code for a damaged item,
so we should use value 1 (other) along with an AF screen message to
describe the reason for the the circulation status of 1.
Test Plan:
1) Apply these patches
2) prove t/db_dependent/SIP/Transaction.t
Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6d029fe92648b6293568d32ffec9f1eb79f1cb43) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 10 Mar 2021 15:45:15 +0000 (10:45 -0500)]
Bug 27908: Add unit test
Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 812a95279e04f9f99df5ba605e896d889214c9c3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 10 Mar 2021 15:33:28 +0000 (10:33 -0500)]
Bug 27907: Add support for circulation status 2 ( on order )
In Koha, we represent on order items by giving those items a notforloan
value less then zero. We can use this to implement circ status 02 ( on
order ) in for SIP.
Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 19721bd6711fc9524b7711c7f4d871c7cb0d9ca5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 10 Mar 2021 15:33:23 +0000 (10:33 -0500)]
Bug 27907: Add unit test
Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7a2ed601e4bc4d1a2c4bd6845e3f617d0c652297) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 10 Mar 2021 15:24:16 +0000 (10:24 -0500)]
Bug 27906: Add support for circulation status 9 ( waiting to be re-shelved )
In Koha, we can support circ status 09 in SIP by checking if the item's
location is "CART".
Test Plan:
1) prove t/db_dependent/SIP/Transaction.t
Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2724cf760d844c62d84ef26055de2dc07a44c89d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 10 Mar 2021 15:22:54 +0000 (10:22 -0500)]
Bug 27906: Add unit test
Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 56909e547dcdf54cb7e7084bc75f3e73da23e613) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28644: Fix calling borrowernumber on undefined value
If the hold is not found (e.g. already cancelled), we should
return earlier without crashing:
Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521
(Note: line number from 19.11)
Test plan:
Run t/db_dependent/Reserves.t
Add a hold, go to user menu with holds in OPAC.
At the same time, cancel this hold from staff.
Now click the Cancel in OPAC.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 43e7873637c9d235a0c18ebc9ac6656f07b2aa61) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 18 Jun 2021 10:36:00 +0000 (12:36 +0200)]
Bug 28561: Remove DBIC warning in opac-shelves
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 298569d37f845aa2814214d600303aeb0f56053a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Mon, 14 Jun 2021 12:51:13 +0000 (12:51 +0000)]
Bug 28561: Fix noisy warning about $direction too
Use of uninitialized value $direction in string ne at /usr/share/koha/opac/opac-shelves.pl line 265.
Bonus:
Use of uninitialized value $sortfield in string eq at /usr/share/koha/opac/opac-shelves.pl line 264.
Test plan:
While testing patch 1, check the logs for these warnings with and
without this patch.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3a4dafb754a64c4cda743b3bb72b71cdaa294395) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 24 Jun 2021 13:11:18 +0000 (15:11 +0200)]
Bug 28399: Remove txn error from batchRebuildItemsTables.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f131e51984898f689281b8adb3ead7c33168e00b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28455: Update wording on TrackLastPatronActivity
This patch updates the wording on TrackLackPatronActivity to maintain the corrections from bug 28467 and also reflect the change made in this bug. It should now read: The first time each day that a patron either logs into the OPAC, connects to Koha via SIP, or checks an item out, borrowers.lastseen will update with the current date and time.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bbd0735546dd98a86828c3887d2f844ff3124d00) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Tue, 25 May 2021 18:20:25 +0000 (18:20 +0000)]
Bug 28455: lastseen should be updated at checkout if TrackLastPatronActivity is enabled
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e963ca9527a7ce45698ae021509269fea5f4220f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 23 Jun 2021 07:50:55 +0000 (09:50 +0200)]
Bug 28462: Remove line breaks in TT tags
Same as previous patch for other files.
Looks like the problem exists only with IF.
== test plan ==
1. See the problematic strings in a given language
git grep "\bIF\b" misc/translator/po | grep -v '#' | grep '\bzh-Hant-TW'
2. update the language
misc/translator/translate update zh-Hant-TW
3. Recheck the problematic strings, they aren't here anymore
4. Check the diff: git diff
and search the if's with «/-.* IF » to see how the deleted strings
look like and that it makes sense.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1ed9d5529f4f625216f3bcbfa5e8d43e56b3e0e7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 26 May 2021 14:24:32 +0000 (16:24 +0200)]
Bug 28462: Remove TT tag on several lines - opac-advsearch.tt
It fixes the translation in case the operators have been translated
Test plan:
1. misc/translator/translate update pt-BR
2. In pt-BR-opac-bootstrap.po , find OpacAdvSearchMoreOptions
3. sabotage the translation part, like replacing IF with something else
4. misc/translator/translate install pt-BR
5. enable and use pt-BR and hit opac-advsearch.pl
6. Notice the error
Template process failed: file error - parse error - /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/pt-BR/modules/opac-advsearch.tt line 409: unexpected token (e) [% IF (OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.size> 0 e extended_options) ou (OpacAdvSearchOptions and OpacAdvSearchOptions.size> 0 e n expandido_options) %] at /kohadevbox/koha/C4/Templates.pm
7. Apply the patch and redo update and install of the language
8. Note that it's now working
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f60efe6e8e647651512a6a4275e7a1ce8a6f5f37) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 28604: Prevent double encoding of MARC::Record::MiJ->to_mij output
This patch fixes a double-encoding issue with MiJ output.
Mojolicious' *text* renderer encodes the passed information according to
the request context. [1]
MARC::Record::MiJ->to_mij, conveniently encodes the string before
output [2].
This causes double encoding.
So the solution to this situation, is to use the *data* renderer, which
doesn't perform any encoding [3].
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests contain diacritics and fail!
3. Have a record with diacritics
4. Try the API routes for fetching a biblio:
$ curl --location --request GET 'http://localhost:8080/api/v1/public/biblios/144' \
--header 'Accept: application/marc-in-json'
(replace the record id with the one you've chosen)
=> FAIL: Boo, double encoding
5. Bonus point: you can try it on the non-public route, but you need
more configuration boilerplate (basic auth, permissions). If you look
at the fix, you will understand the tests cover it and no need to
complicate yourself.
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!
8. Repeat 4 (and maybe 5)
=> SUCCESS: No double encoding! Yay!
9. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cf44929d1ce70daff550a1e803f6bfe396332dbf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch introduces regression tests for the encoding issue with MiJ
output.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc1e15029f617ac18cba8508b99159358c132724) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 11 Jun 2021 18:02:11 +0000 (18:02 +0000)]
Bug 28480: (QA follow-up) Add unit test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 86e9a2d20e5904d57e8f2979df5dda23c165f0b0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds the q query parameters to the route.
To test:
1. Try the route with the following query parameter:
q={"patron_id":2}
i.e. GET /api/v1/patrons?q={"patron_id":2}
=> FAIL: You get a bad request respose
2. Apply this patch
3. Restart all
4. Repeat 1
=> SUCCESS: You get the patron
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3d2d48a8d8d8601928439aeab4f3c2daeff52c39) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>