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>
David Nind [Sat, 18 Sep 2021 21:57:41 +0000 (21:57 +0000)]
Bug 28438: (follow-up) Capitalization: Various corrections
One mdditional correction.
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>
Owen Leonard [Wed, 9 Jun 2021 12:27:29 +0000 (12:27 +0000)]
Bug 28438: Capitalization: Various corrections
This patch makes capitalization corrections to many templates in the
OPAC and staff interface. A exhaustive test plan would be huge, so I
recommend examining the patch to confirm that it contains correct case
changes.
If you want to make it easier to examine changes you can try:
https://github.com/so-fancy/diff-so-fancy
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>
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>
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>
Bug 29067: Remove duplicate conditional statement from OPAC messaging settings title
We can never reach the first [% ELSE %]Koha online[% END %] block in OPAC
messaging preferences title, so it's dead code.
This patch removes the useless duplicate if-statement.
To test:
1. Enable EnhancedMessagingPreferencesOPAC system preference
2. Go to /cgi-bin/koha/opac-messaging.pl
3. Observe title Your messaging settings > Koha online catalog
4. Apply patch
5. Refresh page /cgi-bin/koha/opac-messaging.pl
6. Observe same title Your messaging settings > Koha online catalog
7. See patch content
8. Confirm there are no functional changes in the new logic
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>
Bug 28934: Make the OPAC registration form design consistent
The gender/sex and GDPR inputs were slightly misaligned (by
1.5em). Now they are aligned with the other inputs which have a width
of 10em (9em width + margin 1em). The label assignments and required
attributes for input elements are made also consistent.
To test:
1) Enable GDPR_Policy syspref
2) Apply patch, run "yarn build --view opac", restart plack
3) Go to /cgi-bin/koha/opac-memberentry.pl
4) Check that the GDPR input box shows the required text now in red
color
5) Check that the alignment of sex/gender and GDPR input matches with
the other inputs perfectly.
Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> 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>
Bug 29064: Remove duplicate term Most popular titles
To test:
1. Enable system preference OpacTopissue
2. Go to OPAC /cgi-bin/koha/opac-topissues.pl
3. Observe title Most popular titles › Koha online catalogMost popular titles
4. Apply patch
5. Observe title Most popular titles › Koha online catalog
6. See that this path complies with Bug 27742
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>
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>
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>
Bug 29049: (QA follow-up) Initialize uninitialized variable to prevent warning
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>
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>
Nick Clemens [Fri, 17 Sep 2021 16:18:09 +0000 (16:18 +0000)]
Bug 29049: (follow-up) Reduce number of line returns in page
While moving the dropdown to a block, I noticed the page size was very large when there are many holds
This patch chomps a large amoutn of whitespace, from the block and elsewhere and drecreased the paeg from about 400k lines to 25k lines for a record with ~200 holds
To test:
1 - Apply previous patch
2 - Load holds tab for a biblio
3 - Save the page as html from your browser, note the size of the file
4 - Apply patch this
5 - Reload and repeat
6 - Note the size is much smaller
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>
Nick Clemens [Fri, 17 Sep 2021 13:59:25 +0000 (13:59 +0000)]
Bug 29049: Simplify holds priority dropdown logic on request.pl
This patch makes a few changes:
1 - If we are not splitting the queue ( HoldsSplitQueue == 'nothing' ) then
there are no changes for 'virtual' vs 'actual' numbering
2 - If we are splitting the queue you cannot use the dropdown, so we do not need to process the options
3 - If the hold is 'found' we do not need to process the options
4 - We can simply use the 'last priority' to build the options, we do not need to process in the script
5 - We can use a block to build the options
6 - Remove a stray holds.index
To test:
1 - Place 5 holds on a bib
2 - 'Find' two of the holds i.e. check them in to set status to 'transit' or 'waiting'
3 - View the holds page for the biblio
4 - Inspect the priorty dropdown for the found holds, note they have options for 1-5 but are disabled
5 - Note the dropdowns for other holds have options 1-5
6 - Note options 4&5 in the dropdowns have no effect
7 - Apply patch
8 - Inspect the priority dopdowns on the found holds
9 - Note they only show their found status
10 - Note the other dropdowns only show options 1-3
11 - Test with other HoldsSplitQueue options and HoldsSplitQueueNumbering
12 - When holds queue is split, no dropdowns should be active and should show only their current priority
13 - When HoldsSplitQueueNumbering is 'virtual' the dropdown should be disabled and correctly count the number of unfound holds in the list
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
JK: Fixed grammar in commit title Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
JD: Remove trailing 'i'
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>
Henry Bolshaw [Mon, 20 Sep 2021 23:38:17 +0000 (23:38 +0000)]
Bug 29070: Accessibility OPAC Purchase suggestions box on search results page has insufficient contrast
This patch changes the text colour for the purchase
suggestion box on the OPAC search results page to
make the text easier to read and improve accessibility.
To test:
1. Log in to the OPAC and search for something
2. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to check the contrast ratio
3. Confirm that the Purchase suggestion text
fails to meet accessibility requirements
4. Apply the patch and rebuild CSS:
yarn build --view opac
5. Confirm the text contrast ratio now meets
minimum accessibility requirements
6. Check that the OPAC still looks ok after
the changes.
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>
Henry Bolshaw [Mon, 20 Sep 2021 22:45:55 +0000 (22:45 +0000)]
Bug 29068: Accessibility OPAC search results summary text has insufficient contrast
This patch changes the colour of the label text in
OPAC search results to increase the contrast ratio,
improve accessibility and make the text easier to read.
To test:
1. Search for something on the OPAC
2. Use an accessibility tool (e.g. Chrome's Lighthouse
tool) to check the contrast ratio
3. Confirm that the labels (Edition, Format etc.) in the
results summary have insufficient contrast
4. Apply the patch and rebuild CSS:
yarn build --view opac
5. Use the accessibility tool to confirm the contrast
ratio now meets minimum accessibility requirements
6. Check that the OPAC still looks ok after the changes
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>
Henry Bolshaw [Mon, 20 Sep 2021 22:27:23 +0000 (22:27 +0000)]
Bug 29065: Accessibility OPAC clear search history link has insufficient contrast
This patch changes the colour of the clear search history link
on the OPAC to increase the contrast ratio, improve accessibility
and makes the text easier to read.
To test:
1. Go to the OPAC homepage
2. Use an accessibility tool (e.g Chrome's
Lighthouse tool) to check the contrast ratio
3. Confirm that the clear search history link
has insufficient contrast
4. Apply the patch and rebuild css:
yarn build --view opac
5. Confirm that the contrast ratio now
meets minimum accessibility requirements
6. Check the OPAC still looks ok after the changes
Signed-off-by: Owen Leonard <oleonard@myacpl.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>
Henry Bolshaw [Mon, 20 Sep 2021 21:10:15 +0000 (21:10 +0000)]
Bug 29038: Accessibility OPACUserSummary heading doesn't have sufficient contrast
This patch changes the colour of the OPAC User Summary heading text to
increase the contrast ratio, improving accessibility and making the
text easier to read.
To test:
1. Log in to the OPAC homepage as a user with items checked out
2. Use an accessibility tool (e.g. Chrome's Lighthouse tool) to test the
contrast ratio.
3. Confirm the UserSummary heading has insufficient contrast.
4. Apply the patch and rebuild css:
yarn build --view opac
5. Use the accessibility tool to confirm the contrast ratio now meets
accessibility requirements
6. Check that the OPAC still looks ok after the changes
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>
Henry Bolshaw [Thu, 16 Sep 2021 07:55:01 +0000 (07:55 +0000)]
Bug 29037: Accessibility: OPAC links don't have sufficient contrast
This patch changes the colour of links on the OPAC
to improve the contrast ratio and make the link
text easier to read. This accessibility issue was
identified using the WebAIM WAVE accessibility
browser extension and Google Chrome's Lighthouse
tool.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to test the contrast ratio.
2. Confirm that some links (e.g. breadcrumb links
and title links in search results) have
insufficient contrast.
3. Apply the patch and rebuild the OPAC CSS:
yarn build --view opac
4. Use the accessibility tool to confirm the
contrast ratio meets minimum requirements
5. Check that the OPAC still looks ok after the
changes.
Signed-off-by: Owen Leonard <oleonard@myacpl.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>
Henry Bolshaw [Thu, 16 Sep 2021 12:53:12 +0000 (12:53 +0000)]
Bug 29035: Accessibility: OPAC masthead_search label doesn't have sufficient contrast ratio
This patch changes the colour of the masthead
search label to improve accessibility and make it
easier to read.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to test the contrast ratio.
2. Confirm that the search label has insufficient
contrast.
3. Apply the patch and rebuild the OPAC CSS:
yarn build --view opac
4. Use the accessibility tool to confirm the
contrast ratio now meets accessibility
requirements.
5. Check that the OPAC still looks ok after
the changes.
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>
Henry Bolshaw [Thu, 16 Sep 2021 08:35:39 +0000 (08:35 +0000)]
Bug 29034: Accessibility: OPAC nav links don't have sufficient contrast ratio
This patch changes the colour of the navigation
links on the OPAC (Cart, Lists etc.) to improve
the contrast ration and make them easier to read.
To test:
1. Use an accessibility tool (e.g. Chrome's
Lighthouse tool) to check the contrast
ratio on the OPAC
2. Confirm that the navigation links have
insufficient contrast
3. Apply the patch and rebuild the OPAC css:
yarn build --view opac
4. Use the accessibility tool to confirm
the contrast ratio meets the minimum
accessibility requirements
5. Check that the OPAC looks ok after the
changes
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>
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>
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>
Marcel de Rooy [Thu, 19 Aug 2021 11:42:36 +0000 (11:42 +0000)]
Bug 27461: Add tests for biblio_008
Test plan:
Run t/db_dependent/FrameworkPlugin.t
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>
Marcel de Rooy [Thu, 19 Aug 2021 09:52:14 +0000 (09:52 +0000)]
Bug 27461: Move hardcoded value to module
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>
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>
Bug 28927: (follow-up) remove rule on id=opacheader in opac CSS
Actually this rule does nothing, it defines same background color as "body" : #fcf9fc
Test plan :
1) Without patch look at OPAC header
2) With patch OPAC header should have same background color
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> 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>
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>
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>
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>
Nick Clemens [Tue, 21 Sep 2021 15:15:15 +0000 (15:15 +0000)]
Bug 29073: Use 0 and 1 as values for DefaultHoldExpirationdate
DefaultHldexpirationDate is set in the pref screen to 'yes/no'
The code checks if the preference is 'true', 'no' is true
We should instead use 1/0
To test:
0 - Have a fresh devbox
1 - With syspref disabled, place a hold
2 - Note no expiration date set
3 - Enable the preference
4 - Place a hold and note the expiration date is set, good
5 - Disable the pref
6 - Place a hold and note the expiration date is set, bad
7 - Apply patch
8 - Update database
9 - Repeat 1-8, date not set when pref disabled
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>
Bug 29072: Move reference route /cities spec to YAML
This patch moves the /cities routes spec and related files into YAML so
devs can use it as a reference for future routes.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
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>
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>
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>
Argument "" isn't numeric in numeric gt (>) at
/usr/share/koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/
addbiblio.tt line 896.
Came across it when testing 28608. Could have been a QA follow-up.
Test plan:
If you run QA tools on this patch, you should see the warning only
when processing files before patches.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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>
Martin Renvoize [Wed, 1 Sep 2021 14:58:04 +0000 (15:58 +0100)]
Bug 28316: (QA follow-up) Make clean_search_term public
With all the work that's gone into improving the internal
_clean_search_term method I feel we should expose it publically as it's
going to be more widely helpful
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
Petro Vashchuk [Mon, 6 Sep 2021 13:46:45 +0000 (16:46 +0300)]
Bug 28316: escape ES ranges if QueryAutoTruncate is enabled
if QueryAutoTruncate enabled we will have any special operators ruined
for example: "test [6 TO 7]" will be converted to "test* [6* TO* 7]"
so no reason to keep ranges when QueryAutoTruncate set to "enabled"
1) enable QueryAutoTruncate at your sysprefs.
2) perform a search using range, for example: "[1999 TO 2020]",
it shouldn't work the way it's supposed to.
3) apply the patch.
4) perform the same search with range, ensure that it works correctly.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
Petro Vashchuk [Mon, 14 Jun 2021 13:38:51 +0000 (16:38 +0300)]
Bug 28316: avoid messing up regexes in the search queries
This patch ensures that the behavior with
QueryRegexEscapeOptions set to values other than
"Escape" still will works as expected.
It does so by storing the contents of regexes
before escaping special characters and
then restores the contents of regexes back to how
it was before, ensuring that searching with regex is possible.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
Petro Vashchuk [Fri, 18 Jun 2021 07:44:56 +0000 (10:44 +0300)]
Bug 28316: escape exclamation signs in the query
Currently having exclamation sign at the end of the query makes ES
search fail, and when you try to search for a book that has exclamation
sign in the tittle (something like "Words! words") won't show results
correctly as it tries to negate everything that is after exclamation
sign, making it impossible to search for books that have in in the title
This patch escapes exclamation signs if it's at the end of the query or
has a space after it, resolving both of the issues listed above.
To reproduce:
1) with ES enabled, search for the book with title that contains
exclamation sight at the end, like "book!", this search should result
in error.
2) do another search, but this time find/prepare beforehand book with a
title that has exclamation sign with a space after it,
e.g "exclamation! sign", it shouldn't find it as ES treats everything
after that exclamation sign as negation.
2) apply the patch.
3) perform searches from the steep one and two again.
Search from step one should no longer fail, while search from the step
two should find that book.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
Petro Vashchuk [Tue, 13 Jul 2021 09:13:03 +0000 (12:13 +0300)]
Bug 28316: escape brackets in the search query
This patch screens square and curly brackets which have no special
language meaning.
To reproduce:
1) using ES, search for the book with title that contains
square and/or curly brackets, like "book [second edition]", which will
result in error.
2) apply the patch.
3) search for that book again, ensure that it works now.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
Petro Vashchuk [Fri, 18 Jun 2021 07:43:14 +0000 (10:43 +0300)]
Bug 28316: screen unquoted semicolons and all followup colons
Currently searches like: "book:", ":book" and "host-item:test:n"
cause internal server errors.
This patch adds additional regexes that remove the colons at the start
and end of the query, and another regex that screens all follow-up
colons that go after the first colon to avoid errors when searching for
"host-item:test:n".
To reproduce:
1) using ES, search for the book with title that contains
semicolon at the start or at the end of the line, separated with spaces,
this should cause internal server error.
2) try doing the same with something like "host-item:test:n", it should
result in error as well.
3) apply the patch.
4) repeat steps 1-2, ensure that it works now.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
Petro Vashchuk [Tue, 15 Jun 2021 07:40:27 +0000 (10:40 +0300)]
Bug 28316: add tests
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
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>
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>
Kyle M Hall [Tue, 30 Jun 2020 16:20:39 +0000 (12:20 -0400)]
Bug 28228: Supress plugin related error message
Use of uninitialized value in subroutine entry at /usr/share/koha/lib/Koha/Plugins/Base.pm line 182.
Test Plan:
1) Install the Kitchen Sink plugin ( it does not have a max versio defined )
2) Note the warning in your logs
3) Apply this patch
4) Restart all the things
5) No warning!
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>
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>
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>
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>
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>
Nick Clemens [Tue, 7 Sep 2021 11:57:48 +0000 (11:57 +0000)]
Bug 28845: (follow-up) Retain selection when using advanced search
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>
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>
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>
Nick Clemens [Wed, 7 Jul 2021 15:39:21 +0000 (15:39 +0000)]
Bug 28676: Unit test
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>
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>
We were modifying the occurrences of:
Koha::Patron::Categories->search_limited;
with:
Koha::Patron::Categories->search_with_library_limits;
But between the patch submission and the push, another occurrence has
been added by bug 23590.
Test plan:
Create a new suggestion from staff and click "select manager"
Without the patch, notice the error:
The method Koha::Patron::Categories->search_limited is not covered by tests!
With the patch applied everything is working correctly
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>
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> Signed-off-by: Kyle M Hall <kyle@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>
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>
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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 3 Sep 2021 10:01:12 +0000 (12:01 +0200)]
Bug 28947: Prevent OPAC user to create new users
This patch prevents an existing user from exploiting the patron edit form in order to
force create new patrons
To test:
Try all combinations of PatronSelfRegistration and PatronSelfRegistrationVerifyByEmail
with and without this patch.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Nick Clemens [Mon, 13 Sep 2021 12:56:30 +0000 (12:56 +0000)]
Bug 28935: (QA follow-up) Use BorrowerUnwantedField on staff client
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 28935: No filtering on patron's data on member entry pages
Security patch. Follow-up for 28929.
Including correction for gonenoaddress and two others.
Includes unwanted fields too now.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 31 Aug 2021 13:55:15 +0000 (15:55 +0200)]
Bug 28929: Prevent flags to be sent during patron's edition
* selfreg and selfmod for OPAC
* patron's edition on staff
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested OPAC and staff side. Prevents mangling flags column.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Owen Leonard [Wed, 14 Apr 2021 17:43:38 +0000 (17:43 +0000)]
Bug 28149: Improve internationalization and formatting on background jobs page
This patch adds some logic to the background jobs template in order to
make job status and job type translatable. Output of dates has been
changed to use the KohaDates plugin, using the "with_hours" flag.
This patch also modifies the page title and breadcrumbs so that if one
is viewing the details of a background job the page title and
breadcrumbs reflect this.
I've also added inclusion of the preferences search form in the header,
the default for administration pages which don't have their own search.
To test, apply the patch and go to Administration -> Background jobs.
- If there are no background jobs listed, submit at least one batch of
bibliograhpic records and at least one batch of authorty records for
modification (Tools -> Batch record modification).
- In the table of background jobs, the status should be shown
correctly. If you see it capitalized ("Finished") you're seeing the
new string in the template which will be used for translation.
- In the "Type" column, you should see either "Batch authority record
modification" or "Batch bibliographic record modification"
- In the "Queued," "Started," and "Ended" columns the date should be
formatted according to your system's dateformat system preference,
including the time.
- View the details of a background job. The same changes to status and
type should be seen on this page, as well as the date formatting of
the date fields.
- In the breadcrumbs, confirm that it shows a link to the
background jobs page followed by "Details if job #X".
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
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>