Commit Graph

39839 Commits

Author SHA1 Message Date
Martin Renvoize c68e2b74fc Bug 27114: (QA follow-up) Add missing POD
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b385e1f529)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f05e6296bd)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 16:34:18 +00:00
Fridolin Somers 9414427415 Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab'
Koha plugins hook 'intranet_catalog_biblio_tab' is for a template,
it will be better it uses Template Toolkit plugin like intranet_js, ...
It will allow using it in other places like MARC details page for example.

Test plan uses a plugin from git.biblibre.com because this hook is not
yet in KitchenSink.

Test plan :
1) Enable Koha plugins
2) Download and install the latest version of this plugin
https://git.biblibre.com/biblibre/koha-plugin-intranet-detail-hook
3) Browse to catalogue/detail.pl for a record
4) Note you see two new tabs with content

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 d0fecf3ff7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20bbaf12a6)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 16:34:04 +00:00
Lucas Gass fc8d877f88 Bug 27282: fix all occurrences
This patch fixes all the occurrences, staff and OPAC. The problem only happens on some versions of Chrome.
TO TEST:
-set up a new list with a few items
-go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list.
-Click 'Print List' in Chrome.
-The tab opens but immediately closes itself.
-Apply patch and clear cache
-Try again, the print dialouge remains open

-Go to cgi-bin/koha/sco/sco-main.pl in Chrome, make sure you can finish and print successfully
-In the staff client in Chrome makes sure printing works in the following areas:
    1. /cgi-bin/koha/circ/circulation.pl Print Slip and Print Quick Slip
    2. /cgi-bin/koha/members/boraccount.pl Make a payment and make sure you can print the invoice
    3. cgi-bin/koha/labels/spinelabel-home.pl Make a quick spine label in Chrome and make sure that prints.

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>
(cherry picked from commit 55b050b607)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b4ccde1133)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 16:15:10 +00:00
Lucas Gass d9f5c5b6f3 Bug 27282: Add window.onafterprint function
TO TEST:
-set up a new list with a few items
-go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list.
-Click 'Print List' in Chrome.
-The tab opens but immediately closes itself.
-Apply patch and clear cache
-Try again, the print dialouge remains open

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
(cherry picked from commit fae72d031a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5fe3e6592d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 16:15:03 +00:00
Jonathan Druart c53b45e6c4 Bug 27232: Add missing space between : and </label> in member-alt-contact-style.inc
It caused the strings to appear twice in the po file

Test plan:
Apply this patch and regenerate the PO for a given language.
Notice that the string "%s State: " only appears once in the PO file

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>
(cherry picked from commit 61d8ec5075)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e3bb144435)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 16:10:07 +00:00
Aleisha Amohia 8647e3f600 Bug 26533: Fix 'is exactly' search for authorities
The exact search 6=3 is implemented, but it isn't used as expected when
you select 'is exactly' from the authorities search dropdown. This patch
remedies that.

To test:
1) Ensure you have an authority with more than one word in the name,
    i.e. Electric power production
2) Go to Authorities in the staff client.
3) Change the dropdown to 'is exactly' and search for one of the words
in your record's title, i.e. 'power' in the 'main heading' search
4) Confirm your authority shows in the results, even though it is not an
exact match.
5) Search for a biblio record and go to edit the record.
6) Go to Tab 6 and click the plugin button next to one of the 6xx$a
fields to trigger the authority finder plugin
7) Repeat Step 3 and Step 4
8) Go to the OPAC and go to Authority Search
9) Repeat Step 3 and Step 4

Apply patch

10) Repeat Steps 1 to 9, confirm that this time the record does NOT show
in search results.
11) Repeat Steps 1 to 9 but this time search for the authority record's
full title, i.e. 'Electric power production'. Confirm the record does
show in the search results because the search term now matches title exactly.

Sponsored-by: Education Services Australia SCIS

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a58cf90a31)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c62ca48c56)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:59:43 +00:00
Andrew Fuerste-Henry f4dfb74e26 Bug 28054: DBRev 20.05.11.002
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:55:09 +00:00
Katrin Fischer 0ffca54e7a Bug 20854: (QA follow-up) Rephrase of the new casServerVersion pref description
For another related change, see:
https://en.wikipedia.org/wiki/Central_Authentication_Service

CAS = Central Authentication Service

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6aa6f115bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a54e729319)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:44:33 +00:00
Tomas Cohen Arazi 1fdfc367fb Bug 20854: (QA follow-up) Improve readability
The logout_cas method does too little tasks. In this case, I consider we
should not split it into a separate method. As the CAS implementation
lacked tests, it made sense to do it like this, so it is testable. But
now we have higher-level tests for logout_cas, we can bake the behavior
inside of it, and it is testable.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c3c066714)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9b3538678e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:44:22 +00:00
Tomas Cohen Arazi 2cccd4bfee Bug 20854: Add more CAS tests
This patch aims to add full test coverage for 'logout_cas' the way we do
it nowadays (in a subtest, mocking things, etc). It is provided as a
separate patch so we can test the follow-up tidy and see no behavior
change.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Auth_with_cas.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Apply the refactoring follow-up
5. Repeat 3
=> SUCCESS: Tests still pass!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c71dda04c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 225517a0f3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:44:07 +00:00
Matthias Meusburger 21c11d865d Bug 20854: Allow correct redirect on logout for Cas servers 3.0 and superior.
Test plan:

 1) Apply the patch
 2) Set the system preference casLogout to "Yes"
 3) Set the new system preference CasServerVersion to "CAS 3 or superior"
 4) Check that you are redirected to Koha after a CAS logout from a CAS 3 server
 5) Set the new system preference CasServerVersion to "CAS 2 or inferior"
 6) Check that you are redirected to Koha after a CAS logout from a CAS 2 server

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 91307707ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 26e7262963)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:43:56 +00:00
Jonathan Druart 4b759ae041 Bug 28028: Remove misc/migration_tools/fix_onloan.pl
There is an obvious error in the script since bug 23463 and it's known
to be broken for 10 years now (since bug 5579). As nobody complains we
can safely remove this script.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c285de9802)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 689e3ac5fc)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:41:10 +00:00
Andrew Fuerste-Henry b532cd2cf8 Bug 26940: DBRev 20.05.11.001
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:39:09 +00:00
Jonathan Druart cd3102557b Bug 26940: Take empty strings into account
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 789ddd59c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8986198c02)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:31:45 +00:00
Jonathan Druart 540f290906 Bug 26940: Put in sync borrowers.debarredcomment with comments from borrower_debarment
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c309ee36dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 382779ee4c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:31:34 +00:00
Didier Gautheron c6391d20f3 Bug 26940: don't reset debarredcomment on patron update
Test plan:
1) Create a patron
2) In koha/members/moremember.pl add a manual restriction, with comment foobar
3) try to checkout, you have a message like
    Restricted: Patron's account is restricted with the explanation:
      foobar
4) Got to Edit patron, save
5) try to checkout, foobar is no more
    Restricted: Patron's account is restricted with the explanation:
6) Apply patch
7) Redo 1-4
8) try to checkout, foobar is there.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b9f1e1560)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d1e123fe3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:31:19 +00:00
Colin Campbell 103234691d Bug 26989: Safeguard Order Messages from unwanted characters
Carriage returns in notes were causing a supplier's parser
to truncate Order messages received from Koha.
Have removed those and also made a global removal of CR, Line feeds
and tabs - the latter two having the possibility of causing
errors in the future

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

There was no test plan to follow, but the patch appears to be making
sensible changes. If someone wants to provide a thorough test plan I can
re-test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d82684a328)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb6161029f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:28:10 +00:00
Joonas Kylmälä e19cbea290 Bug 27836: Document that CirControl changes which calendar is being used
You can verify that which branch's Koha calendar is being used to
calculate fines by reading for example the code in
C4::Circulation::_CalculateAndUpdateFine() There you can see that
$control_branchcode variable is being passed to
C4::Overdues::CalcFine() and if you trace that you will see in the end
it decides which branch's calendar to use for calculating chargeable
overdue fine days.

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>
(cherry picked from commit f964efacb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 32721535a9)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:25:34 +00:00
Fridolin Somers 833f38cde8 Bug 27861: Warning in C4/XSLT.pm - use of uninitialized value in numeric eq (==)
In C4/XSLT.pm :
 elsif ( exists $itemtypes->{ $item->effective_itemtype }
            && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 )

itemtype.notforloan is null by default, its generated a warning in logs.

Test plan :
1) Choose a record with itemtype.notforloan = NULL
2) Perform a search in the OPAC which will return results which
   include the record using XSLT
3) See patch removed warning

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>
(cherry picked from commit bda9b9e122)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa0af2da9f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:22:43 +00:00
Andreas Roussos ffceb3f79c Bug 27827: (follow-up) add a hint for clarification
When adding a new authority type, there is no indication of how big
the authority type code can be (auth_types.authtypecode in the DB has
a maximum length of 10 characters).

This patch fixes that.

To test, apply the patch and notice the hint appearing right above the
"Authority type:" text box as you add a new authority type: it should
display "10 characters maximum" in grey colour.

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>
(cherry picked from commit c359c15436)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c3c8274197)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:16:15 +00:00
Andreas Roussos 9d492f2c4e Bug 27827: make the 'Authority type:' input field wider
When adding a new authority type in the Staff client, the 'Authority type'
input field is too narrow. If you enter something like "OOP_CORPUS" inside
the textbox, you will have to scroll right and left inside the textbox in
order to view its contents.

This patch fixes that.

Test plan:
1) Try to add a new authority type with name "OOP_CORPUS". Notice how
   the input field is too narrow and cannot contain the entire string.
2) Apply this patch.
3) Repeat step 1), this time the input field has been widened and can
   accommodate the entire string.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
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>
(cherry picked from commit e20e000691)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 772c53b31c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 15:15:59 +00:00
Andrew Fuerste-Henry 32cedcb5de Bug 27695: Compiled CSS
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:56:15 +00:00
Owen Leonard b37a9224ca Bug 27695: (follow-up) Add specificity to CSS changes
This patch moves the definition of .alert and .error classes into the
block for .dialog in order to make sure they don't have an effect beyond
the desired scope.

The ".closebtn" section is redundant and has been removed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c42c24fa03)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6fccb68222)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:55:24 +00:00
Owen Leonard 853076b03a Bug 27695: Fix style of messages on Elasticsearch configuration page
This patch makes minor modifications to SCSS and HTML to make messages
on the Elasticsearch configuration page more consistent with other
interfaces.

To test you should have Elasticsearch selected as your search engine.

- Apply the patch and rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
- Go to Administration -> Search engine configuration (Elasticsearch)
- You should see a full-width "note" style message under the page
  heading, "Warning: Any changes..."
- Click the "Reset mappings" button at the bottom of the page. The
  confirmation alert you see should appear above the note-style message.
- I'm not sure how to trigger an "error" type message on this page, but
  you can test the updated style by going to Administration ->
  Currencies and submit a new currency with the same name and symbol as
  one which already exists.

Signed-off-by: Michal Denar <black23@gmail.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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e9d2aa498b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7d03dfb599)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:55:14 +00:00
Nick Clemens 7beba04efc Bug 28013: (follow-up) Reset the patron loop
To test:
1 - Apply all other patches and dependencies
2 - prove -v t/db_dependent/Circulation.t
3 - It fails
4 - Apply this patch
5 - It passes

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 626d1f22a0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60a44d0da1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:38:12 +00:00
Nick Clemens 2f6646a71d Bug 28013: Unit tests
Cover the case of multiple patrons and multiple items that can fill them

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 850ad30393)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 82e1674c70)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:37:45 +00:00
Nick Clemens a32bd102e0 Bug 28013: (follow-up) Correct and update call to CanItemBeReserved
The current call checks for truth against a returned hash, we need
to check the 'status' value

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ded05deb10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e26eb6df85)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:33:50 +00:00
Joonas Kylmälä e050c6162d Bug 28013: (QA follow-up) Remove unused variable
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 25d6024655)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d581ecf3a7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:33:38 +00:00
Nick Clemens d95b5ac27a Bug 28013: Performance improvements to CanBookBeRenewed
In the case of 'AllowRenewalIfOtherItemsAvailable' we check all existing reserves against
all existing items. This patchset reduces the number of DB/subroutine calls

To test:
1 - Apply patch
2 - prove -v t/db_dependent/Circulation.t

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0b8f4ec614)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 81254e0db0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 14:33:25 +00:00
Nick Clemens 16b1e24580 Bug 28078: (follow-up) Add param check to 'itemAlreadyOnHold' test
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a620c1bb11)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20ce0fdab0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 13:21:55 +00:00
Nick Clemens b936f0857d Bug 28078: Add 'ignore_hold_counts' param to CanItemBeReserved
This patch adds an optional param 'ignore_hold_counts' to the routine, while still forbidding holds when 0 are allowed

To test:
1 - prove -v t/db_dependent/Holds.t

Signed-off-by: David Nind <david@davidnind.com>
JK: Commit message amended: Fixed title formatting
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d3adcec676)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit da72406fa5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-05-24 13:21:12 +00:00
Andrew Fuerste-Henry 2c3f6584e7 Update release notes for 20.05.11 release
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-26 19:46:05 +00:00
Andrew Fuerste-Henry 64fd4e2179 Increment version for 20.05.11
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-26 19:37:50 +00:00
Andrew Fuerste-Henry b63fd5eb52 Translation fix again for 20.05.11
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-26 19:36:41 +00:00
Andrew Fuerste-Henry d77db4732e Fix translations for 20.05.11 2021-04-26 19:32:24 +00:00
Koha translators 33b7355e54 Translation updates for Koha 20.05.11 2021-04-26 15:18:10 -03:00
Andrew Fuerste-Henry 1e2ba0ec66 Bug 26679: Use index-term-genre for 655
To test:
1 - have a bib with a 655 that is not linked to an authority
2 - confirm link on OPAC and intranet details uses subject index
3 - apply patch, restart, reload pages
4 - confirm links now use index-term-genre and give correct results

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>
(cherry picked from commit 21ddbae735)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bb3ff613a7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 17:09:29 +00:00
Tomas Cohen Arazi f2247ccc74 Bug 18729: Adapt holds.js
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit e56d083461)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 64a48c6332)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 17:04:31 +00:00
Tomas Cohen Arazi 86906656ab Bug 18729: (follow-up) Adjust API to new spec
The previous patch introduces some behavioural changes to the API, as
well as the data types that need to be passed; all happens in the tests.

This patch adapts the route so it complies with those changes:
- JSON object containing pickup_library_id attribute is now passed back
  and forth.
- The controller should take care of checking the pickup location is
  valid, using the available tools.

To test:
1. Apply the patches, up to the tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> ERROR: Tests fail because the controller doesn't implement the
desired behavior
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 60a253c983)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eaef2ce207)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 17:04:18 +00:00
Tomas Cohen Arazi c92a43b214 Bug 18729: Add more tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit 9294ab967a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f6755b446b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 17:04:07 +00:00
Jonathan Druart 326e85d72d Bug 18729: Add PUT /holds/{hold_id}/pickup_location
This patch adds a route to overwrite the current pickup location.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit bf2c59a182)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1786089ab8)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 17:03:54 +00:00
Jonathan Druart eac997ceda Bug 28156: Rename Koha::Account::Line->renewal with is_renewal
It's a boolean, it must be named is_*

Test plan:
Confirm that
  prove t/db_dependent/Koha/Account/Line.t
is still returning green

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 491147896d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9d3ea2bd49)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:58:09 +00:00
Jonathan Druart 15a822b68b Bug 28069: (bug 27715 follow-up) Fix sort for lists
Sort functionality has been broken by bug 27715. We need to specify the
table.column in the datatable init

Note that "count" needs to be handled separately (which is a bit dirty
but cannot find something better)

Test plan:
Create some lists, add contents, change owner and dates
Sort using the different attributes and confirm that it's now working

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f35571410b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 56bc8c53d1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:55:25 +00:00
Fridolin Somers 5b39a9ecdf Bug 27656: misc/cronjobs/longoverdue.pl better error message
There are two ways of configuring misc/cronjobs/longoverdue.pl :
use --lost arg or system preferencies DefaultLongOverdueLostValue and DefaultLongOverdueDays.

Actually if you don't use any of it, you get a message :
  "ERROR: No --lost (-l) option defined"
Should also say something about preferencies :
  "ERROR: No --lost (-l) option no system preferences DefaultLongOverdueLostValue/DefaultLongOverdueDays defined"

Test plan:
1) Set empty preferences DefaultLongOverdueLostValue and DefaultLongOverdueDays
2) Run : misc/cronjobs/longoverdue.pl --maxdays 365
3) You see error message
4) Set DefaultLongOverdueLostValue = 1 and DefaultLongOverdueDays = 90
5) Run : misc/cronjobs/longoverdue.pl --maxdays 365
6) You don't see error message

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>
(cherry picked from commit 891145130c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e7c3e5f81b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:51:20 +00:00
Didier Gautheron ec140944be Bug 26528: Z39.50/SRU ignore invalid replies
When searching for authorities if an authorities server reply has invalid records
none are displayed.

At least french BNF SRU server doesn't fully follow norm and can return an error
confusing Koha protocol handler which then returns an empty MARC record.

This patch silently removed bogus records.

To Test:
1- Add BNF SRU server
2- Go to authorities page
3- Add an authority
4- Search for keyword(any) droits de l'homme
5- No result (Internal Server Error)
6- Apply patch
7- restart starman
8- redo 4
9- Many records are displayed

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d8f34430d1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cefb8bcf0c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:48:32 +00:00
Nick Clemens a363413a4e Bug 27529: Choose patron's branch or item's homebranch if following group rules and patron cannot choose branch
This patch defaults the holds pickup location to the items homebranch or the patron's branch when a group option is selected
for the hold fulfillment policy and the patron is not allowed to choose the branch on the OPAC

To test:
1 - Set 'Default checkout, hold and return policy' -> 'Hold pickup library match' to item's hold group or patron's hold group
2 - Set  OPACAllowUserToChooseBranch to 'Don't allow'
3 - Try to place an item level hold on the opac
4 - Ka-boom, etiher:
    The method Koha::Item->patrongroup is not covered by tests!
    The method Koha::Item->itemgroup is not covered by tests!
5 - Apply patch
6 - Repeat
7 - Note the pickup location is set to either the patron's branch or the items homebranch
8 - Repeat plan with the other group setting

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>
(cherry picked from commit 99c3b9ae1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b78ccb3e47)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:36:13 +00:00
Aleisha Amohia d52969810f Bug 27979: Modify TrackClicks to verify URL exists in DB when multiple uri
To test:
1) Go to Admin -> system preferences and enable the TrackClicks syspref
(set to Track or Track anonymously)
2) Find a record in the staff client with an item. Edit the item and put
two external URLs in the Uniform Resource Identifier field, e.g.
"https://www.google.com/ | https://twitter.com/"
3) Search for that record in the OPAC. Notice the two links in the
holdings table.
4) Click a link and confirm that you are directed to a 404.
5) Apply the patch and refresh the page
6) Click a link and confirm that you are directed to the page as
expected
7) Go back to edit the record in the staff client and remove one of the
links from the URI field
8) Go back to the OPAC and confirm you can still access the link as
expected when there is only one URI

Sponsored-by: Catalyst IT

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>
(cherry picked from commit 0da874bde2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 63b7ba9767)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:29:53 +00:00
David Cook 1c0fc0bc95 Bug 28123: Fix expected value in unit test
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 559950cae6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9a03fb760d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:25:46 +00:00
David Cook f01869a90c Bug 28123: Quote filename value in Content-Disposition header
Chrome throws a ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
error if a Content-Disposition header includes an unquoted filename
that contains commas.

This patch adds quotes around the filename in the Content-Disposition
header, which fixes the problem.

Test plan:
0. Do not apply the patch yet
1. Obtain a PDF and rename it to include a comma in its name
2. Enable the upload.pl plugin in the 856$u of the Default framework
3. Add/edit a record in the Default Framework and upload a file
using the 856$u upload plugin.
4. Click on the resulting file URL in the saved file
5. Note the error ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
is returned instead of the file

6. Apply the patch and restart your Plack instance

7. Click on the resulting file URL in the saved file
8. Note that you now get the PDF file instead of the error

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 52f997fcfc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 029936828d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:25:31 +00:00
Jonathan Druart 97ad010674 Bug 28103: Fix barcode plugin on the order receive view
Fix the following error:
Uncaught TypeError: Cannot read property 'field_value' of null

Test plan:
Set "AcqCreateItem" to "receiving an order"
Set "autoBarcode" to "generated in the form <branchcode>yymm0001"

Create an order and go to receive it at a path like
/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=2&invoiceid=1

Click on the barcode input and confirm that it's prefilled
automatically

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 54c5ee5706)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 08aee787b6)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-04-25 16:17:38 +00:00