]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 29524: (bug 28935 follow-up) Restore modification of some patron's attributes
Jonathan Druart [Mon, 22 Nov 2021 13:24:40 +0000 (14:24 +0100)]
Bug 29524: (bug 28935 follow-up) Restore modification of some patron's attributes

On
  commit 5f37d8d2f496ce3c9fd6dfd5a2efa7a9fe435af3
  Bug 28935: No filtering on patron's data on member entry pages
we restricted the list of the columns from the borrowers table that can
be modified from the patron edit view.
We were too restrictive, the following 3 attributes can be edited from
this form: privacy_guarantor_fines, privacy_guarantor_checkouts,
checkprevcheckout and lang

Test plan:
Turn on the following prefs:
- AllowStaffToSetFinesVisibilityForGuarantor
- AllowStaffToSetCheckoutsVisibilityForGuarantor
- CheckPrevCheckout (set to 'unless overridden *')
- TranslateNotices
Edit a patron and see the 4 different options are now displayed.
Change their value, save, edit again
Confirm that the values have been saved

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 0ca1419b26be84f7670f60446e621cfd878f6580)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29300: REVERT
Victor Grousset/tuxayo [Thu, 25 Nov 2021 02:17:35 +0000 (03:17 +0100)]
Bug 29300: REVERT

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29300#c13

This reverts commit ffeb0b619172922bd94ab472b2b6a4b0eca65bd1.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoIncrement version for 20.05.18 release
Victor Grousset/tuxayo [Wed, 24 Nov 2021 23:43:57 +0000 (00:43 +0100)]
Increment version for 20.05.18 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoFix translations for Koha 20.05.18
Victor Grousset/tuxayo [Wed, 24 Nov 2021 23:42:38 +0000 (00:42 +0100)]
Fix translations for Koha 20.05.18

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoTranslation updates for Koha 20.05.18
Koha translators [Wed, 24 Nov 2021 13:11:13 +0000 (10:11 -0300)]
Translation updates for Koha 20.05.18

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29452: remove unnecessary warns in the logs
Christophe Croullebois [Wed, 10 Nov 2021 15:23:54 +0000 (16:23 +0100)]
Bug 29452: remove unnecessary warns in the logs

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 8c8c7d77cfb220a7317739a4d84af48a466e569b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit af3dd5945fde6613d42e0dc0ed94f616f865ca3c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29255: Built-in offline circulation broken with SQL error
Owen Leonard [Fri, 15 Oct 2021 18:27:16 +0000 (18:27 +0000)]
Bug 29255: Built-in offline circulation broken with SQL error

This patch makes a minor correction to one of the queries used when
synchronizing transactions in the built-in offline circulation system.
This fixes the error:

DBD::mysql::st execute failed: Column 'branchcode' in field list is
ambiguous at /kohadevbox/koha/offline_circ/download.pl line 84

To test you must be using a browser which still supports
applicationCache (Firefox before version 81, Chrome before version 94).

- Apply the patch and restart services.
- Enable the AllowOfflineCirculation system preference.
- Go to Circulation -> Built-in offline circulation interface.
- Click "Synchronize."
- Click the "Download records" button.
- After the page refreshes you should see updated dates where it lists
  "last synced" information.

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 6501ff67ac1b7942f424bed458314efb0132bd68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7f21bd6a5e796bc5358c98448181d3e779f7a8c5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29264: SIP config allows use of non-branchcode institution ids causes workers...
Kyle M Hall [Mon, 18 Oct 2021 12:28:27 +0000 (12:28 +0000)]
Bug 29264: SIP config allows use of non-branchcode institution ids causes workers to die without responding

If is entirely possible to create an SIP institution whose ID does not match a valid branchcode in Koha's SIP config. In fact, Koha's example SIP config contains an example of this ( kohalibrary / kohalibrary2 ).

If a SIP login uses an institution with an id that doesn't match a valid branchcode, everything will appear to work, but the SIP worker will die anywhere that Koha gets the branch from the userenv and assumes it is valid.

The repercussions of this are that actions such as the checkout message simply die and do not return a response message to the requestor.

At the very least, we should output a warning to the SIP log.

I think we should strongly consider disallowing institution ids in the SIP config that do not match valid branchcodes. In this scenario, attempting to start the SIP server should result in a error message with the SIP server exiting immediately.

Test Plan:
1) Apply this patch
2) Make a sip login that uses an instution whose id is *not* a valid branchcode
3) Start the SIP server
4) Check sip.log, you should see a warning similar to the following:
[2021/10/18 12:18:29] [2068079] [ERROR] ERROR: Institution kohalibrary does does not match a branchcode. This can cause unexpected behavior. C4::SIP::Sip::siplog /kohadevbox/koha/C4/SIP/Sip.pm (220)

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 8e1f0cfc8dd71c507af83f9f8033ba9c84d0b293)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 95e9bb9b084feb9ab953e24a4cc955e000adddf3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29204: (QA follow-up) Fix variable name
Joonas Kylmälä [Sat, 6 Nov 2021 14:16:38 +0000 (14:16 +0000)]
Bug 29204: (QA follow-up) Fix variable name

The patch "Bug 29204: Fix reports/issues_stats.pl for MySQL 8"
accidentally changed the variable name from $strsth2 to $strsth

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5d2f51f9ad9ec5f46cc7a5ef2264ad9c5a188199)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fcf669369772c0a96a96dc3049e4cc6d1be2dea9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29204: Fix reports/issues_stats.pl for MySQL 8
Jonathan Druart [Tue, 19 Oct 2021 09:08:29 +0000 (11:08 +0200)]
Bug 29204: Fix reports/issues_stats.pl for MySQL 8

Error was: Incorrect DATETIME value: ''

Test plan
Go to Reports -> Circulation
On Period select "Row" or "Column" and choose a date
Submit

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9a4b7b1948ecba51c942bdbb6b202981a6cce144)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b7f34812561d23393042c8d2e084f3e47e4371f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29416: (bug 28941 follow-up) Restore suggestion prefill
Jonathan Druart [Fri, 5 Nov 2021 09:13:47 +0000 (10:13 +0100)]
Bug 29416: (bug 28941 follow-up) Restore suggestion prefill

From commit 586bed1319592e05f5dc3acf64a1dba8cae69d6b
     Bug 28941: Filter suggestion inputs at the OPAC

But later in the script we send { suggestion => %$suggestion } to the
template and so erase the variable previously passed.

Test plan:
Login at the OPAC
Go to the bibliographic detail page
Suggest for purchase
=> The form must be prefilled!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fbd3d2d762cd2889d6207770ebe5f96f34b727c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 668c5a9a3542ff17cb15ea73d82936fccadb957c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28904: Fix typo and display
Martin Renvoize [Mon, 1 Nov 2021 09:52:26 +0000 (09:52 +0000)]
Bug 28904: Fix typo and display

Fix typo in template: Newletter => Newsletter
Fix latest newsletter editor definition.. it's a has not an array.

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 ded631f39e82352a713a252af714b4e2907c4c2f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0695c74201fa4d2a8ddd22b7eddf91d1a72d6d8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28904: Update team list to include newsletter editors
Martin Renvoize [Wed, 27 Oct 2021 14:37:07 +0000 (15:37 +0100)]
Bug 28904: Update team list to include newsletter editors

It seems we stopped recording the newsletter editor as part of the team
for a while :(.

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 6c85c1eac7b77665269e2baa33643854e5108853)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ceeec5155dc77113d2113d877947202c562344e4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28904: Add newsletter editor to about page display
Martin Renvoize [Wed, 27 Oct 2021 14:27:45 +0000 (15:27 +0100)]
Bug 28904: Add newsletter editor to about page display

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 77448b618d1865a21815d434f071a223d706f21b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86282f26d1ecbaeec00d2a97f4578914dede4bdd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 26871: Flush SIP2 cache on every SIP request
Joonas Kylmälä [Sun, 10 Oct 2021 11:01:29 +0000 (11:01 +0000)]
Bug 26871: Flush SIP2 cache on every SIP request

SIP connections tend to be long lived, weeks if not months, in the
libraries I see. Basically the connection per SIP machine is initiated
once when the SIP machine boots and then never closed until
maintanance needs to be done. Therefore we need to reset the Koha's L1
caches on every SIP request to get the latest sysprefs and configs
from the memcached cache that is shared between all the Koha
programs (intranet, opac, sip, cronjobs) and is guaranteed to be up to
date.

To test:
 0. Have kohadevbox
 1. Enable IssueLog
 2. In one terminal run the command "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml"
 3. Checkin and return a book using telnet:

    $ telnet localhost 6001
    9300CNterm1|COterm1|CPCPL|
    11YN20211010    10565320211010    105653AOCPL|AA1|AB3999900000001|ACterm1|BON|BIN|
    09N20211010    10564420211010    105644APCPL|AOCPL|AB3999900000001|ACterm1|BIN|

 4. Keep the telnet connection open and go to
    http://localhost:8081/cgi-bin/koha/tools/viewlog.pl and check that
    the *checkout* entry is in the circulation rules 5.
 6. Disable IssueLog
 7. Move back to the telnet prompt and check out and return a book again

    11YN20211010    10565320211010    105653AOCPL|AA1|AB3999900000001|ACterm1|BON|BIN|
    09N20211010    10564420211010    105644APCPL|AOCPL|AB3999900000001|ACterm1|BIN|

 8. Go check out the circulation logs and notice a new entry was added
    when it shouldn't have according to the IssueLog syspref!
 9. Apply patch and repeat steps to notice that the syspref is now
    followed correctly.

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 8fa126ee40eba088af32228a5e369cd8a526a126)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c502ba9aa6c221ed61e8f4c7309e90ff1b52f68e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 14999: Make sure order prices are not mixed-up
Joonas Kylmälä [Sat, 2 Oct 2021 12:28:52 +0000 (12:28 +0000)]
Bug 14999: Make sure order prices are not mixed-up

We were shifting the price and replacement price for imported orders
only after the line:

> $duplinbatch = $import_batch_id and next if $duplifound;

This lead to the "replacementprice" and "price" query parameters not
being shifted/removed from the list if a duplicate record came across
and caused the prices be applied to the next record being imported.

To reproduce:
 1) Download two records from koha to marcxml file, then cat those:
   cat bib1.marcxml bib2.marcxml > bibs.marcxml
 2) Delete bib2 from koha
 3) Stage bibs.marcxml for import
 4) Create a new order basket, then "Add to basket" using "From a
    staged file" option
 5) Select both bib1 and bib2 and set price & replacement price for
    bib1 to be 99.00 and for bib2 to be 88.00
 6) Click save and notice bib2 was imported with the wrong prices, 99.00!
 7) Apply patch and notice the prices are now correctly set to 88.00.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 58a69fb12944523391e5113ae6e326fd2d0887d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eb997ae320fba8c16902c8867f4588e4f3193a07)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 29300: Add 22.05 release team to teams.yaml
Martin Renvoize [Thu, 21 Oct 2021 12:10:35 +0000 (13:10 +0100)]
Bug 29300: Add 22.05 release team to teams.yaml

Add the 22.05 release team.

Test plan
1/ Check against
   https://wiki.koha-community.org/wiki/Release_Teams

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 cc8a49d2e3519efedb178412669a998ffe629225)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c4654df6735c596fe78ff448bb41ef768ff9ac17)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 26374: update from bug 19974 is not idempotent
Nick Clemens [Thu, 3 Sep 2020 16:35:57 +0000 (16:35 +0000)]
Bug 26374: update from bug 19974 is not idempotent

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 61b005822b19f051f38a30619926ca6c79c8e0da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 082646bd62cc023bf6e97862227fa91369f0140a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 20.05.17 release v20.05.17
Victor Grousset/tuxayo [Wed, 27 Oct 2021 19:18:23 +0000 (21:18 +0200)]
Update release notes for 20.05.17 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 20.05.17 release
Victor Grousset/tuxayo [Wed, 27 Oct 2021 18:53:49 +0000 (20:53 +0200)]
Increment version for 20.05.17 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 20.05.17
Victor Grousset/tuxayo [Wed, 27 Oct 2021 18:50:26 +0000 (20:50 +0200)]
Fix translations for Koha 20.05.17

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 20.05.17
Koha translators [Wed, 27 Oct 2021 18:21:01 +0000 (15:21 -0300)]
Translation updates for Koha 20.05.17

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 29134: (follow-up) Specify which borrowernumber
Nick Clemens [Fri, 8 Oct 2021 14:42:48 +0000 (14:42 +0000)]
Bug 29134: (follow-up) Specify which borrowernumber

When performing a search that includes permissions we need to specify we are comparing
the borrowers tabnle borrowernumber

To test:
1 - Browse to Admin->Funds
2 - Edit a fund
3 - Click '+ Add users'
4 - Attempt a search, no results
5 - Check plack-error.log
    C4::Utils::DataTables::Members::search(): DBI Exception: DBD::mysql::st execute failed: Column 'borrowernumber' in IN/ALL/ANY subquery is ambiguous at /kohadevbox/koha/svc/members/search line 80
6 - Apply patch
7 - Repeat 1-3
8 - search for 'a'
9 - Result!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 591ffce832f061f46d2ef642898f5891c0fe7827)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 29134: Use a subquery to increase performance of patron attributes search
Nick Clemens [Wed, 29 Sep 2021 12:26:59 +0000 (12:26 +0000)]
Bug 29134: Use a subquery to increase performance of patron attributes search

This patch generates a subquery and checks if a borrowrnumber is in the results to add patrons
to search results

To test:
 1 - Generate a bunch of patrons:
    SELECT surname, firstname, branchcode, categorycode FROM ( SELECT surname FROM borrowers ORDER BY rand() ) a,( SELECT firstname FROM borrowers ORDER BY rand() ) b,( SELECT branchcode FROM borrowers ORDER BY rand() ) c,( SELECT categorycode FROM borrowers ORDER BY rand() ) d LIMIT 50000
 2 - Add a patron attribute to the system and make it searchable - I used code 'TEST'
 3 - Add a value for this attribute to many patrons:
   INSERT INTO borrower_attributes (borrowernumber,code,attribute) SELECT borrowernumber, 'TEST','alphabet' FROM borrowers LIMIT 10000;
 4 - In staff client got 'Patrons'
 5 - Open the browser console (F12) and view the netwrok tab
 6 - Perform a patron search for 'a'
 7 - Note the time it takes for 'search' to complete in console
 8 - Apply patch, restart_all
 9 - Repeat search
10 - Note it is much faster
11 - prove -v t/db_dependent/Utils/Datatables_Members.t

NOTE: I tested with 500k patrons and 100k attributes - search returned in ~2 seconds with patch
and did not return before I got impatient without patch

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 173f3e950f192da5c03c58cbf4e7525e3227d567)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3c4c2ebe9d143011913ff3bf0e10791c49a58f0c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 29032: Pre-load ILL backends to speed up response
Tomas Cohen Arazi [Wed, 15 Sep 2021 15:12:33 +0000 (12:12 -0300)]
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>
(cherry picked from commit fa84d0704f85381cd7026d1c51cb832ade4ca870)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28676: Cache and retrieve match_count when searching a cached heading
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>
(cherry picked from commit 9d5150e4cd82b05bf0e7a62a5964d678fc363086)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28676: Unit test
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>
(cherry picked from commit 869f1c758cb78454c48e180f1533893b5dcb5d11)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 97dcf5ded6fa6602ee645f3f6431b52b843bc8b9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28960: Explicitly call get_column
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>
(cherry picked from commit 9dbf469605a3e97e66cb079961da65f7240e0cef)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 20.05.16 release v20.05.16
Victor Grousset/tuxayo [Thu, 23 Sep 2021 22:54:37 +0000 (00:54 +0200)]
Update release notes for 20.05.16 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 20.05.16 release
Victor Grousset/tuxayo [Thu, 23 Sep 2021 20:36:52 +0000 (22:36 +0200)]
Increment version for 20.05.16 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 20.05.16
Victor Grousset/tuxayo [Thu, 23 Sep 2021 20:33:53 +0000 (22:33 +0200)]
Fix translations for Koha 20.05.16

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 20.05.16
Koha translators [Thu, 23 Sep 2021 18:57:11 +0000 (15:57 -0300)]
Translation updates for Koha 20.05.16

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Fix Koha/Object.t
Jonathan Druart [Tue, 21 Sep 2021 08:59:22 +0000 (10:59 +0200)]
Bug 28772: Fix Koha/Object.t

Koha::ApiKeys is no longer the simple object we need to test
Koha::Object->store, let use Koha::Library::Groups
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Fix auth_authenticate_api_request.t
Tomas Cohen Arazi [Tue, 21 Sep 2021 16:18:52 +0000 (13:18 -0300)]
Bug 28772: Fix auth_authenticate_api_request.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: DBRev 20.05.15.001
Victor Grousset/tuxayo [Mon, 20 Sep 2021 06:44:59 +0000 (08:44 +0200)]
Bug 28772: DBRev 20.05.15.001

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Make validate_secret return 1|0
Jonathan Druart [Fri, 10 Sep 2021 08:34:41 +0000 (10:34 +0200)]
Bug 28772: Make validate_secret return 1|0

Not an empty string

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 0cdc606e403e71aa3f0f69d6fa031ba324311091)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: (QA follow-up) Apply change to other dbrev too [STABLE]
Marcel de Rooy [Thu, 9 Sep 2021 12:42:01 +0000 (12:42 +0000)]
Bug 28772: (QA follow-up) Apply change to other dbrev too [STABLE]

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit d84b2254a8dc08a3999ae25a9577332f1026ff08)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Update existing keys [STABLE]
Tomas Cohen Arazi [Mon, 30 Aug 2021 14:08:30 +0000 (11:08 -0300)]
Bug 28772: Update existing keys [STABLE]

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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit e5c4127e8e42e71a25f20cf228eda821505a95fd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: (QA follow-up) Fix wrong message
Tomas Cohen Arazi [Thu, 9 Sep 2021 11:53:07 +0000 (08:53 -0300)]
Bug 28772: (QA follow-up) Fix wrong message

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fc39e8ee58f72ad6a1b6aedffd9470ddfa82ffa8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Make secret validation use the new method
Tomas Cohen Arazi [Thu, 9 Sep 2021 11:38:25 +0000 (08:38 -0300)]
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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 977a2327b12042683128907be719e4d00ead7b73)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28722: Regression tests
Tomas Cohen Arazi [Thu, 9 Sep 2021 11:23:48 +0000 (08:23 -0300)]
Bug 28722: Regression tests

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove tt/db_dependent/api/v1/oauth.t
=> FAIL: Tests fail!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=28772

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 29923bf286f74f28699ffd5582914705001e7291)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Display API secret once
Tomas Cohen Arazi [Mon, 30 Aug 2021 15:07:56 +0000 (12:07 -0300)]
Bug 28772: Display API secret once

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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit ce8e29e50ac260c1dc0c2ea5d46b27bb547acd1c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Add a warning about hash_password usage in updatedatabase.pl
Tomas Cohen Arazi [Mon, 30 Aug 2021 14:08:57 +0000 (11:08 -0300)]
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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit d1fbe564b689d4c13c6bc70c013c4a4625dcd503)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28772: Make Koha::ApiKey->store encrypt the secret
Tomas Cohen Arazi [Thu, 26 Aug 2021 23:24:43 +0000 (20:24 -0300)]
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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit aebe7f2e3377755b601bd9f155e28416fb3475e9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28759: limit accessibility for "Manage API keys"
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>
(cherry picked from commit 47c6aaed404f5a39ca6cc5168754f7d05e177b40)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28941: Deal with OPACSuggestionUnwantedFields
Jonathan Druart [Fri, 10 Sep 2021 09:33:18 +0000 (11:33 +0200)]
Bug 28941: Deal with OPACSuggestionUnwantedFields

Remove fields from OPACSuggestionUnwantedFields before creating the
suggestion

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: remove useless sort

(cherry picked from commit 1b4b353440501dbd0a8fb12b4949ba49203ccc63)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28941: Filter suggestion inputs at the OPAC
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>
(cherry picked from commit ce5ee98511fd004587ef0b683b3bf2e2a143ad26)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28947: Prevent OPAC user to create new users
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>
(cherry picked from commit eab5f18787d5b7b5efc374a7dc87ef4090e5bac0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28935: (QA follow-up) Use BorrowerUnwantedField on staff client
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: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28935: No filtering on patron's data on member entry pages
Marcel de Rooy [Wed, 1 Sep 2021 14:04:31 +0000 (16:04 +0200)]
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: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28929: Add selenium tests
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: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28929: Prevent flags to be sent during patron's edition
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: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28885: Skip invalid biblios for OpacBrowseResults
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>
(cherry picked from commit b6c9ab1197f8f140ac1dbda46b7d520fe4fd6c80)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28802: Fix Asset.t
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>
(cherry picked from commit a4ed8dcd16b4ebbe1123f82866cfe1416fcdf556)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26847: (follow-up) fix get_attribute() call
Victor Grousset/tuxayo [Tue, 5 Jan 2021 12:56:32 +0000 (13:56 +0100)]
Bug 26847: (follow-up) fix get_attribute() call

Since the upgrade to Selenium 3 in bug 27055, an additional parameter is
required for get_attribute() to actually work.
https://metacpan.org/pod/Selenium::Remote::WebElement#get_attribute

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit de739259298b323bb881b62b1bc96bc9e3589496)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 04a0e973331c9210ab8324efb9fb7575148081d7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26847: Add data-categorycode to opac pages
Martin Renvoize [Wed, 4 Nov 2020 14:53:57 +0000 (14:53 +0000)]
Bug 26847: Add data-categorycode to opac pages

This patch adds the data-categorycode attribute to the loggedinuser span
for all pages in the opac.

Test plan
1/ Apply first patch, varify unit test fails.
2/ Apply second patch, varify unit test now passes.
3/ Navigate to opac and login
4/ Varify that data-categorycode is present in the loggedinuser span in
the client.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c7e228c60cfe352ccd7f1dee54990dcaa22c0240)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit db6654730e5c14bd8ef6cce15fa1a54cf801273c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 26847: Add UI test for categorycode in masthead
Martin Renvoize [Wed, 4 Nov 2020 14:45:27 +0000 (14:45 +0000)]
Bug 26847: Add UI test for categorycode in masthead

This test adds a regression test for the addition of categorycode
into the masthead of the staff client.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 69bf6e80cf4c35601dbeea871c973c7ce3997e41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fac4d77e12b3e843d115fd596bd3923a4918719a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28802: Untranslatable strings in browser.js
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>
(cherry picked from commit 6cd8819016ebb913ee5ed59f0b42dcb68eafc72c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 20.05.15 release v20.05.15
Victor Grousset/tuxayo [Tue, 24 Aug 2021 19:40:01 +0000 (21:40 +0200)]
Update release notes for 20.05.15 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 20.05.15
Victor Grousset/tuxayo [Tue, 24 Aug 2021 19:21:42 +0000 (21:21 +0200)]
Increment version for 20.05.15

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 20.05.15
Victor Grousset/tuxayo [Tue, 24 Aug 2021 19:14:44 +0000 (21:14 +0200)]
Fix translations for Koha 20.05.15

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 20.05.15
Koha translators [Tue, 24 Aug 2021 18:50:36 +0000 (15:50 -0300)]
Translation updates for Koha 20.05.15

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28784: (QA follow-up) Remove num_paragraph cookie from include
Marcel de Rooy [Fri, 6 Aug 2021 08:03:27 +0000 (08:03 +0000)]
Bug 28784: (QA follow-up) Remove num_paragraph cookie from include

Still found in opac-bottom.inc.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28784: [20.05.x] (follow-up) Always make three search boxes
Nick Clemens [Tue, 3 Aug 2021 12:17:02 +0000 (12:17 +0000)]
Bug 28784: [20.05.x] (follow-up) Always make three search boxes

The previous patch removed search_boxes_loop - that's okay, it was always
getting the same three values.

If we don't do something in the template though, we get no boxes

Ultimately this should be a include, and not a hardcoded loop, but keeping changes
small for backporting

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28784: Remove code related to num_paragraph cookie
Jonathan Druart [Tue, 3 Aug 2021 08:58:47 +0000 (10:58 +0200)]
Bug 28784: Remove code related to num_paragraph cookie

It could lead to server freeze if set to a big value (we are pushing
into an array and so RAM is being fulfilled, and CPU is looping).

I don't understand the point of this cookie.

        var numPar = $("#booleansearch fieldset p").size();
        if (numPar > [% search_boxes_count | html %]){
            jQuery.cookie("num_paragraph", numPar,{ path: '/'});
        }else{
            jQuery.removeCookie("num_paragraph", { path: '/'});
        }

But "#booleansearch fieldset p" does not exist, it's not 'p' but 'div'
elements.

I've removed the code related to num_paragraph and the "Return to the
last advanced search" feature still works as before.

From this comment:
    # determine what to display next to the search boxes (ie, boolean option
    # shouldn't appear on the first one, scan indexes should, adding a new
    # box should only appear on the last, etc.

The only bit that is not working as described is "adding a new box
should only appear on the last", but it has been working this way for
a long time already I think, and I don't see it as a bug.

Test plan:
Read the code, check that the above is correct.
Search for regression in this "return to last adv search" feature added
by bug 13307.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28518: Display missing inputs for "Return to the last advanced search"
Jonathan Druart [Sat, 5 Jun 2021 14:08:46 +0000 (16:08 +0200)]
Bug 28518: Display missing inputs for "Return to the last advanced search"

When more than 3 search terms are passed on the advanced search form,
the "Return to the last advanced search" feature does not display them.

Test plan:
Perform an adv search at the OPAC, enter more than 3 terms, launch the
search, click the "Return to the last advanced search" link and confirm
that all the entries are there.

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 75d67d46ce3df59c1460df44318439c40c14451b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0bd7d7c5a7b3cb6eddce02facdc0798bd9ce205)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28057: (follow-up) Get the biblionumber column
Nick Clemens [Wed, 28 Jul 2021 17:37:46 +0000 (17:37 +0000)]
Bug 28057: (follow-up) Get the biblionumber column

When we fetch the biblioitems we use a select to limit the columns fetched,
we must include the biblionumber as well

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9fd5d8b778e5f5873f83eb061227de7f817fa83b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b58a1e1f589c6ceffb61ed4843fc670c24c5fce)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28057: Use the biblioitem's biblionumber for checking availability
Nick Clemens [Wed, 14 Apr 2021 18:19:40 +0000 (18:19 +0000)]
Bug 28057: Use the biblioitem's biblionumber for checking availability

The loop here gets items from the record, plus analytic items. Because of this
we need to check more than 1 record - we decide to do this via biblioitems.

We need to preserve that, but when checking ItemsAnyAvailableAndNotRestricted we
cannot assume that the biblionumber and biblioitemnumber are the same (they should be
but this may not be the best of all possible worlds)

I simply switch the call here

To test:
1 - Apply patch
2 - Test placing holds on single bibs and multiple bibs
3 - Confirm it works as expected

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8258ebe2fbf41ce3c80db08bd0b37b789af01ce0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f570bae9f1a97c2b8ba1d4ec04f0f9e17a5b7599)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28675: (bug 27942 follow-up) Fix QOTD - add new quote
Jonathan Druart [Fri, 9 Jul 2021 08:34:31 +0000 (10:34 +0200)]
Bug 28675: (bug 27942 follow-up) Fix QOTD - add new quote

Bug 27942 has been written for master on top of bug 27251, and the code
differ a lot from what we have in <= 20.11.

This patch is quite ugly but it works, and is certainly the less painful
solution to fix stable branches.
Feel free to provide an alternative patch.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 7f9fbeb579c516f97d79faca5150a772aa3d9f1a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28632: Prevent api/v1/patrons.t to fail on dates comparison
Jonathan Druart [Wed, 28 Jul 2021 10:24:14 +0000 (12:24 +0200)]
Bug 28632: Prevent api/v1/patrons.t to fail on dates comparison

 #   Failed test 'Returned patron from update matches expected'
 #   at t/db_dependent/api/v1/patrons.t line 537.
 #     Structures begin differing at:
 #          $got->{updated_on} = '2021-07-27T13:33:53+00:00'
 #     $expected->{updated_on} = '2021-07-27T13:33:52+00:00'
 # Looks like you failed 1 test of 42.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5d922670184c66a48de07c0e9683824364b8e0be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 832f488744339e3c103ab5d0d6dda24c89472ea9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28604: Prevent double encoding of MARC::Record::MiJ->to_mij output
Tomas Cohen Arazi [Fri, 18 Jun 2021 21:32:37 +0000 (18:32 -0300)]
Bug 28604: Prevent double encoding of MARC::Record::MiJ->to_mij output

This patch fixes a double-encoding issue with MiJ output.

Mojolicious' *text* renderer encodes the passed information according to
the request context. [1]

MARC::Record::MiJ->to_mij, conveniently encodes the string before
output [2].

This causes double encoding.

So the solution to this situation, is to use the *data* renderer, which
doesn't perform any encoding [3].

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests contain diacritics and fail!
3. Have a record with diacritics
4. Try the API routes for fetching a biblio:
   $ curl --location --request GET 'http://localhost:8080/api/v1/public/biblios/144' \
          --header 'Accept: application/marc-in-json'
   (replace the record id with the one you've chosen)
=> FAIL: Boo, double encoding
5. Bonus point: you can try it on the non-public route, but you need
   more configuration boilerplate (basic auth, permissions). If you look
   at the fix, you will understand the tests cover it and no need to
   complicate yourself.
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!
8. Repeat 4 (and maybe 5)
=> SUCCESS: No double encoding! Yay!
9. Sign off :-D

[1] https://metacpan.org/release/MRAMBERG/Convos-0.5/view/local/lib/perl5/Mojolicious/Guides/Rendering.pod#Rendering-text
[2] https://metacpan.org/dist/MARC-File-MiJ/source/lib/MARC/Record/MiJ.pm#L111
[3] https://metacpan.org/release/MRAMBERG/Convos-0.5/view/local/lib/perl5/Mojolicious/Guides/Rendering.pod#Rendering-data

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cf44929d1ce70daff550a1e803f6bfe396332dbf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cec90fb3c2f0ba3e867b68c2c202dc7014e68056)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28604: Regression tests
Tomas Cohen Arazi [Fri, 18 Jun 2021 21:30:56 +0000 (18:30 -0300)]
Bug 28604: Regression tests

This patch introduces regression tests for the encoding issue with MiJ
output.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc1e15029f617ac18cba8508b99159358c132724)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 083f1133d5c77444eb056c55de0acbb7204beebe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28644: Fix calling borrowernumber on undefined value
Marcel de Rooy [Thu, 1 Jul 2021 14:13:05 +0000 (14:13 +0000)]
Bug 28644: Fix calling borrowernumber on undefined value

If the hold is not found (e.g. already cancelled), we should
return earlier without crashing:
    Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521
    (Note: line number from 19.11)

Test plan:
Run t/db_dependent/Reserves.t
Add a hold, go to user menu with holds in OPAC.
At the same time, cancel this hold from staff.
Now click the Cancel in OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 43e7873637c9d235a0c18ebc9ac6656f07b2aa61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dada7c1dfbc9ca156b1f7bce15b1230ff104881a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28462: Remove line breaks in TT tags
Jonathan Druart [Wed, 23 Jun 2021 07:50:55 +0000 (09:50 +0200)]
Bug 28462: Remove line breaks in TT tags

Same as previous patch for other files.
Looks like the problem exists only with IF.

== test plan ==
1. See the problematic strings in a given language
     git grep "\bIF\b" misc/translator/po | grep -v '#' | grep '\bzh-Hant-TW'
2. update the language
   misc/translator/translate update zh-Hant-TW
3. Recheck the problematic strings, they aren't here anymore
4. Check the diff: git diff
   and search the if's with «/-.* IF » to see how the deleted strings
   look like and that it makes sense.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1ed9d5529f4f625216f3bcbfa5e8d43e56b3e0e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a67953b635f3511253aee1ceab9d327b9963ab9e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28462: Remove TT tag on several lines - opac-advsearch.tt
Jonathan Druart [Wed, 26 May 2021 14:24:32 +0000 (16:24 +0200)]
Bug 28462: Remove TT tag on several lines - opac-advsearch.tt

It fixes the translation in case the operators have been translated

Test plan:
1. misc/translator/translate update pt-BR
2. In pt-BR-opac-bootstrap.po , find OpacAdvSearchMoreOptions
3. sabotage the translation part, like replacing IF with something else
4. misc/translator/translate install pt-BR
5. enable and use pt-BR and hit opac-advsearch.pl
6. Notice the error
   Template process failed: file error - parse error - /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/pt-BR/modules/opac-advsearch.tt line 409: unexpected token (e)                                                    [% IF (OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.size> 0 e extended_options) ou (OpacAdvSearchOptions and OpacAdvSearchOptions.size> 0 e n expandido_options) %] at /kohadevbox/koha/C4/Templates.pm
7. Apply the patch and redo update and install of the language
8. Note that it's now working

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f60efe6e8e647651512a6a4275e7a1ce8a6f5f37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e2328c015f31de22eceb06ab122be251d7cd8319)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 20.05.14 release v20.05.14
Victor Grousset/tuxayo [Fri, 23 Jul 2021 22:36:23 +0000 (00:36 +0200)]
Update release notes for 20.05.14 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 20.05.14 release
Victor Grousset/tuxayo [Fri, 23 Jul 2021 22:25:59 +0000 (00:25 +0200)]
Increment version for 20.05.14 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 20.05.14
Victor Grousset/tuxayo [Fri, 23 Jul 2021 22:24:11 +0000 (00:24 +0200)]
Fix translations for Koha 20.05.14

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 20.05.14
Koha translators [Fri, 23 Jul 2021 20:11:16 +0000 (17:11 -0300)]
Translation updates for Koha 20.05.14

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28524: Escape 'rank' in cat_issues_top.pl
Jonathan Druart [Wed, 16 Jun 2021 12:51:08 +0000 (14:51 +0200)]
Bug 28524: Escape 'rank' in cat_issues_top.pl

It's a MySQL 8 keyword

Test plan:
Turn off strict_sql_modes (there are other problems in this script)
Hit Home Reports > Most-circulated items
Submit the form

Without this patch you got:
  You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near 'RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM,
  ccode as CCODE, loca' at line 1

With this patch applied you see the report result view

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ea214856d112e262f2ab7df223b6ab9bf673ee67)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit f27cfd734b78c947e60e5603f19055a9204b0ba3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28523: Escape 'rank' in bor_issues_top.pl
Jonathan Druart [Wed, 16 Jun 2021 12:54:47 +0000 (14:54 +0200)]
Bug 28523: Escape 'rank' in bor_issues_top.pl

It's a MySQL 8 keyword

Test plan:
Turn off strict_sql_modes (there are other problems in this script)
Hit Home Reports > Patrons with the most checkouts
Submit the form

Without this patch you got:
    You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to
    use near 'RANK, borrowers.borrowernumber AS ID FROM `old_issues`

With this patch applied you see the report result view

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3a3537fd9333636aa0e52b06447ad3f74798dace)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 369c720beb56925871281b4edfd16f81410772cf)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28476: Update info in docs/teams.yaml file
Mason James [Sun, 6 Dec 2020 05:33:58 +0000 (18:33 +1300)]
Bug 28476: Update info in docs/teams.yaml file

to test...
 1/ apply patch
 2/ view 'about' page to confirm info is updated

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 28476: Update info in docs/teams.yaml file (2)

oops, correct info

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d544d09a3eba15b24836c74e69c298e207921ce6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8f2d00d63b97392680c87db0005f45d068e3d163)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28586: (follow-up) updated_by should be set
Tomas Cohen Arazi [Thu, 17 Jun 2021 19:02:35 +0000 (16:02 -0300)]
Bug 28586: (follow-up) updated_by should be set

This patch makes the route set the 'updated_by' attribute as well, when
resolving a return claim through the API.

Tests are added for this behavior.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/return_claims.t
=> SUCCESS: Tests pass! updated_by is set correctly!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 343bf361e0417f10f79daff767c38c076d039b23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab02ae9c43dbbfda0bc977cbe952ebb01e0a0056)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28586: Pass the right parameter to resolve claim
Tomas Cohen Arazi [Thu, 17 Jun 2021 15:49:56 +0000 (12:49 -0300)]
Bug 28586: Pass the right parameter to resolve claim

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f0c208bca84033ecfbeb51ca8e5dea75a8f80f2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 513a471f1f4ea54ad2af59323802fee8bbb2bebd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Sort by lastname for array type roles
Martin Renvoize [Tue, 25 May 2021 14:55:52 +0000 (15:55 +0100)]
Bug 28442: Sort by lastname for array type roles

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac00d757ab3e30cd4db2fb9694d28847d009a218)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 41b78b68c1406a3cf3433d79036cb9b0fd28360b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Fix 'accessibility_advocate' for current release
Martin Renvoize [Tue, 25 May 2021 12:59:31 +0000 (13:59 +0100)]
Bug 28442: Fix 'accessibility_advocate' for current release

The accessibility_advocate block was positioned incorrectly so wasn't
appearing properly for the current stable releases, only the
development/maintainter block.

This patch fixes that issue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b427d79d69579d78a6bb2784edacc64aa781934)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d7b4067d11d2c2301866ec63c0a94a6ce4845384)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Update template for new roles
Martin Renvoize [Tue, 25 May 2021 08:29:48 +0000 (09:29 +0100)]
Bug 28442: Update template for new roles

We have multiple accessibility advocates this cycle, so we needed to
adapt the template. I've also added the meeting facilitator as a case
but not added to the team block as a whole.. seeking opinions, perhaps
wait and see if it lasts more than a cycle before adding it fully?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16abe0f5321bc7165c1bf7051d6fa53f7608e0ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d13b6bdfcf24b5ad2236ab53d5dd488f63bf6d1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Add 21.11 release team to teams.yaml
Martin Renvoize [Tue, 25 May 2021 08:29:23 +0000 (09:29 +0100)]
Bug 28442: Add 21.11 release team to teams.yaml

Add the 21.11 release team.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 467e7e4788ae771c26004a6b5e2951ddf19ed82d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4f603468d102fbe4f0e63561f18e3f242a6d3588)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27495: Added Accessibility advocate role in team page
Eden Bacani [Wed, 20 Jan 2021 22:24:05 +0000 (22:24 +0000)]
Bug 27495: Added Accessibility advocate role in team page

Test Plan
1. Click on 'About Koha' from the home page
2.Check on the  Koha Team page that the role Accessibility advocate is
listed under the Koha release teams and that the name of the person with
the role  appears.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 638f5106352fc1c5a758af06061a68f65264b791)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b9f51b4ced6e4e9ff9237fdc95410c8f966d629d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoUpdate release notes for 20.05.13 release v20.05.13
Victor Grousset/tuxayo [Thu, 24 Jun 2021 23:21:20 +0000 (01:21 +0200)]
Update release notes for 20.05.13 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 20.05.13 release
Victor Grousset/tuxayo [Thu, 24 Jun 2021 22:09:39 +0000 (00:09 +0200)]
Increment version for 20.05.13 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 20.05.13
Victor Grousset/tuxayo [Thu, 24 Jun 2021 22:07:22 +0000 (00:07 +0200)]
Fix translations for Koha 20.05.13

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 20.05.13
Koha translators [Thu, 24 Jun 2021 17:19:56 +0000 (14:19 -0300)]
Translation updates for Koha 20.05.13

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28409: Adjust regression test
Jonathan Druart [Thu, 24 Jun 2021 07:55:23 +0000 (09:55 +0200)]
Bug 28409: Adjust regression test

We are no longer expecting an URI escaped value but a corrected category
value, either 1 or 2.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28409: Simplify data validation
Jonathan Druart [Fri, 21 May 2021 07:09:53 +0000 (09:09 +0200)]
Bug 28409: Simplify data validation

Simplify the affectation then trust it.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
JD Amended patch: remove duplicate comma

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28409: Comprehensively validate category in opac-shelves.pl
David Cook [Fri, 21 May 2021 06:52:25 +0000 (06:52 +0000)]
Bug 28409: Comprehensively validate category in opac-shelves.pl

Default to a category of 1 (ie Private). Only allow input of 1
or 2 (ie Public)

== Test plan ==
1. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
2. Note that you are redirected to another website
3. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=foo&category=9
4. Note that you can't see this list in the Lists (but it has been added to the database)
5. Apply the patch & restart services
6. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
7. Note that you are not redirected to another website
8. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=bar&category=9
9. Note that "bar" has been added as a Private list

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 27495: REVERT due to string freeze
Victor Grousset/tuxayo [Thu, 24 Jun 2021 17:06:56 +0000 (19:06 +0200)]
Bug 27495: REVERT due to string freeze

This reverts commit b8ee1c7b8d7d066cfb220edc92aa2e8d0429b8fe.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: REVERT ALL due to string freeze
Victor Grousset/tuxayo [Thu, 24 Jun 2021 13:47:57 +0000 (15:47 +0200)]
Bug 28442: REVERT ALL due to string freeze

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Sort by lastname for array type roles
Martin Renvoize [Tue, 25 May 2021 14:55:52 +0000 (15:55 +0100)]
Bug 28442: Sort by lastname for array type roles

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac00d757ab3e30cd4db2fb9694d28847d009a218)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 41b78b68c1406a3cf3433d79036cb9b0fd28360b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Fix 'accessibility_advocate' for current release
Martin Renvoize [Tue, 25 May 2021 12:59:31 +0000 (13:59 +0100)]
Bug 28442: Fix 'accessibility_advocate' for current release

The accessibility_advocate block was positioned incorrectly so wasn't
appearing properly for the current stable releases, only the
development/maintainter block.

This patch fixes that issue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b427d79d69579d78a6bb2784edacc64aa781934)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d7b4067d11d2c2301866ec63c0a94a6ce4845384)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>