Jonathan Druart [Thu, 30 Sep 2021 06:56:36 +0000 (08:56 +0200)]
Bug 29137: Add new syspref to disable AV creation within the cataloguing module
"I don't like this patch at all!"
"We will see a cataloger revolt if we do not find a way to make this
optional for catalogers."
I imagined a hord of catalogers running behind me and I got scared.
This patch will allow to turn the new feature added by bug 25728 off.
Test plan:
Confirm that the new CreateAVFromCataloguing will permit to turn the
feature off.
Signed-off-by: Andrew Fuerste-Henry <andrew@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 4aaf9847c9c9e1a71345da6c691d30c9ba246f23) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 6 Aug 2021 18:50:35 +0000 (18:50 +0000)]
Bug 28826: Add FacetOrder system preference
This bug adds a system preference to control ordering of facets and
adds the control to both Zebra and Elasticsearch
To test:
1 - Have a koha that can use both Zebra and ES
2 - Set 'displayFacetCount' to true
3 - Search in ES and Zebra
4 - Note facets in Zebra sorted alphabetically, ES by usage
5 - Apply patch, updatedatabase
6 - Search in ES and Zebra, facets are alphabetically sorted in both
7 - Find new syspref FacetOrder and set to 'by usage'
8 - Search in both engines, facets sorted by usage
Signed-off-by: David Nind <david@davidnind.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 ef40ba17aef792df332a11f7e0269c5684d913ac) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 27155: Include identifier test in Biblio_and_Items_plugin_hooks.t
The biblio and item action hooks pass a biblionumber or itemnumber now
to the plugin at time of deletion.
This patch adds a tiny refinement to Biblio_and_Items_plugin_hooks.t
and the associated test plugin to be sure of that.
Test plan:
Run t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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 3d5ea8d426123e190369fafc35576096ebf96a3d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 23 Sep 2021 11:54:43 +0000 (11:54 +0000)]
Bug 29091: Correct display of lists and tags on search results
This patch makes a minor change to CSS to fix the display of tags and
lists on the OPAC search results page so that the list doesn't have
extra padding.
To test, apply the patch and rebuild the OPAC SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- To test you should be able to perform a catalog search in the OPAC
which will return results which have one or more tags and which are on
one or more lists.
- In the OPAC search results, confirm that there isn't extra padding
between the "Tags:" and "Lists:" labels and their values.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 03a9cc45c5aa3ab99380dba1856a6977f46aa6d0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29078: Resolve division by zero in touch_all scripts
Illegal division by zero at misc/maintenance/touch_all_biblios.pl line 102.
Trivial fix.
Funny that the percentage is not even shown without verbose flag ;)
Test plan:
Run misc/maintenance/touch_all_biblios.pl -where 'biblionumber<0'
You should now see:
Good: 0, Bad: 0 (of 0) in 0 seconds
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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 3e0d6100314c3c6536f6145110796ed91ceb2c62) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Wed, 1 Sep 2021 19:16:15 +0000 (19:16 +0000)]
Bug 28940: In spinelabel-print.tt call IntranetUserJS only once
1. In IntranetUser add some JS that will target spinelabel-print.tt, I used this:
if ( $('#labels_spinelabel-print').length ) {
$('#labels_spinelabel-print').append('<div>TEST</div>');
console.log('TEST');
}
2. Generate a quick spine label
3. Once you have entered a barcode the JS will go off 2x. With the jQuery added you will see 2 div's with the word 'TEST'. Look at the console and you will also see TEST console logged 2x.
4. Apply patch
5. Try seto 2 and 3 again, the JS should only be called once.
Signed-off-by: Andrew Fuerste-Henry <andrew@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 41b8d6c1ffb4ea36dd6ccf5736bb6635dfa40bb9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 3 Jun 2021 10:57:52 +0000 (06:57 -0400)]
Bug 28510: Remove marking of closed branches as 'disable_transfer'
We no longer need to act as if closed branches were marked as
disable_transfer. This allows us to clean up a nice bit of code.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 28510: Remove unused variable
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 15373c26f060aa9dba30854096fdce32664946ab) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 3 Jun 2021 10:44:59 +0000 (06:44 -0400)]
Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled
Right now we skip closed branch's items as we iterate over all items looking for ones to fill a hold. If HoldsQueueSkipClosed is enabled, no items held be a closed library can be targeted, so it would be more efficient if we never selected the items from those branches to begin with. This is how the holds queue works if we are not using the transport cost matrix, so we should make it work the same way if we *are* using the matrix.
Test Plan:
1) Apply this patch
2) prove prove t/db_dependent/HoldsQueue.t
3) All tests should continue to pass
Signed-off-by: David Nind <david@davidnind.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 4b825ce3a53d7fceedd4118554c91eaf9e360793) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Petro Vashchuk [Mon, 20 Sep 2021 09:36:02 +0000 (12:36 +0300)]
Bug 29056: Remove the demo functionality leftovers
Remove forgotten code of the old legacy demo functionality that was
removed from elsewhere except systempreferences, this code not only
serves no purpose but also is causing some troubles for our customers.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 ed99f0fa0295a488a5cb27e6e80cce063147b1db) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Thu, 19 Aug 2021 13:43:48 +0000 (13:43 +0000)]
Bug 27461: Right pad with default elements for too short 008s
Note that we treat the elements 18-34 as one block of elements,
since its subdivision may vary.
E.g. if you pass 24 characters to the form, it will use the first
18 chars (until the last complete element) and pad with default
elements from position 18-39.
Test plan:
[1] Go to addbiblio. Make sure that 008 is connected to the plugin.
[2] Backspace field 008 a bit, click on the plugin button.
[3] Verify that the last elements come from the default.
[4] Repeat for a few different lengths.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.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 1803e69b2f59b29fc1ea153054944cfecbcec909) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29026: Restore behavior when an empty barcode field is submitted in circulation
When preference CircAutoPrintQuickSlip is 'clear the screen', when an empty barcode field is submitted in circulation :
Before Bug 17845, behavior was to display empty circulation page (no patron selected).
Now behavior is displaying the circulation page of current patron.
I think previous behavior was used when scanner is used to clear form and wait for another patron card to be scanned.
Test plan :
1) Set system preference CircAutoPrintQuickSlip to 'clear the screen'
2) Go to a patron circulation page
3) Post form without a barcode
=> Check you go to circulation page with no patron selected
4) Set system preference CircAutoPrintQuickSlip to 'open a print quick slip window'
5) Go to a patron circulation page
6) Post form without a barcode
=> Check you go to print quick slip window with correct datas
Signed-off-by: Kyle M Hall <kyle@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 841cb7839498cf69d59d3b7861ced42f8aba9d45) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Tue, 31 Aug 2021 06:59:27 +0000 (20:59 -1000)]
Bug 28927: Fix id opacmainuserblock used twice in OPAC
Since preference OpacMainUserBlock is now an HTML customization,
there is actually an HTML tags with id="opacmainuserblock" and one with id="OpacMainUserBlock".
Same for OPACNavRight in opac-registration-confirmation.tt
This patch removed id from page to keep the one comming from HTML customization include.
Test plan :
1) Create an HTML customization for OpacMainUserBlock with some text
2) Go to OPAC main page
3) Check HTML code of the page
4) Check you see id="OpacMainUserBlock" once and not id="opacmainuserblock"
5) Same for id="opacnavright" in opac-registration-confirmation.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ae1511debb4737b5242ed99e0601f2101bb9ef4d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29025: Don't prefill userid and password in user creation form
Recent Firefox versions try to prefill userid and password with
logged in user credentials.
To test
1 - Log in staff as user foo password bar
2 - Save user and password in Firefox
3 - Log out
4 - Log in again, log in pop-up must be pre-filled
5 - Open Create a new patron form
6 - At least password field is pre-filled with logged in user's credentials
7 - Apply patch
8 - Redo 4 and 5
9 - Userid and password fields aren't prefilled
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 89e2aa5a9bf5144672f38214869a8161561d410f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 619e60fd55fefedaea96113525373094c426c880) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29032: Pre-load ILL backends to speed up response
Bug 22440 will rewrite the route and make it even more efficient by
prefetching the related data instead of performing several queries in
loops.
In the meantime, we can make this controller perform better with a
simple intervention: load backends once, and use the
$request->_backend() setter to pre-set it before using the objects.
To test:
1. Perform any usual ILL requests listing, try having several
=> FAIL: Notice it takes a weird amount of time to load
2. Apply this patch
3. Restart all
4. Repeat 1
=> SUCCESS: It feels fast enough!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@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 7b1dc9d5f977aeb606cd2f766f3c3b8043d7a3f6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
On patrons check out or details page, after renewing
loans they don't sort correctly when clicking on "Date due"
tab. Page has to be reloaded so that sorting works.
This patch adds new method RefreshIssuesTable to
checkouts.js. When loans are renewed or checked in, issues
table is reloaded to and due dates are sorted correctly.
To test:
1. Add 3 loans for patron.
2. Change due dates so you they are e.g. 07/01, 07/02, 07/04
3. Make sure you have renewal period set e.g. 5 days and
check your RenewalPeriodBase syspref (I use current date there)
4. Renew loan with date due on 07/01, it should now be 07/07
5. Sort loans by date due
=> Note that order from top to bottom is 07/04->07/02->07/07
or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would
assume.
6. Apply patch and repeat.
=> Note that issues table is reloaded ("Loading..." pop-up is displayed)
and that due dates are in correct order.
Sponsored-by: Koha-Suomi Oy Signed-off-by: kelly <kelly@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Bug 28653: (QA follow-up) Remove debug message used during development
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 3fe3b1864a2934b969175fe00b70c9b79fc8c03c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 27 Aug 2021 16:06:02 +0000 (16:06 +0000)]
Bug 18747: Select All in Add Patron Option in Patron Lists only selects the first 20 entries
This patch corrects the JavaScript functions for the "select all" and
"clear all" action when viewing patrons in a list. Before this
correction, checkboxes which were previously in hidden table rows would
not be checked.
To test, apply the patch and go to Patrons -> Patron Lists
- View a patron list
- If necessary, add multiple patrons to the list so that the number
exceeds 20.
- Change the number of entries shown by the DataTable: Show [ 50 ]
entries.
- Click "Select all." All visible checkboxes should be checked.
- Click "Clear all." All checkboxes should be unchecked.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> 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 ad5db004e4ca08c37ebfb31a455568613c1d25a4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 10 Sep 2021 12:12:07 +0000 (12:12 +0000)]
Bug 28985: Force positive numbers for itemtype charge fields
This patch adds a min attribute to the fields on this page and adds
other cost related fields to validator
To test:
1 - Apply patch
2 - Browse to Administration->Item types
3 - Edit or create an item type
4 - Attempt to place a negative or non numeric value in:
Daily rental charge
Hourly rental charge
Default replacement cost
Processing fee
5 - You should not be able to
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 2c4e29795a10ffb2d4835803ca6fa6fd44812c2f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Tue, 7 Sep 2021 22:37:39 +0000 (22:37 +0000)]
Bug 21093: In additem.pl set the right stickyduedate for fast add
To test:
-1 Set the specify due date option to a date, don't check the checkbox
-2 Enter an unknown barcode
-3 Click on fast add
-4 Add a record
-5 Add an item (don't change the barcode!)
-6 The item is checked out to the patron
-7 Verify: The checkbox is "Remember for session" is checked now
-8 APPLY patch
-9 Do steps 1-6 again, this time "Remember for session" should be unchecked
-10 Do steps 1-6 again but this time do check the "Remember for session" checkbox.
-11 It should be properly checked
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 aa474bf12e75a6a7d5ba1cfcb25251af1385b3e2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 26 May 2021 15:16:13 +0000 (11:16 -0400)]
Bug 28464: Remove useless check that gives the incorrect error message
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 c663876e105324feb7fce616ea19a6a1e1d421fe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 26 May 2021 15:13:44 +0000 (11:13 -0400)]
Bug 28464: Add unit tests
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 28464: (QA follow-up) Correct test plan
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 d1ad355d33a93e28cb6e286f226f3bc58978c2bd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Fri, 27 Aug 2021 18:37:03 +0000 (08:37 -1000)]
Bug 28914: Fix wording in authentication forms
In most authentication forms we see :
Fields "Login:" and "Password:" with a submit button "Log in".
In some places submit button contains "Login", which is confusing for translation.
It is not correct according to terminology https://wiki.koha-community.org/wiki/Terminology#L
Also in opac-user.pl ":" is missing, it generates new translation entries.
Test plan:
1) Log out if you are logged in
2) Go to staff interface
3) Check you see button "Log in"
4) Go to OPAC page /cgi-bin/koha/opac-user.pl
5) Check you see fields "Login:" and "Password:"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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 b16f66abd1bc35a34f6ed0337f08ae87d6d8adbd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Sat, 7 Aug 2021 02:02:09 +0000 (16:02 -1000)]
Bug 28829: Remove single quote escaping in value_builder/unimarc_field_4XX.pl
Since Bug 23777 added To.json, single quote escaping in value_builder/unimarc_field_4XX.pl is useless.
Test plan:
1) Use UNIMARC database
2) Define value builder unimarc_field_4XX on 463$t
3) Create a record B1 with 200$a : L'avion
4) Create a record B2
5) Click on value builder in 463$t
6) Search for record B1
7) Click on "Choose"
=> Without patch 463$t contains : L\'avion
=> With patch 463$t contains : L'avion
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 a14b3fbcfe9edff8a4b110b8c675086973b91b21) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Andreas Roussos [Fri, 17 Sep 2021 13:51:51 +0000 (15:51 +0200)]
Bug 28472: (follow-up) add unit test for the case where location = NULL
This patch adds an extra unit test, to cover the case where the
UpdateItemLocationOnCheckin System Preference is set to "_ALL_: CART"
and the item being returned has no shelving location set.
Test plan:
1) Apply the patch provided earlier
2) prove -v t/db_dependent/Circulation/issue.t
...and sign off if all tests pass.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
JD amended patch: use 'is' instead of 'ok'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d26e754f03bd21857f768911c1373c80cc14476b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Andreas Roussos [Fri, 2 Jul 2021 11:12:21 +0000 (13:12 +0200)]
Bug 28472: handle items with NULL shelving location
The UpdateItemLocationOnCheckin System Preference can be set to update the
location of ALL items during check in, regardless of their shelving location.
However, this does not currently work 100% as it is excluding items with no
shelving location (i.e. value of NULL in the corresponding database field).
This patch, based on the comment made by Nick Clemens, fixes that.
Test plan (based on the original Bug Description by Andrew Fuerste-Henry):
1) Have a shelving location CART
2) In UpdateItemLocationOnCheckin, enter "_ALL_: CART" (without the quotes)
3) Check in an item that has a shelving location, confirm it changes to CART
4) Check in an item with a NULL shelving location, confirm it doesn't go to CART
5) Apply this patch
6) Repeat step 4): this time the item should move to the CART shelving location
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 d1bf0469d873b01b457f0f6d897443403cdbebbb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 9 Sep 2021 15:21:10 +0000 (15:21 +0000)]
Bug 28986: Remove (All) notation to correctly select rule for editing
This patch updates the JS comparison code to remove the '(All)' hint before comparing
to the current value
To test:
1 - Go to Administration -> Item types
2 - Edit a type to have a parent of another type
3 - Go to Administration -> Circulation and fines rules
4 - Add a rule for all categories for the child itemtype
5 - Add a rule for all categories for the parent itemtype
6 - Click edit on child type, note itemtype dropdown in editor correctly selected
7 - Click edit on parent type - note itemtype dropdown menu refers to 'All' itemtypes
8 - Apply patch
9 - Reload page and edit parent type rule
10 - Itemtype dropdown is correctly populated
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 5abd74c805cecb13c740cbcdf7764bfd1eb4cda8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 11 Aug 2021 15:30:36 +0000 (15:30 +0000)]
Bug 28845: Match against the full limit string, not just the group id
To test:
1 - Add to OPAC virtual host in apache conf:
SetEnv OPAC_SEARCH_LIMIT branch:multibranch-1
SetEnv OPAC_LIMIT_OVERRIDE 1
RequestHeader add X-Koha-SetEnv "OPAC_SEARCH_LIMIT branch:multibranchlimit-1"
RequestHeader add X-Koha-SetEnv "OPAC_LIMIT_OVERRIDE 1"
2 - Enable system preference OpacAddMastheadLibraryPulldown
3 - Create a library group enabled as OPAC search group (or make sure existing group 1 is an OPAC search group)
4 - Load the opac - dropdown does not pree-select the search group
5 - Apply patch
6 - Relaod opac - group is pre-selected!
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 fc0cfd29377df00951c7c8da0caf472bb1fbee26) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 7 Jul 2021 15:39:43 +0000 (15:39 +0000)]
Bug 28676: Cache and retrieve match_count when searching a cached heading
We use match_count to determine if a new authority record should be created, however,
we were not adding this count to the cache, so if a record returned too many matches on first
lookup, we would create a new record on the second lookup
To test:
1 - Set Linker Module to 'Default'
2 - Enable AutoCreateAuthorities and BiblioAddsAuthorities and CatalogModuleRelink and LinkerRelink
3 - Add two copies of a single authority via Z39
4 - Add two headings for that authority to a bib record (e.g. a 610 and 710)
5 - Save the record and note a new authority is generated
6 - Repeat and see another is generated
7 - Apply patch
8 - Restart all the things
9 - Save the record again, no new authority created
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> 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 c46cefb7c505e31bf3c0683f1f5ce3e08a1cd6f4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Tue, 7 Sep 2021 11:14:03 +0000 (12:14 +0100)]
Bug 28960: Explicitly call get_column
This patch adds get_column to ensure we are returning a string value of
a field rather than accidentally triggering a relationship accessor.
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 c3ef810a546ac35557484e12d7c2ff10c471b62d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 28772: Make secret validation use the new method
This patch makes the Koha::OAuth library use the new validation method
To test:
1. In master, enable RESTOAuth2ClientCredentials and have your
superlibrarian patron a client_id/secret pair generated
2. Use Postman to gain an access token with the client_id/secret pair
=> SUCCESS: This works in Koha
3. Use the access token to GET /api/v1/patrons
=> SUCCESS: It works
4. Apply this patchset up to the regression tests
5. Run:
$ updatedatabase
$ koha-plack --restart kohadev
=> SUCCESS: All good
6. Repeat 2
=> FAIL: You get an error trying to acquire an access token. Boo
7. Run:
$ kshell
k$ prove t/db_dependent/api/v1/oauth.t
=> FAIL: Tests fail!
8. Apply this patch
9. Run:
$ koha-plack --restart kohadev
$ kshell
k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass!
10. Repeat 2
=> SUCCESS: Your original client_id/secret pair works!
11. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch makes the apikeys.pl display the generated API secret once,
when generated. After that, it won't be displayed by the UI.
To test:
1. Generate a new API key
=> FAIL: The secret is displayed in the API keys table
2. Visit some other page, and go back to the API keys page
=> FAIL: The API key secret is there
3. Apply this patch
4. Go to More > Manage API keys
=> SUCCESS: It no longer displays the secret
5. Generate a new API key
=> SUCCESS: The API key details (including the secret) are displayed.
=> SUCCESS: A message telling to copy the secret because it won't be
displayed again is shown.
6. Repeat 4
=> SUCCESS: The secret is no longer displayed
7. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 28772: Add a warning about hash_password usage in updatedatabase.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 28772: Make Koha::ApiKey->store encrypt the secret
This patch refactors the Koha::ApiKey class so:
- It encrypts the generated secret
- Allows accessing the plain text secret only immediately after the key
creation (this implies that it won't be accessible if the key is
fetched from the DB).
- It implements an allow list for attributes, that are not read only.
Changing any other of them will make ->store throw an exception.
- A method for validating plain text secrets against the encrypted one
is added.
- A method for accessing the plain text secret is added. Returns undef
if the object is not 'fresh'.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/ApiKey.t
=> SUCCESS: Tests pass! Expected behavior is confirmed
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Petro Vashchuk [Tue, 10 Aug 2021 15:08:53 +0000 (18:08 +0300)]
Bug 28759: limit accessibility for "Manage API keys"
This patch limits the accessibility for "Manage API keys" section only
to superlibrarians and the owner of that said API key account.
The way it does it is by checking if user is superlibrarian or if
logged-in user is the same as a patron id/borrower number is the same
as logged-in user number both in template and apikeys.pl and making sure
the link is inaccessible or redirects to the 403 page if user tries to
go there directly.
To reproduce:
1) create/pick existing patron, set Staff access, allows viewing
of catalogue in staff interface (catalogue)" and "Add, modify and
iew patron information (borrowers)" permissions on;
2) enable "RESTOAuth2ClientCredentials" in sysprefs;
3) login with that user into staff interface;
4) check any other patron, go to the "More"->"Manage API keys" and
check that you can see, add delete their API keys;
5) apply patch;
6) with that same user try to access "Manage API keys" page again.
Ensure that you can't access that page of other patrons but can
access your own page and manage your own API keys.
7) log in with superlibrarian now and ensure that you can access every
"Manage API keys" page of every patron and apply changes there.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 Sep 2021 09:51:48 +0000 (11:51 +0200)]
Bug 28941: Filter suggestion inputs at the OPAC
The following sequence is bad:
46 my $suggestion = $input->Vars;
181 &NewSuggestion($suggestion);
All columns can be set when we insert the suggestion into the DB
We definitely want to avoid the following fields to be set by the final
user: acceptedby, accepteddate, STATUS, etc...
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 31 Aug 2021 15:12:22 +0000 (17:12 +0200)]
Bug 28929: Add selenium tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 28929: (follow-up) Add exec flag to tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Lucas Gass [Wed, 1 Sep 2021 14:17:21 +0000 (14:17 +0000)]
Bug 28392: make streettype and B_streettype work with BorrowerUnwantedField
To test:
1. Add values to the AV ROADTYPE
2. Go to the BorrowerUnwantedField system preference and attempt to hide streettype and B_streettype.
3. It doesn't work, the fields still show.
4. Apply patch
5. Repeat step 2, it should work now.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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 5c262d4511428446ae46594792e0190db5130d4d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Mon, 23 Aug 2021 22:34:13 +0000 (00:34 +0200)]
Bug 21794: Fix display of addresses on details tab in staff when city is empty
If the city field was not filled out on the main or alternate address,
the content of state, country and zipcode wouldn't display on the
Details tab in the patron account in staff.
To test:
- Enter main contact and alternate address without city
- Verify that the address information isn't shown on the details
tab after saving
- Apply patch
- Verify that the information is displayed now
- Toggle AddressFormat and check display is correct for all settings
- Switch back to US address format
- Try several combinations of empty fields for city, zipcode, country
and state. The punctuation and whitespace should always appear
correctly.
Examples:
- Enter just country
- Enter zipcode and country
- ...
Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> 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 423a600ad1401ced777dc53e3fc9ceb78d073a91) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lucas Gass [Wed, 1 Sep 2021 16:24:52 +0000 (16:24 +0000)]
Bug 28936: Add sort1/sort2 to borrowers.json
To Test:
1. Check the BorrowerMandatoryField and BorrowerUnwantedField system preferences, sort1 and sort2 cannot be hidden or required
2. Apply patch
3. Check the BorrowerMandatoryField and BorrowerUnwantedField system preferences again, you should see sort1 and sort2
4. Since sort1 and sort2 are now added to borrowers.json we must also check the system preferences PatronQuickAddFields & PatronDuplicateMatchingAddFields
5. They should both now include sort1 and sort2, check to make sure they work with these two system preferences
6. Look at the system preferences PatronSelfRegistrationBorrowerMandatoryField, PatronSelfRegistrationBorrowerUnwantedField, and PatronSelfModificationBorrowerUnwantedField
7. sort1 and sort2 should be disabled in these OPAC system preferences
This patch does not attempt to add sort1 or sort2 to the self reg or borrower mod pages. If they should be added, which I am not sure they should, we should do so in a seperate bug
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.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 73a711b41ff7dd0ba4e35d7643a793a7addb7cfe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 10265: (QA follow-up) Make if-else checks consistent
The != '' version doesn't check for the whitespace existing and thus
might have added the punctuation without the partNumber or partName being
inserted at all.
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 179ce7d99728f1cbd552e9920062d6c7c98036d6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Sun, 22 Aug 2021 03:29:47 +0000 (03:29 +0000)]
Bug 10265: Keep punctuation for 8xx series added entry fields (MARC21)
At the moment the punctuation entered for $n $p and is
removed in the part template, which leads to displaying the subfields
without any punctuation and spaces in between.
To test:
- Catalog records with various combinations of 8xx series added
entry fields. Subfield a, t, n, p and v are the most important.
- Verify the display in OPAC and staff is not great.
- Apply the patch.
- Verify the display in OPAC and staff is improved.
For examples see:
https://www.loc.gov/marc/bibliographic/bd80x83x.html
Important note: At the moment 8xx series added entry fields will only display, when
there is also a 490 ind. 1 = 1 field present.
Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> 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 a9d66c087a2cd609b3181472ae47377df1d0a840) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Fri, 27 Aug 2021 14:56:08 +0000 (16:56 +0200)]
Bug 28912: Prevent Pseudonymization to be set if bcrypt_settings not set
If Pseudonymization is set but the bcrypt_settings config used by the
feature is not set, then there is an ugly 500 on checking out.
bad bcrypt settings at /kohadevbox/koha/Koha/PseudonymizedTransaction.pm line 116.
However it's pretty hard to handle correctly this exception (and that's
why it hasn't be done initially). However we could prevent the pref to
be turned on if the config entry is not present.
Test plan:
Remove the bcrypt_settings from the config
Try to turn the syspref on
Add the config
Try to turn the syspref on/off
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
JD amended patch: fix qa failures
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 f73868b8ee121103e7406e26b20e9cf3ccae4eb7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>