]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 27164: Fix item search CSV export
Fridolin Somers [Mon, 7 Dec 2020 16:03:40 +0000 (17:03 +0100)]
Bug 27164: Fix item search CSV export

In item search CSV export, data cells are exported with double quotes.
There should also be double quotes in header cells.
Also some spaces can be removed.
Delimiter must be from system preference 'delimiter'.
TT filter must be $raw not html, only double quotes must be espaped by
duplication of it.

This may help to open the CSV with any table/calc software.

Test plan :
1.0) Create a record with title : Laurel & "Hardy"
1.2) Create an item on this record
2.0) Without patch
2.1) Perform an item search on title 'Laurel'
2.2) Export as a CSV file and save the file locally
2.3) Open the file with a table/calc software
3.0) Apply patch
3.1) Perform same item search
3.2) Export as a CSV file and save the file locally
3.3) Open the file with a table/calc software
4.0) Compare files with diff/meld
=> you see double quotes arround header cells
   and removal of space after coma
4.1) Check that delimiter is from system preference 'delimiter'
4.2) In table/calc software they should look the same

Signed-off-by: Andrew Fuerste-Henry <andrew@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 1700c393b1de3c32b3b572efd0cf935255813e2b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 53e5db10f250dd7f5ce8011ffabc88ee45766815)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26417: Remove warn in Koha::Patron is_valid_age
Fridolin Somers [Wed, 9 Sep 2020 11:54:34 +0000 (13:54 +0200)]
Bug 26417: Remove warn in Koha::Patron is_valid_age

In Koha::Patron is_valid_age the is a compare : $age < $low
But $low may be undef.
It generates a warn :
Use of uninitialized value $low in numeric lt (<)

Needs a test like for $high.

Test plan :
1) Run prove t/db_dependent/Koha/Patrons.t
2) Edit a patron catetory, empty "Age required" and save
3) Edit a patron of this category
4) Check in logs you don't see "Use of uninitialized value $low in numeric lt (<)"

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f042c804cda09deaee614f73ec9a888bea4ab99a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ba7cee5b17b13566fdf82019f5576db497d03bff)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 22284: (QA follow-up) Fix test failures
Nick Clemens [Fri, 15 Jan 2021 14:00:55 +0000 (14:00 +0000)]
Bug 22284: (QA follow-up) Fix test failures

Only libraries that are a pickup location will be returned as a pickup location

To test:
prove -v t/db_dependent/Koha/Biblio.t
it succeeds (maybe)
add a library that is not a pickup_location
prove the test
it fails
apply the patch
prove!
it passes!

https://bugs.koha-community.org/show_bug.cgi?id=25540

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27245: Replace AutoCommit=0 with txn_begin in bulkmarcimport.pl
Jonathan Druart [Fri, 18 Dec 2020 13:41:12 +0000 (14:41 +0100)]
Bug 27245: Replace AutoCommit=0 with txn_begin in bulkmarcimport.pl

To prevent
DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1588, <GEN45> line 1.

Test plan:
1 - Export more than 100 records
2 - Use bulkmarcimport (with -commit=10) to import them
    perl misc/migration_tools/bulkmarcimport.pl -b -file testbmi.xml -v -m=MARCXML --commit=10
3 - Modify a record to make the import fail (for instance having a too long
lccn)
4 - Use bulkmarcimport (with -commit=10) to import them
    perl misc/migration_tools/bulkmarcimport.pl -b -file testbmi.xml -v -m=MARCXML --commit=10
5 - Notice that the import stops but that the imported record are imported (apart from the last batch of 10)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4a90c0b647fdfdb0a39b43f6b10adba3bca53215)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0dadd169b08f3b486ea387cdbb7f93c13b8d3db)

3 years agoBug 26364: Don't skip records that match the isbn we passed
Nick Clemens [Wed, 9 Sep 2020 13:24:20 +0000 (13:24 +0000)]
Bug 26364: Don't skip records that match the isbn we passed

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26364: Remove false matches on isbn
Nick Clemens [Wed, 9 Sep 2020 13:33:17 +0000 (13:33 +0000)]
Bug 26364: Remove false matches on isbn

The test here was returning 0590353403 when searched for 9780590353403
because of the regex matching

Koha doesn't work this way unless SearchWithISBNVariations is set to 'search'
and you use a dropdown to select ISBN for searching

To test:
1 - Search catalog for nb=9780590353403
2 - Confirm you don't have results, or delete the records with results
3 - Add isbn 0590353403 to a record
4 - Repeat search, fails
5 - Enable SearchWithISBNVariations
6 - Repeat search, fails
7 - Go to advanced search, select ISBN, search for 9780590353403
8 - Get results

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26364: Remove useless condition
Nick Clemens [Wed, 9 Sep 2020 13:40:37 +0000 (13:40 +0000)]
Bug 26364: Remove useless condition

$response_data is a hash with one key, content

Why are we checkiing it against a string?

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26364: Don't discard the passed isbn
Nick Clemens [Wed, 9 Sep 2020 13:44:45 +0000 (13:44 +0000)]
Bug 26364: Don't discard the passed isbn

I don't know, if we get rid fo this check we can now check the db for the same isbn we passed

This may be useful as we may want to see the biblio with the same isbn as long as number is different?

This will make tests fail

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26364: Adjust unit tests
Nick Clemens [Wed, 9 Sep 2020 14:34:26 +0000 (14:34 +0000)]
Bug 26364: Adjust unit tests

We shouldn't rely on knowing exactly which ISBNs we get, we should specifically
check for what we do or don't expect.

I believe we should return biblios that have the same isbn we passed, as it signlas we have another
biblio in the catalog that matches the one we are on.

To test:
prove -v t/db_dependent/XISBN.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d9063ba246bd020de83bc67964a08855a73ccb24)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0b2f0e0b26d462df58bd7d03246bb60bf84b11e5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26330: Change encoding of text used as tab triggers in MARC subfield constraints
Owen Leonard [Tue, 1 Sep 2020 11:51:25 +0000 (11:51 +0000)]
Bug 26330: Change encoding of text used as tab triggers in MARC subfield constraints

This patch changes the encoding of the data being used to define
jQueryUI tabs on the MARC subfield constraints page. A jQueryUI bug
prevents non-Latin-1 characters from being used when defining tab
controls. Using Template:Toolkit's "uri" filter converts the data to
usable characters.

To test, apply the patch and go to Administration -> MARC frameworks ->
MARC structure -> tag 952 -> Edit subfields.

- Under the "New" tab, add a subfield code which is outside the basic
  Latin character set, e.g. £, §, æ.
- Save changes.
- Edit any subfield code to load the subfield constraints page again.
- Test that the subfield code tabs work correctly: Clicking each tab
  should load only the corresponding panel.
- Test a variety of tabs including the one you created with the
  non-Latin character.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27137: Correctly show biblio title after successfully moving item
Aleisha Amohia [Thu, 3 Dec 2020 02:50:15 +0000 (15:50 +1300)]
Bug 27137: Correctly show biblio title after successfully moving item

In Bug 11529 we changed the variable that was passed to the template but
missed updating the template.

This patch ensures we correctly access the variable to show the title of
the biblio.

To test:
1) Create two biblios (Biblio A and Biblio B)
2) Add an item to Biblio A (Item A)
3) Go to Biblio B
4) In the cataloguing toolbar, click Edit, then Attach item
5) Enter the barcode for Item A and submit
6) Notice the item has successfully moved by Biblio B's title does not
show
7) Apply patch
8) Go to Biblio A
9) In the cataloguing toolbar, click Edit, then Attach item
10) Enter the barcode for Item A and submit
11) Confirm Biblio A's title shows correctly

Sponsored-by: Toi Ohomai Institute of Technology
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26397: Compiled CSS
Andrew Fuerste-Henry [Wed, 13 Jan 2021 22:12:06 +0000 (22:12 +0000)]
Bug 26397: Compiled CSS

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26397: [20.05.x] opac.scss calls non-existent image
Owen Leonard [Wed, 2 Dec 2020 14:51:53 +0000 (14:51 +0000)]
Bug 26397: [20.05.x] opac.scss calls non-existent image

This patch removes some obsolete CSS from the OPAC which calls a
non-existent image. There should be no visible change.

This patch is specifically for Koha 20.05.x. The bug does not appear in
master.

To test, apply the patch and rebuild the OPAC SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

View the OPAC and confirm that nothing has changed in the style of the
Koha logo in the header.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25826: fix failing test
Jonathan Druart [Mon, 10 Aug 2020 08:00:34 +0000 (10:00 +0200)]
Bug 25826: fix failing test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25826: (QA follow-up) Add filters
Nick Clemens [Thu, 6 Aug 2020 12:40:20 +0000 (12:40 +0000)]
Bug 25826: (QA follow-up) Add filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25826: Forbid changing the hidden attributes for biblionumber
Tomas Cohen Arazi [Mon, 27 Jul 2020 15:18:36 +0000 (12:18 -0300)]
Bug 25826: Forbid changing the hidden attributes for biblionumber

This patch tweaks the UI so it forbids changing the hidden values when
they are correct (i.e. when they are not hidden in OPAC and intranet).

To test:
1. Apply the first patch
2. Play with the hidden values of the subfield you have mapped to
   biblio.biblionumber in your picked framework. This is usually 999$c
   in MARC21, and 001 in UNIMARC.
=> SUCCESS: When you verify the about.pl, it mentions issues when you
hide in some of the interfaces
3. Apply this patch and reload everything
4. Repeat 2
=> SUCCESS: If your framework is 'ok', it prevents you from editing this
values, otherwise you can change them.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25826: Add a warning to the about page
Jonathan Druart [Wed, 22 Jul 2020 14:43:38 +0000 (16:43 +0200)]
Bug 25826: Add a warning to the about page

This patch adds a warning to the about page if the biblionumber field is
hidden at the OPAC or staff interface.

Test plan:
Hide the biblionumber to some framework
Confirm that there is a warning on the about page

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26698: Use is_at_destination to determine if hold is at destination
Nick Clemens [Thu, 15 Oct 2020 19:24:24 +0000 (19:24 +0000)]
Bug 26698: Use is_at_destination to determine if hold is at destination

This copies code from bug 12556 and uses a Koha::Hold method rather than
code in script

TO test:
1 - Place a hold for item from library B for delivery at library A
2 - Check the item in at library B, confirm and transfer
3 - Check item in at Library A but ignore the hold
4 - View the Holds tab of the details page:
    http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=6
5 - Priority = "In transit"  Pickup Library = "Item waiting at"
6 - Apply patch
7 - Restart all the thigns
8 - Reload the page
9 - Priority="In transit" and Pickup library="Item being transferred"

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24863: QueryFuzzy syspref says it requires Zebra but ElasticSearch has some support.
Lisette Scheer [Sat, 24 Oct 2020 19:09:59 +0000 (19:09 +0000)]
Bug 24863: QueryFuzzy syspref says it requires Zebra but ElasticSearch has some support.

This patch updates the description of the QueryFuzzy system preference
to make it more clear how it works with Zebra and how Elasticsearch has
some amount of fuzzy available for searches.

To test:
1. Go to administration
2. Search for QueryFuzzy
3. Observe the current description, which only includes Zebra.
4. Apply patch
5. Repeat steps 1-2
6. Observe the updated description.
7. Sign off

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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 137cf586551be4affb112eba3a61bc49b0099342)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c0466fd4425739e464f697687cd9b0639a0bf16c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25462: Compiled CSS
Andrew Fuerste-Henry [Tue, 12 Jan 2021 14:31:36 +0000 (14:31 +0000)]
Bug 25462: Compiled CSS

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25462: (follow-up) Remove <br /> as it is no longer needed
Martin Renvoize [Thu, 5 Nov 2020 11:34:54 +0000 (11:34 +0000)]
Bug 25462: (follow-up) Remove <br /> as it is no longer needed

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25462: Show shelving location on a new line after home library (OPAC)
Owen Leonard [Tue, 12 May 2020 12:44:45 +0000 (12:44 +0000)]
Bug 25462: Show shelving location on a new line after home library (OPAC)

This patch updates the OPAC CSS to move the shelving location a
new line after the 'Home library' in list of holdings on the
bibliographic detail page.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate a title in the OPAC which has items with a shelving
  location.
- View the detail page for that title. In the table of holdings,
  confirm that the shelving location information is on a separate line
  from the home library information.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25462: Show shelving location on a new line after home library (staff client)
Owen Leonard [Tue, 12 May 2020 12:43:21 +0000 (12:43 +0000)]
Bug 25462: Show shelving location on a new line after home library (staff client)

This patch updates the staff client CSS to move the shelving location a
new line after the 'Home library' in list of holdings on the
bibliographic detail page.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate a title in the staff client which has items with a shelving
  location.
- View the detail page for that title. In the table of holdings,
  confirm that the shelving location information is on a separate line from
  the home library information.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25462: Shelving location should be on a new line in holdings table
David Roberts [Tue, 12 May 2020 09:56:28 +0000 (09:56 +0000)]
Bug 25462: Shelving location should be on a new line in holdings table

This patch moves the shelving location a new line after the Home library
in the holdings table.

To test:

1) Assign a shelving location with a long description to an item.
2) See that it displays on the same line as the Home Library in /cgi-bin/koha/catalogue/detail.pl
3) Apply the patch
4) Check that the shelving location is now on a new line

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26875: (follow-up) Fix error message ("greater or equal")
Victor Grousset/tuxayo [Mon, 28 Dec 2020 17:28:58 +0000 (18:28 +0100)]
Bug 26875: (follow-up) Fix error message ("greater or equal")

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26875: Allow printing of just one barcode in batch
Andrew Fuerste-Henry [Fri, 30 Oct 2020 16:25:05 +0000 (16:25 +0000)]
Bug 26875: Allow printing of just one barcode in batch

To test:
1- go to the Print Barcode Range page
2- enter From=1 and To=1
3- confirm error "Must be greater than from value."
4- apply patch, restart, reload page
5- enter From=1, To=1
6- confirm no error
7- change From to 2, error reappears

Signed-off-by: David Nind <david@davidnind.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 e581255eccb1b6851735f9eb2c297dd0c01ffa06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fb2ebb5a9bbbaf27b4d27ae8e0678238b1865e9d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27085: Corrections in overdue_notices.pl help text
Timothy Alexis Vass [Wed, 25 Nov 2020 07:45:39 +0000 (07:45 +0000)]
Bug 27085: Corrections in overdue_notices.pl help text

-library      <branchname>     only deal with overdues from this library (repeatable : several libraries can be given)
Should be <branchcode>

Help text should also be proper sentences.

To test:
0) Run misc/cronjobs/overdue_notices.pl -h
1) Check that the text is now:
   -library      <branchcode>     Only deal with overdues from this library.
2) Check that the rest of the help text are proper sentences,
   with leading capital letter and punctuation.
3) Sign off.

Sponsored-by: Lunds Universitetsbibliotek
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1ad7d034e65d0b518335086345f2f533d1898c56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 00cf5afd52fbe0679b87d4f1ba0d76d3892f5069)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25954: Compiled CSS
Andrew Fuerste-Henry [Mon, 11 Jan 2021 22:18:04 +0000 (22:18 +0000)]
Bug 25954: Compiled CSS

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25954: Prevent two elements with id="description" in the DOM
Jonathan Druart [Mon, 4 Jan 2021 14:09:19 +0000 (15:09 +0100)]
Bug 25954: Prevent two elements with id="description" in the DOM

It also fixes t/db_dependent/selenium/administration_tasks.t

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25954: (QA follow-up) Correct label "for" attribute in authorities search
Josef Moravec [Tue, 17 Nov 2020 17:34:12 +0000 (17:34 +0000)]
Bug 25954: (QA follow-up) Correct label "for" attribute in authorities search

Change it from first select box to text input for consistancy with other
search forms

Test plan:
1) Apply the patch
2) Go to authorities search
3) Confirm the labels in all search tabs are linked to text input field

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b2bd038279911e8f29b376b2e70a2b9f9b6bb66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d959d81e1bd4bbd114f29135b71a2260e7cc6314)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25954: (follow-up) Correct label "for" attribute
Owen Leonard [Thu, 6 Aug 2020 19:09:43 +0000 (19:09 +0000)]
Bug 25954: (follow-up) Correct label "for" attribute

This patch updates a couple of search include forms to change the "for"
attribute of the label. Although "idx" is the first field in this
situation, the label's text applies to the keyword field so it should
give focus to the keyword field.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1920c92d811dc5477a9cb1064f6f7e2dd473a380)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e5d66a27986f3e1f0970054e50648f632afef7b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25954: Replace paragraph tags with labels in header search forms
Owen Leonard [Wed, 8 Jul 2020 13:40:37 +0000 (13:40 +0000)]
Bug 25954: Replace paragraph tags with labels in header search forms

This patch replaces instances of <p class="tip"> with <label
class="tip"> in header search forms where there is not already a label
tag corresponding to the first form field.

In cases where there is already a label on the first form field the <p>
is kept.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

Test the header search forms on the following pages:

 - Staff interface home page
 - Acquisitions home
 - Acquisitions -> Vendor -> Contracts
 - Acquisitions -> Vendor -> Add to basket -> From a suggestion
 - Advanced catalog search
 - Authorities
 - Administration
 - Administration -> Funds
 - Administration -> Desks (UseCirculationDesks must be enabled)
 - Administration -> Cities and towns
 - Administration -> Currencies and exchange rates
 - Administration -> Patron categories
 - Administration -> Z39.50/SRU servers
 - Catalog -> Search results
 - Cataloging
 - Circulation
 - Circulation -> Check in
 - Patrons
 - Serials
 - Tools -> Notices and Slips

In each case, check that the search form labels work as expected to move
focus to the corresponding form field.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 38bc9eb2a8c01c8625b1c33c7e098cd0022b2710)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1001a09859f28be8216941fa979261f1914b91ff)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27178: Add 'str' namespace to exclude-result-prefixes
Jonathan Druart [Thu, 10 Dec 2020 10:35:50 +0000 (11:35 +0100)]
Bug 27178: Add 'str' namespace to exclude-result-prefixes

Some nodes in the generated HTML document contain the 'str' namespace.
For instance, at the OPAC on the search result list, you can see:
<a xmlns:str="http://exslt.org/strings" href="/cgi-bin/koha/opac-detail.pl?biblionumber=18566&amp;query_desc=kw%2Cwrdl%3A%20spin" class="title">

The solution is to add 'str' to exclude-result-prefixes.
From https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/stylesheet
"""
Specifies any namespace used in this document that should not be sent to the output document. The list is whitespace separated.
"""

Test plan:
0. Don't apply this patch
1. Launch a search at the OPAC
2. Inspect the title link for the records
=> Note the 'xmlns:str' attribute on tag "a"
3. Apply this patch
4. restart_all
5. Repeat 1. and 2.
=> Note that the attribute is gone now.

QA will check that no other occurrences is missing (note that one
NORMARC xsl is missing it, but NORMARC is deprecated)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 71aaf8b458254921022b5e14440f158c8c7eb7bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 551403c0f61ffea4711640fd947955e3f11cda88)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26996: Convert Elasticsearch indexer commit buffer size to integer
Björn Nylén [Wed, 11 Nov 2020 07:35:21 +0000 (08:35 +0100)]
Bug 26996: Convert Elasticsearch indexer commit buffer size to integer

When multithreaded indexing is used, the commit size for children are spread
out resulting in them being of type float. When records are processed and the
commit counter decreased it may then never reach *exactly* 0. This means records
are never commited. This patch makes sure the counter is an integer to avoid the
problem.

To test you must find a set of circumstances that causes the issue. For me:
1. Run: ./rebuild_elasticsearch -v -b -p 2 -c 400
2. Note that only one process is logging "Committing xxx records..."
3. Kill processes.
4. Apply patch.
5. Repeat 1
6. Note that both processes are logging "Committing xxx records..."

Sponsored-by: Lund University Library
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ba9c9cc794123d60c92a4ce499aa4554299936b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cbe7638619de30abd7d68bb0a8d63e36b2c3d874)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27043: Add to number_of_replicas and number_of_shards to index config
Fridolin Somers [Tue, 17 Nov 2020 13:49:58 +0000 (14:49 +0100)]
Bug 27043: Add to number_of_replicas and number_of_shards to index config

With Elasticsearch 6 (>6.4), we have a warning on index creation :
  the default number of shards will change from [5] to [1] in 7.0.0

See https://github.com/elastic/elasticsearch/pull/30587

I propose to add number_of_shards in index config.

Also add number_of_replicas that is better explicit.
In case on only one node, it must be 0.

Test plan :
1) Use Elasticsearch
2) Apply patch and flush memcached
3) Rebuild indexes : misc/search_tools/rebuild_elasticsearch.pl -v -b -d
4) Check you dont have a warning about number of shards
5) Check the settings of index :
   curl '<cluster>:9200/<myindex>_biblios/_settings?pretty&filter_path=**.number_of_*'
6) You should see :
   "number_of_shards" : "5",
   "number_of_replicas" : "1"

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26171: (QA follow-up) Add table name and object type to message
Nick Clemens [Mon, 21 Dec 2020 19:24:05 +0000 (19:24 +0000)]
Bug 26171: (QA follow-up) Add table name and object type to message

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0f7bbb64df376cd0998d6e882ad2f0a699187863)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4e18ae84b11a74bf24398a9fb848a6ab2cd82c74)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26171: adapt Koha/Exceptions.t
Fridolin Somers [Fri, 7 Aug 2020 08:30:55 +0000 (10:30 +0200)]
Bug 26171: adapt Koha/Exceptions.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c961b238a2c726f7bf2dc70a672d31c43da84f29)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 17f9ebdb665e3c6723e70efcf876985201816616)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid
Fridolin Somers [Fri, 7 Aug 2020 08:05:52 +0000 (10:05 +0200)]
Bug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid

Bug 23846 added a check for invalid MARCXML in search_for_data_inconsistencies.pl.
But the error message does not show the biblionumber of invalid biblio record.

Test plan:
1) Import a bibliographic record with invalid XML, you can add non printable characters, like 0x1F (CTRL-V 1F with vim)
2) Run misc/maintenance/search_for_data_inconsistencies.pl
3) Check you see correct biblionumber in error message :
Invalid data, cannot decode object (id=xxx, biblionumber=yyy, format=marcxml, schema=zzz, decoding_error=...

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27280: (bug 27026 follow-up) Make consistent the explanation for "Days mode"
Jonathan Druart [Fri, 18 Dec 2020 15:23:54 +0000 (16:23 +0100)]
Bug 27280: (bug 27026 follow-up) Make consistent the explanation for "Days mode"

We have "Skip closed days" in the dropdown, but "Calendar" on the table. Both must match

Test plan:
Go to the circ rules, select a value for "Days mode", save the rule,
confirm that the dropdown list values are matching the ones we displayed
in the cells

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8a067f145b85870328fbcd10b2e510cb7006b749)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f38943c7f5ecb2b1dfa2bd092707c3cf75343b07)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoUpdate release notes for 20.05.07 release v20.05.07
Andrew Fuerste-Henry [Thu, 7 Jan 2021 20:22:22 +0000 (20:22 +0000)]
Update release notes for 20.05.07 release

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27252: DBRev 20.05.06.001
Andrew Fuerste-Henry [Thu, 7 Jan 2021 19:58:23 +0000 (19:58 +0000)]
Bug 27252: DBRev 20.05.06.001

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoTranslation updates for Koha 20.05.07
Koha translators [Thu, 7 Jan 2021 19:22:15 +0000 (16:22 -0300)]
Translation updates for Koha 20.05.07

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27252: Default to cross fields off
Nick Clemens [Wed, 23 Dec 2020 14:30:50 +0000 (14:30 +0000)]
Bug 27252: Default to cross fields off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27252: Add deprecation warning, cross_fields pref, and add version to ES info
Nick Clemens [Wed, 16 Dec 2020 18:50:55 +0000 (18:50 +0000)]
Bug 27252: Add deprecation warning, cross_fields pref, and add version to ES info

This patch prepares Koha to officially no longer support Elasticsearch 5.X

It adds a new system preference 'ElasticsearchCrossFields' to allow users to choose whether or not
to enable this feature

It updates the about page to add a deprecation warning if a site is running ES5

To test:
 1 - Be running Koha with Elasticsearch 5.X
 2 - Attempt to search
   Error: Unable to perform your search. Please try again.
 3 - Apply patch
 4 - Update database
 5 - Searching works
 6 - Find syspref 'ElasticsearchCrossFields'
 7 - Enable it
 8 - Searching is now broken
 9 - Check the about page
 10 - you can now see the Elasticsearch version
 11 - The systeminformation tab has a deprectaion warning
 12 - Set SearchEngine preference to 'Zebra'
 13 - View the about page - no warnings
 14 - Test again with ES6 - searching should "work" with either pref setting
 15 - There should be no warning on about pages

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoUpdate release notes for 20.05.07 release
Andrew Fuerste-Henry [Wed, 6 Jan 2021 22:03:51 +0000 (22:03 +0000)]
Update release notes for 20.05.07 release

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoIncrement version for 20.05.07 release
Andrew Fuerste-Henry [Wed, 6 Jan 2021 21:53:59 +0000 (21:53 +0000)]
Increment version for 20.05.07 release

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoTranslation updates for Koha 20.05.07
Koha translators [Wed, 6 Jan 2021 21:36:20 +0000 (18:36 -0300)]
Translation updates for Koha 20.05.07

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27004: Prevent claim resolution to fail
Jonathan Druart [Mon, 21 Dec 2020 10:05:26 +0000 (11:05 +0100)]
Bug 27004: Prevent claim resolution to fail

If the account of the patron who created a claim is removed, then the
claim won't be resolvable.
Trying to resolve the claim will result in a 500:
[2020/12/21 10:05:55] [ERROR] PUT /api/v1/return_claims/1/resolve: unhandled exception (Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy)<<[created_by is mandatory]>> Koha::REST::Plugin::Exceptions::__ANON

We should not check if created_by exist when we update an existing hold,
only when we create it.

Test plan:
- Login with patron A
- set a value to syspref ClaimReturnedLostValue
- Check an item out
- Claim returned it
- Login with patron B
- Delete patron A
- Resolve the claim
- ERROR in api-error.log an UI never confirming the resolution
- apply patch & restart services
- Resolve the claim
- it works

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 92dbe809021ea1f7ee44e51387b48d9ffbda1fea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e3f33e5d6e79d2df1a5077e4dc68364867566c9)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27004: Regression tests
Tomas Cohen Arazi [Tue, 29 Dec 2020 17:35:27 +0000 (14:35 -0300)]
Bug 27004: Regression tests

This patch introduces regression tests for the change in
Koha::Checkouts::ReturnClaim->store.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Checkouts/ReturnClaim.t
=> FAIL: Tests fail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c4702149b2a9d3ec6216a7526a2c52b91de5d4cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1b6a5321b6593e54b2870229404df8544f37e9e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27276: Fix syntax error
Kyle M Hall [Mon, 4 Jan 2021 13:12:25 +0000 (08:12 -0500)]
Bug 27276: Fix syntax error

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4f112b782b706d906fb39dd0d7a708f7d12da45f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 289068c0d5c6ea8a45551a27aa8075d59ed6e759)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27276: Prevent borrowers-force-messaging-defaults.pl to crash
Jonathan Druart [Fri, 18 Dec 2020 13:28:13 +0000 (14:28 +0100)]
Bug 27276: Prevent borrowers-force-messaging-defaults.pl to crash

MySQL 5.7 does not allow queries using 0000-00-00

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f228c9ee9fc7094054b687b26ae4306254922019)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1b4f18148ba2192afb247ac3e8b87676f4647245)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27055: Fix compatibility with newer Firefox+Selenium version
Victor Grousset/tuxayo [Thu, 19 Nov 2020 12:47:45 +0000 (13:47 +0100)]
Bug 27055: Fix compatibility with newer Firefox+Selenium version

Fix "submit is not a function error"
A submit button should not be named "submit", in this case, it's id.
https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in-javascript

Fix some uses of get_attribute()

Fix a fail by setting a global implicit_wait_timeout, default value is 0
in our lib. Other libs set it higher which helps to not have to manually
deal with part of the timing issues.

Fix: remove usage of click_when_visible() because it doesn't work with
elements not in the top of the page. Because they are off screen.

Fix: use $driver->quit() in error_handler to not forget an open Firefox.
With the current version, it fills /dev/shm and fails with around 5
Firefox opened.
Also use quit() it at the end of every script.

Fix: filling item fields, to fill only the displayed one (not those
with display:none)

== Test plan ==
1. Update selenium/standalone-firefox to the latest version [1]
2. prove t/db_dependent/selenium/authentication.t
3. It fails with: arguments[0].form.submit is not a function
4. Apply patch
5. Retest
6. Success

[1] In koha-testing-docker you can do it with
docker-compose.yml:
     selenium:
-        image: selenium/standalone-firefox:2.53.1-americium
+        image: selenium/standalone-firefox

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3c3406257e78a9407320d22820807f767b4c4df3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 51fcc453f9db5c196cc62cb29f3321f32f5dd54e)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27099: Stage for import button not showing up
Owen Leonard [Mon, 14 Dec 2020 12:30:03 +0000 (12:30 +0000)]
Bug 27099: Stage for import button not showing up

In the latest version of Chrome, pages where the Humansmg library is
included have a problem where the language footer obscures the bottom of
the page.

The problem traces back to some CSS in the Humanmsg library's CSS file:

html, body {
    height: 100%; /* Damn you IE! */
}

Removing the line doesn't have any ill effects that I can see in Chrome
or Firefox, and it fixes the problem in Chrome. IE can be damned.

To test you must have one or more translations enabled in the staff
interface.

- Apply the patch and clear your browser cache if necessary.
- View pages in the staff interface which use the Humansmg library,
  e.g.:
  - Administration -> System preferences. Choose a category of
    preferences which will be numerous enough to require scrolling to
    reach the bottom of the page.
  - Tools -> Stage MARC records for import. Upload a file to display the
    form for staging the import.
  - Cataloging -> Advanced MARC editor

On each page the language footer should not obscure the bottom of the
page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2498cdcc88be798b88d6a23bf6e592cff5a80f45)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 474a12938043c4494fac4effd01ba20dadf9eca0)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27247: Re-add highlighting to the quote editor
Jonathan Druart [Wed, 16 Dec 2020 10:32:20 +0000 (11:32 +0100)]
Bug 27247: Re-add highlighting to the quote editor

Caused by
  commmit 247dca306407ac9568344a0a37aca3bbcffc2468
  Bug 23013: Upgrade DataTables in the staff client

which removed

-tr.even.selected td {
-    background-color: #D3D3D3;
-}

There was no more highlighting when trying to delete an imported quote, as there was before
(see screenshot from the manual https://gitlab.com/koha-community/koha-manual/-/blob/master/source/images/tools/qotd/selectfordelete.png)

It was, however, possible to delete imported quotes, you just don't see which ones you are deleting.

Test plan:
1) Create a CSV with two columns first the name, then the quote (I've attached a CSV that I've done for testing purposes)
2) Go to Tools > Edit quotes for the QOTD feature
3) Click 'Import quotes'
4) Click 'Browse' and choose the CSV created earlier
5) Click on the id of a couple of quotes. Notice those lintes are highlighted

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit eddf09da53b0ad21e2b2649266ca201623372d0c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2cb19eacba4207b68b6a1f70f672fe2ca8086a04)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27230: Display OPAC description for OPAC_SUG
Jonathan Druart [Mon, 14 Dec 2020 13:51:17 +0000 (14:51 +0100)]
Bug 27230: Display OPAC description for OPAC_SUG

The authorised values OPAC_SUG displayed at the OPAC show the staff
description.

Test plan:
1. Create an auth value in opac_sug, with different text for the description and OPAC description.
2. Go to the OPAC and open the purchase suggestion form.
3. Note in the Reason for purchase drop down, the descriptions appear, the text entered in the OPAC description field.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26956: Allow guarantor's controls to be set when a guarantee is created
Jonathan Druart [Wed, 2 Dec 2020 09:34:50 +0000 (10:34 +0100)]
Bug 26956: Allow guarantor's controls to be set when a guarantee is created

With AllowStaffToSetCheckoutsVisibilityForGuarantor and
AllowStaffToSetFinesVisibilityForGuarantor set to Allow, one can only see the
controls for these values in the patron record *after* the patron has been saved
with a guarantor. That makes a frustrating 2-step process. We should be able to
set those values regardless of whether or not there is currently a guarantor on
the account.

Test plan:
Create a guarantee and confirm that the 2 options "Show checkouts to
guarantors" and "Show fines to guarantors" are displayed
Select Yes, save
Confirm that the values have been correctly saved

Signed-off-by: Kelly McElligott <kelly@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 6a461382ba944a8e9f4a7c4e534dca74745f0f55)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a91ca451224aac8435aa3c3ff2ef3f2415093466)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 22243: Fix unescaped apostrophe in Z target
Andrew Isherwood [Thu, 31 Jan 2019 09:40:08 +0000 (09:40 +0000)]
Bug 22243: Fix unescaped apostrophe in Z target

This patch escapes apostrophes in the z39.50 target name prior to them
being embedded in the template.

To test:

- Create a z39.50 target containing an apostrophe in the title
- Note that the Advanced Cataloguer editor does not load
- Apply the patch
- TEST: Note that the Advanced Cataloguer editor does load

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7ffa71fbd1fa0e4b8c036f02b8a73eacbdfac066)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d97b64c83db7ab1740e43af55c243c075e1f359d)

3 years agoBug 27256: Update click handler for point of sale
Martin Renvoize [Wed, 16 Dec 2020 19:26:11 +0000 (19:26 +0000)]
Bug 27256: Update click handler for point of sale

This patch updates the click handler to bind to the table element in the
DOM as aposed to the individual buttons by their classes. We then use
the event propogation and filter on the button class to catch the clicks
we want.

Test plan
1/ Add 22 debit_types that can be sold to the system (or reduce the
datatable paging size)
2/ Confirm that items on the second page of results cannot be added for
sale on the point of sale page.
3/ Apply the patch
4/ Confirm items from the second table page can now be added correctly
5/ Clicking add when navigating to such an item should leave the items
table unmodified.
6/ Clicking aa when the table was filtered should reset the filters
bringing the table back to the first page
7/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit 68047132a4888db6eb5169e1cd3ceac49aa84b3b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0b4ebc2bf74c408102c19bb7c2a85279762f691)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 14564: Set permissions on configuration backups
Mirko Tietgen [Sun, 19 Jul 2015 15:16:12 +0000 (17:16 +0200)]
Bug 14564: Set permissions on configuration backups

This patch sets the group and group read permissions on
configuration backups, so that they can be downloaded
via the web staff interface.

Test plan:
0. Apply the patch
1. cp debian/scripts/koha-dump /usr/sbin/koha-dump
2. koha-run-backups --days 2 --output /var/spool/koha
3. Note *.tar.gz backups in /var/spool/koha/kohadev
now have root:kohadev-koha ownership and 640 permissions
4. vi /etc/koha/sites/kohadev/koha-conf.xml
5. Set backup_db_via_tools and backup_conf_via_tools to 1
6. echo 'flush_all' | nc -q 1 memcached 1121
7. koha-plack --restart kohadev
8. Go to http://localhost:8081/cgi-bin/koha/tools/export.pl
9. Click on "Export configuration"
10. Choose a file
11. Click Download configuration
12. Note that *.tar.gz file downloaded correctly

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6982680ae9e71d5d038e894842125860fcc986d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e906a737f2f77d79b125ac292172d93191b672f3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 24519: Match paycollect form validation for change collection
Martin Renvoize [Mon, 2 Mar 2020 16:45:58 +0000 (16:45 +0000)]
Bug 24519: Match paycollect form validation for change collection

This patch adds form validation to the Point Of Sale payment page such
that one cannot submit the form with a 'collected' value that is less
than the 'owed' amount.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 080288bce48cf4fa94b19d35a117dd3e1967a4c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5d1436a1d5ee8299841cdab54bb35c437e33700)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26849: Fix Array::Utils dependency in cpanfile
Julian Maurice [Wed, 28 Oct 2020 15:46:32 +0000 (16:46 +0100)]
Bug 26849: Fix Array::Utils dependency in cpanfile

Since bug 26434, if the module is missing Koha does not start. So it
should be marked as required

Signed-off-by: Mason James <mtj@kohaaloha.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 a43fcaf1416057905c277951fb2b0bff13977d33)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7e25a22baf48555761dcf1257efea2cd65e197f7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27117: Only place_holds permission is needed to adjust pickup locations
Jonathan Druart [Tue, 1 Dec 2020 10:44:04 +0000 (11:44 +0100)]
Bug 27117: Only place_holds permission is needed to adjust pickup locations

The GET /pickup_locations route is requesting the whole reserveforothers
permission whereas only the subpermission place_holds is needed.

Test plan:
0. Don't apply this patch
1. Set the subpermission place_holds but modify_holds_priority
2. Edit a hold and click the pickup library dropdown list
3. You get a JS alert and log displays
  GET /api/v1/app.pl/api/v1/holds/5/pickup_locations
  403 Forbidden
4. Apply this patch
5. Reload the page, click the dropdown list, modify the pickup location
and save
=> Success!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 69c01ee0f2dccd04cfbe8201ba580a15727f5280)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 05ba6b702e1e267ec110c83f0b3e133a023d7948)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27205: Improve logic readability in conditional
Jonathan Druart [Fri, 18 Dec 2020 10:56:22 +0000 (11:56 +0100)]
Bug 27205: Improve logic readability in conditional

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

3 years agoBug 27205: Check valid pickup location on POST /holds
Tomas Cohen Arazi [Mon, 14 Dec 2020 13:19:05 +0000 (10:19 -0300)]
Bug 27205: Check valid pickup location on POST /holds

This patch adds a check for valid pickup location to the POST /holds
route. A 400 code is returned if the supplied pickup library is not
valid.

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

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c913bd7d698a8fbc9992f93db426a35c79f330c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 01bd125f1fbbf8d54870baf80fcfaacc105c44e0)

3 years agoBug 27205: Check valid pickup location on PUT /holds/:hold_id
Tomas Cohen Arazi [Fri, 11 Dec 2020 20:55:40 +0000 (17:55 -0300)]
Bug 27205: Check valid pickup location on PUT /holds/:hold_id

This patch adds a test for valid pickup locations when updating a hold
through the API.

Tests are adjusted to reflect this change.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1bfe7ea16ef1346585211345ba89d18e303a0c32)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0df97c37d8c7a6989a118187d8867a52fb3bb608)

3 years agoBug 27209: (follow-up) Add ->is_pickup_location_valid
Tomas Cohen Arazi [Mon, 14 Dec 2020 10:37:53 +0000 (07:37 -0300)]
Bug 27209: (follow-up) Add ->is_pickup_location_valid

This patch simply refactors the pickup location check into a method that
can be called on its own. Tests are added, and the tests for
->set_pickup_location should pass unmodified.

To test:
1. Apply the first two patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: tests pass
3. Apply this refactoring patch
4. Notice the tests are similar, but check for boolean output
5. Repeat 2
=> SUCCESS: New tests pass, set_pickup_location() behavior unchanged.
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 865a1dab5c346920c61237c4b7593202328e04f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 02df63c430df50d0d6985be23c4e5a98142b8a30)

3 years agoBug 27209: Add Koha::Hold->set_pickup_location
Tomas Cohen Arazi [Fri, 11 Dec 2020 19:51:42 +0000 (16:51 -0300)]
Bug 27209: Add Koha::Hold->set_pickup_location

This patch introduces a method to safely update a hold's pickup
location. It will raise exceptionis if the passed parameters are invalid
or absent.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS; Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 672413ea294679d4b5b30d30839650f6d30b45ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 18578794d9e5ac3c5e5c0548989224149bccae60)

3 years agoBug 27209: Unit tests
Tomas Cohen Arazi [Fri, 11 Dec 2020 19:51:34 +0000 (16:51 -0300)]
Bug 27209: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 295787223e4dbbe116cba20119db05da4992e0b1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ac140820b76d65c1deff63f4a11e745cb3a1733)

3 years agoBug 27166: [20.05.x] Set destination_loc to item->homebranch
Nick Clemens [Tue, 8 Dec 2020 14:18:35 +0000 (14:18 +0000)]
Bug 27166: [20.05.x] Set destination_loc to item->homebranch

In bug 21020 we used the issue to fetch the item and then the homebranch.
This fails when the item is not issued. We fetch the item already, so we
can use it directly

In 20.05.x we don't have the item object, so we can just use the SIP transaction item

To test:
1 - Have an item belonging to branch A
2 - Check it in via sip at branch B:
    perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 --item CHESS1 -l FPL -m checkin
3 - The read command is blank and there is a warn about uninitialized data
4 - Apply patch
5 - Restart sip server
6 - Check the item in at branch A using the sip cli emulator
7 - Check it in at branch B
8 - This time the checkin should succeed and the output msg should be included

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27166: Unit tests
Nick Clemens [Tue, 8 Dec 2020 14:18:11 +0000 (14:18 +0000)]
Bug 27166: Unit tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26536: Assignment fix
Martin Renvoize [Fri, 2 Oct 2020 15:17:39 +0000 (16:17 +0100)]
Bug 26536: Assignment fix

Whilst working on this bug I found a weird inconsistent variable assignment line

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD: Amended commit message: fix bug number
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26536: WRITEOFF not writeoff
Martin Renvoize [Fri, 2 Oct 2020 15:09:54 +0000 (16:09 +0100)]
Bug 26536: WRITEOFF not writeoff

There is inconsistency in variable case between the controller script
and the template. This patch corrects those inconsistencies.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26536: Fix incorrectly scoped variable
Martin Renvoize [Mon, 5 Oct 2020 08:08:24 +0000 (09:08 +0100)]
Bug 26536: Fix incorrectly scoped variable

During work on bug 26076 a variable scope mistake was made when
reverting the logic to use distinct queries for selected accountlines.

This patch restores the script scope of the varaible by removing the
superflous 'my' declaration.

Test plan
1/ Add a set of manual invoices
2/ Select a subset of those manual invoices to 'Writeoff selected'
3/ Confirm that only those selected invoices have been written off.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25583: Improve wording
Jonathan Druart [Wed, 9 Dec 2020 10:50:24 +0000 (11:50 +0100)]
Bug 25583: Improve wording

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 25583: Disable the "claim returned" button if the feature is disabled
Jonathan Druart [Fri, 20 Nov 2020 08:18:26 +0000 (09:18 +0100)]
Bug 25583: Disable the "claim returned" button if the feature is disabled

It's possible to display the "Return claims" column on the checkout
list, even if the feature is disabled.
We should disable the link and add an explanation.

Test plan:
- Make sure ClaimReturnedLostValue is empty
- Go to a patron account
- Check out an item
- Make the claims returned column visible in the table of checkouts
=> The button is disabled and a tooltip explains that the feature is
disabled

Signed-off-by: Kyle M Hall <kyle@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 3ae3981d3c881bbbd136015ae94e91961236d15e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 188461bdfe00de99886e1a6e865f8a394f35e279)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26905: Purchase suggestion button hidden for users with suggestion permission...
Owen Leonard [Wed, 2 Dec 2020 14:21:27 +0000 (14:21 +0000)]
Bug 26905: Purchase suggestion button hidden for users with suggestion permission but not acq permission

This patch adds a link to purchase suggestions from the header menu's
"More" submenu for users with suggestions management permission.

To test, apply the patch and log in to the staff interface as a user
with "suggestions_manage" permission.

- Click the "More" menu item in the header. You should see a link to
  "Suggestions" which takes you to the suggestions management page.

- Log in as a user without "suggestions_manage" permission. The link
  should not appear.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26946: Set maxlength for cash register name
Martin Renvoize [Mon, 9 Nov 2020 12:57:13 +0000 (12:57 +0000)]
Bug 26946: Set maxlength for cash register name

The cash register names is limited to 24 characters at the database
level and so that restriction should also be reflected in the UI.

Test plan
1/ Add or Edit a cash register ( admin > accounts > cash registers )
2/ Note that you can enter a cash register name longer than 24
characters, but upon save the value is truncated.
3/ Apply patch
4/ Note you can not longer enter a cash register name longer than 24
characters.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 012229c5ea77a009dc708db4370bf499e48dad01)
(cherry picked from commit 57fa54cd7a71a704408cb3630c70bbb53de2b6fd)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27108: Add 21.05 release team to teams.yaml
Martin Renvoize [Fri, 27 Nov 2020 14:08:24 +0000 (14:08 +0000)]
Bug 27108: Add 21.05 release team to teams.yaml

This patch update the docs/teams.yaml file to add the elected 21.05
release team and update the include to reflect the minor change of
structure.

Test plan.
1/ Apply the patch
2/ Update Koha.pm to state 20.11.00.000
3/ Update preferences to Version to 20.1100000
4/ Navigate to the about page
5/ Note that the 20.11 team is shown on the left and the new 21.05 team
is shown on the right.
6/ Pay particular attention to the 'Packaging manager' on the left and
'Packaging team' on the right. (We have not had a team of packaging
people before, so the template had to be updated to allow for an array
of packaging people).
7/ Signoff.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27108: (QA follow-up) Fix Agustin and Documentation manager

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit adf0293c7bc6b46dbd9c10e86a4684c602b23e16)

3 years agoBug 26938: Compiled CSS
Andrew Fuerste-Henry [Wed, 16 Dec 2020 19:50:11 +0000 (19:50 +0000)]
Bug 26938: Compiled CSS

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 12430: Fix Search.t failure
Jonathan Druart [Wed, 9 Dec 2020 09:52:15 +0000 (10:52 +0100)]
Bug 12430: Fix Search.t failure

t/db_dependent/Search.t ..
    #   Failed test 'buildQuery should keep 0 value'
    #   at t/db_dependent/Search.t line 669.
    #          got: 'su,phr=(rk=(0)) '
    #     expected: 'su,phr=0(rk=(0)) '

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 12430: Fix selenium/regressions.t failure
Jonathan Druart [Fri, 4 Dec 2020 16:05:30 +0000 (17:05 +0100)]
Bug 12430: Fix selenium/regressions.t failure

Test failed with
    # Looks like you planned 4 tests but ran 3.
t/db_dependent/selenium/regressions.t .. 2/5
 #   Failed test 'OPAC - Remove from cart'
 #   at t/db_dependent/selenium/regressions.t line 109.
Error while executing command: clickElement: An unknown server-side error occurred while processing the command.: Element is not clickable at point (583.7000122070312, 14). Other element would receive the click: <a class="page-link" href="/cgi-bin/koha/opac-search.pl?idx=kw&amp;q=d&amp;offset=420&amp;sort_by=relevance_dsc&amp;count=20" aria-label="Go to the last page"></a>

https://pic.infini.fr//Qhq7pLBq/jT9wZ7F1
The remove from basket link for the biblio 3 is hidden by the floating
toolbar.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 12430: Add unit tests for C4::Search::buildQuery
David Cook [Tue, 18 Feb 2020 03:02:55 +0000 (03:02 +0000)]
Bug 12430: Add unit tests for C4::Search::buildQuery

This patch adds unit tests for buildQuery, especially focusing on
the use of the (rk=()) wrapper.

Note that the Net::Z3950::ZOOM library is used to test the queries
for CCL validity on top of the string matching used in the
got/expected comparisons.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: fix spelling connexion ==> connection

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 12430: Use releance ranking without QueryWeightFields
David Cook [Tue, 17 Jun 2014 06:59:32 +0000 (16:59 +1000)]
Bug 12430: Use releance ranking without QueryWeightFields

The system preference "QueryWeightFields" is mutually exclusive with
the system preference "QueryAutoTruncate" and the * truncation
modifier, when not using QueryParser.

If you use truncation, relevance won't work anymore. (N.B. Relevance
doesn't work probably when using QueryParser, but for a very different
reason beyond the current scope of this bug.)

This patch adds relevance ranking when using truncation (or basically
when QueryWeightFields is disabled).

_TEST PLAN_

1) Turn on "QueryWeightFields" and set "QueryAutoTruncate" to auto
2) Turn off "UseQueryParser"
3) Do a keyword search in the OPAC
4) Note that the results are ordered by biblionumber ascending

5) Apply patch

6) Do the same keyword search in the OPAC
7) Note that the results are never ordered differently
(presumably in relevance order :P)

If you're a stickler, throw in some warns so that you can see
what CCL query is being sent to Zebra.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 f6b5dfa4b718fb74654448b5663cb264b5c376b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 913cf92b2d8d4b1a948e32c941c903359afa7f02)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 16067: Remove FastMmap
Jonathan Druart [Mon, 17 Dec 2018 15:45:54 +0000 (12:45 -0300)]
Bug 16067: Remove FastMmap

It is known to be broken, we should remove its implementation

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26336: Add hint before and remove select after staging with no items
Nick Clemens [Tue, 1 Sep 2020 16:36:43 +0000 (16:36 +0000)]
Bug 26336: Add hint before and remove select after staging with no items

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5cdae4c64b7da609ddeb94d77ffa5bdbb4cb8ca1)
(cherry picked from commit c2d5331cba998adc91c2d4b4c816161ba02fd8ca)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26336: Disable 'Item processing' dropdown if no item
Jonathan Druart [Tue, 1 Sep 2020 13:47:27 +0000 (15:47 +0200)]
Bug 26336: Disable 'Item processing' dropdown if no item

If there is no item to process and they have been ignored during the
stage step, we should not let the user modify the dropdown value

Test plan:
0 - Check the count of import_items
    SELECT COUNT(*) FROM import_items;
1 - Import a marc file with items , process the items
2 - Check the count of import items, it has increased
3 - Stage the file again, do not process items
4 - Count of import_items has not increased
5 - Manage the stage batch
Confirm that you cannot modify the "Item processing" value

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cee2e630b4e26ebfaef6cf3f41a79df3cf697b01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6ed7950630e4b0ca9d4629a726ee1b3909254cad)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26976: Display 0 if renewalsallowed is not defined
Jonathan Druart [Fri, 20 Nov 2020 10:27:45 +0000 (11:27 +0100)]
Bug 26976: Display 0 if renewalsallowed is not defined

If the circulation rule "renewalsallowed" is not set (or an empty
string) then the checkout list displays
(0 of  renewals remaining)
It should display "0 of 0"

Test plan:
Set renewalsallowed to an empty string
Check an item out
Notice the change

Signed-off-by: David Nind <david@davidnind.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 01a7dc70670801fab021ba7e4f782542c744bbee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7e4bab26ca65b28df39cdf7d480b9f4c5e9e3e53)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27144: Fix syntax error that prevents deleting patrons
Joonas Kylmälä [Thu, 3 Dec 2020 13:23:22 +0000 (15:23 +0200)]
Bug 27144: Fix syntax error that prevents deleting patrons

To test:
 1) In staff interface open up a patron record
 2) Click More -> Delete, and then "Yes, delete"
 3) Notice 500 error
 4) Apply patch
 5) Notice error is now gone when deleting

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 08c34b33e4f9bf8f4f515ca769ed923999d3991f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ccfd83fffaaa8abe640cf6e48af4bc5feca3e354)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 23475: Unset the storage if the values do not exist
Nick Clemens [Fri, 20 Nov 2020 19:53:51 +0000 (19:53 +0000)]
Bug 23475: Unset the storage if the values do not exist

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 23475: Use localStorage to preserve simple search values
Nick Clemens [Mon, 19 Aug 2019 19:38:52 +0000 (19:38 +0000)]
Bug 23475: Use localStorage to preserve simple search values

To test:
1 - Enable IntranetCatalogSearchPulldown
2 - Perform a search that brings you to a single title
3 - Note the search is not displayed on the details page
4 - Apply patch
5 - Repeat
6 - Note the search is retained on details page
7 - Try with different dropdown values and search terms
8 - Test search terms including accented characters etc

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 23475: (follow-up) Fix selectors and stray use statements

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27079: Unit tests
Martin Renvoize [Wed, 25 Nov 2020 14:10:34 +0000 (14:10 +0000)]
Bug 27079: Unit tests

Add a unit test to check for floating point errors in UpdateFine
relating to catching matching CalcFine amounts compared to DB amount
values.

Test plan
1/ Run the unit test and confirm it fails
2/ Apply the second patch in the series
3/ Run the unit test and confirm it passes

Signed-off-by: Josef Moravec <josef.moravec@gmail.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 442802d77629586fe906f1055ce386ace8165d8c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27079: Floating point comparison correction
Martin Renvoize [Wed, 25 Nov 2020 12:58:56 +0000 (12:58 +0000)]
Bug 27079: Floating point comparison correction

We cannot compare calculated values directly as those calculations may
have introduced floating point differences.  We have the
Koha::Number::Price->round function to consistently round the floating
point number to a decimal with 2 points precission for comparison.

Test plan
1/ Set a circ rule to have a .15 per day fine and enable finesMode
syspref.
2/ Issue an item of this type to a borrower (making it 12 days overdue
   by setting the due date to 12 days in the past)
3/ Run the fines job:
4/ Pay the fine for the patron
5/ Check in the item
6/ Note that the patron does not have an 'Overpayment refund' of $0.00

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Bug 27079: (QA follow-up) Round both sides for clarity

Signed-off-by: Josef Moravec <josef.moravec@gmail.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 f99a22f276e429863d4168f7f92c60e66deeb82d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27092: Remove note about "synced repo" from README.md
Jonathan Druart [Wed, 25 Nov 2020 15:31:58 +0000 (16:31 +0100)]
Bug 27092: Remove note about "synced repo" from README.md

Now it's displayed on our git.k-c.org by gitea.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7d6a5315007c6e1d5c85f57dcbd9e4b5faa01e27)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26518: (QA follow-up) Expect warnings, don't supress them
Nick Clemens [Mon, 23 Nov 2020 12:09:47 +0000 (12:09 +0000)]
Bug 26518: (QA follow-up) Expect warnings, don't supress them

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a8b89fe66a3e03cc951737a3dfcd235b81c982a7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26518: Move BiblioAutoLink within the transaction
Jonathan Druart [Mon, 12 Oct 2020 13:01:22 +0000 (15:01 +0200)]
Bug 26518: Move BiblioAutoLink within the transaction

We don't want the authorities to be created if the biblio insert fails
later

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9038cdd9a45c06266b18167900fd428b0b1395ad)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26518: Hide expected DBI warnings
Jonathan Druart [Fri, 9 Oct 2020 10:09:08 +0000 (12:09 +0200)]
Bug 26518: Hide expected DBI warnings

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1519050205d0f4411ca01e312732e5861da4ac3d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26518: Raise exception if the insert failed
Jonathan Druart [Tue, 29 Sep 2020 11:29:49 +0000 (13:29 +0200)]
Bug 26518: Raise exception if the insert failed

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b0c39296c5c557bfcb00a762036bb269efd04a46)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 26518: Use Koha::Biblio[item] in AddBiblio
Jonathan Druart [Tue, 29 Sep 2020 11:29:33 +0000 (13:29 +0200)]
Bug 26518: Use Koha::Biblio[item] in AddBiblio

Bug 26518: Does not return from the catch block

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a1e9453f1dcd5cc477ccd7fbecadb2a36176a4be)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27070: Add cross_fields type to our searches
Nick Clemens [Fri, 20 Nov 2020 19:11:10 +0000 (19:11 +0000)]
Bug 27070: Add cross_fields type to our searches

This patch adds the 'cross_fields' type to our searches:
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-query-string-query.html#query-string-syntax

Without this patch the search terms seem to all require being in the same field when using Elasticsearch 6

To test:
0 - Set QueryAutoTruncate to 'only if * is added'
1 - Find a record with a title and publisher
2 - Search for a word form the title and confirm the record is returned
3 - Search for a work from the title and the publisher's name
4 - The record is not returned
5 - Apply patch
6 - Repeat #3
7 - The record is returned

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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 03f15d13c5bb931c03aa1487a3887bdaa034b06f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
3 years agoBug 27082: uncertainprice.pl does not handle pagination
Blou [Tue, 24 Nov 2020 22:03:32 +0000 (17:03 -0500)]
Bug 27082: uncertainprice.pl does not handle pagination

To reproduce:
1- create a basket
2- add more of 20 orders with uncertain price
3- click on uncertain price button
4- on page 1 of list, uncheck uncertain box of an order
5- click on save button
6- orders who were on page 2 are not display anymore in page uncertainprice.pl
7- return to basket view acqui/basket.pl
8- orders who were on page 2 have "rvcd" label and quantity is null

The data in page 2 and beyond is not transmitted, but the code doesn't
handle that.  This patch makes sure that all that (empty) data is not (wrongly) processed.

Sponsored by: CCSR

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5bc36cd672ad7d4abf839bed2d48da43f09415e9)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>