]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 21846: Regression tests for add_tag_approval
Tomas Cohen Arazi [Fri, 23 Nov 2018 18:30:52 +0000 (15:30 -0300)]
Bug 21846: Regression tests for add_tag_approval

Due to collation issues, add_tag_approval wrongly calculates
the weight for strings including extended UNICODE characters.

This patch introduces a test for this situation.

To test:
- Apply this patch on master
- Run:
  $ kshell
 k$ prove t/db_dependent/Tags.t
=> FAIL: Tests fail because all extended characters match the same

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 865f9a165d5d5e025737324843eccb5c39a74efb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es)
Tomas Cohen Arazi [Fri, 23 Nov 2018 18:44:04 +0000 (15:44 -0300)]
Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es)

In order to avoid writing the tests using plain DBIC which would later
need to be replaced by a Koha::Object-based counterpart, I introduce
this stub classes.

Stub tests are added as well.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Tags.t \
          t/db_dependent/Koha/Tags/Approvals.t \
          t/db_dependent/Koha/Tags/Indexes.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6c86de628d5873b88a7d6d2d676ecd7b98345aa7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21987: (RM follow-up) Add text for simple tests
Nick Clemens [Fri, 15 Mar 2019 12:22:32 +0000 (12:22 +0000)]
Bug 21987: (RM follow-up) Add text for simple tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1464328718619a673f233406fdb238f0391b0785)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21987: Do not generate true color thumbnails if not needed
Jonathan Druart [Tue, 18 Dec 2018 17:02:19 +0000 (14:02 -0300)]
Bug 21987: Do not generate true color thumbnails if not needed

If the original image is not a true color image we should not generate a
true color thumbnail.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c41d584cb654efbfd8c854bac0d30d87a054ab5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21987: Add tests
Jonathan Druart [Tue, 18 Dec 2018 17:02:14 +0000 (14:02 -0300)]
Bug 21987: Add tests

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit afb39b132b10b74efec31cd8191cdcd72a61d8d3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22493: Clean up DecreaseLoanHighHolds.t
Nick Clemens [Mon, 11 Mar 2019 14:47:01 +0000 (14:47 +0000)]
Bug 22493: Clean up DecreaseLoanHighHolds.t

To test:

1 - prove -v t/db_dependent/DecreaseLoanHighHolds.t
2 - should pass
3 - read code, confirm changes make sense

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ed5b7e4575917f07a3e895be754abc2bacc37337)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22476: Correct default for MarkLostItemsAsReturned
Nick Clemens [Thu, 7 Mar 2019 16:49:11 +0000 (16:49 +0000)]
Bug 22476: Correct default for MarkLostItemsAsReturned

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9682cc7d21645a673bd274b24aeab323f61f28aa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21560: (follow-up) move use at the top
Fridolin Somers [Tue, 5 Mar 2019 14:51:15 +0000 (15:51 +0100)]
Bug 21560: (follow-up) move use at the top

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 639ad97d844f2774f49881174b559293edd6baa4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21560: Unit test for Koha::Util::OpenDocument
Fridolin Somers [Tue, 19 Feb 2019 11:01:16 +0000 (12:01 +0100)]
Bug 21560: Unit test for Koha::Util::OpenDocument

Run prove t/Koha/Util/OpenDocument.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 99ea714345a6278d68e2abb0d182d8b495cf2950)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation
Fridolin Somers [Mon, 18 Feb 2019 16:33:37 +0000 (17:33 +0100)]
Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation

There is nearly the same code in misc/cronjobs/gather_print_notices.pl and reports/guided_reports.pl.
This patch creates a new module with subroutine called by both scripts.

If file path or content is undefined, subroutine will just return undef.
If content is an empty arrayref, empty ods file is still generated.

Unicode encoding is kept outisde because it may not be necessary.

Note that for print notices the first line of message is always the column names so it is extracted only from first message.

Test plan :
Run previous patches test plans and check ODS files are the same.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ffb40290f88380418635a951dbb0788bf7b7e3ce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21560: Optimize ODS export of gather_print_notices.pl
Fridolin Somers [Fri, 7 Dec 2018 09:30:30 +0000 (10:30 +0100)]
Bug 21560: Optimize ODS export of gather_print_notices.pl

Like previous patch, the call on OpenOffice-OODoc lib can be optimized.
Based on https://grep.metacpan.org/search?qci=&q=expandTable&qft=&qd=OpenOffice-OODoc&f=examples%2Ftext2table

Test plan inspired from Bug 11679.

Test plan:
- define your ODUE notice for the print template as:
cardnumber:patron:email:item
<<borrowers.cardnumber>>:<<borrowers.firstname>> <<borrowers.surname>>:<<borrowers.email>>:<item><<items.barcode>></item>
- define overdues rules for a patron category
- check-out 2 items using a due date in order to generate the overdue notices
- check-in these 2 items
- launch the script /misc/cronjobs/overdue_notices.pl
- the 'message_queue' table should now contain 2 new entries
- launch the gather_print_notices cronjob :
  perl misc/cronjobs/gather_print_notices.pl /tmp/test --ods --letter_code=OVERDUE -d=:
- A ods file should be generated in your /tmp/test directory
- Compare times with and without patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5d4f80feac811a9d6e177975b50c57ba85e3434d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21560: report ODS export optimization
Fridolin Somers [Fri, 12 Oct 2018 12:09:54 +0000 (14:09 +0200)]
Bug 21560: report ODS export optimization

SQL reports can be exported with CSV, TSV of ODS format.
When report has thousands of rows, using ODS format is around 10 times longer than other formats.
It also loads CPU and RAM a lot.

The longest call is expandTable().
I found that the call on OpenOffice-OODoc lib can be optimized.
Based on https://grep.metacpan.org/search?qci=&q=expandTable&qft=&qd=OpenOffice-OODoc&f=examples%2Ftext2table

Test plan :
1) Don't apply patch yet
2) Create a new SQL report : Home > Reports > Create from SQL
3) Enter a SQL that will return thousands of results
4) Run report
5) Click Download > Semicolon separated text (.csv), look execution time
6) Click Download > Open Document Spreadsheet, look execution time
7) Apply patch
8) Redo 5) and 6) and compare times, CSV export should be the same but ODS export should be better

My tests shows 1,5 seconds for CSV export.
And for ODS export : 18 seconds without patch and 8 seconds with patch.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28edd8848320fd0f0f284245f2f0567a5907619a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22429: Infinite loop in patron card printing
David Cook [Mon, 4 Mar 2019 06:43:29 +0000 (17:43 +1100)]
Bug 22429: Infinite loop in patron card printing

Text fields in Patron Card Text Layouts can contain regular
expression metacharacters, which - instead of being treated as
literal values - are interpreted and prevent line wrapping. This
causes the process to get stuck in an infinite loop, which keeps
running even after the web server has timed out (at least when
using CGI).

This patch escapes the relevant input from the text field so the
regular expression substitution treats characters as literals
instead of as metacharacters.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3bd900496690375b2b711743ffaa57371388f687)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22296: Add Invoice Adjustments to GetBudgetHierarchy
Nick Clemens [Fri, 8 Feb 2019 20:24:05 +0000 (20:24 +0000)]
Bug 22296: Add Invoice Adjustments to GetBudgetHierarchy

To test:
1 - prove -v t/db_dependent/Budgets.t
2 - Create some invoices on a single budget
    Invoice 1:
      add a non-encumbered adjustment for 1
      add an encumbered adjustment 2
      leave open
    Invoice 2:
      add a non-encumbered adjustment for 4
      add an encumbered adjustment for 8
3 - View acq home page, should see 2 order and 12 spent for the budget
4 - View the spent and ordered pages, they should show the correct amounts
5 - Add more orders etc and confirm things total correctly

https://bugs.koha-community.org/show_bug.cgi?id=22296
Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit deb968ea45276e56826b592026617a96398b61da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22498: Rename variable for budgets loop for invoice adjustments
Nick Clemens [Tue, 12 Mar 2019 13:15:34 +0000 (13:15 +0000)]
Bug 22498: Rename variable for budgets loop for invoice adjustments

To test:
1 - Try to add some adjustments to an invoice (receive shipments, create invoice, click 'finish receiving')
2 - Note the fund dropdown has only 'No fund'
3 - Apply patch
4 - Refresh page
5 - Note you can now select funds, hooray!

Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 19aebacf7c6162e5628cba1078b2c0f2ec9751a6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17496: Remove undocumented/maintained install-CPAN.pl file
Katrin Fischer [Sun, 10 Feb 2019 02:09:45 +0000 (03:09 +0100)]
Bug 17496: Remove undocumented/maintained install-CPAN.pl file

The install-CPAN.pl file was added in 2007 and hasn't been
updated or documented since.

This patch removed it from Koha.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cab238755a69ca7e52b3822b390b31484abb5c72)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22422: Compiled CSS
Martin Renvoize [Tue, 12 Mar 2019 09:21:24 +0000 (09:21 +0000)]
Bug 22422: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22422: improve item location display with class "shelvingloc"
Fridolin Somers [Thu, 28 Feb 2019 12:37:40 +0000 (13:37 +0100)]
Bug 22422: improve item location display with class "shelvingloc"

In record detail page, item location is displayed with CSS using class "shelvingloc".
Many many places at intranet and OPAC can use this class.
It allows to change display in all places using CSS customisation.

This patch removes the CSS "display:block" for class "shelvingloc".
Some places where using "inline" to correct the display.
I think the display should not be managed in template.
So it will be inline by default and it can be changed by custom CSS, on all places or depending on a selctor.

Test plan :
1) Compile SCSS to CSS
2) Add to preferences IntranetUserCSS and OPACUserCSS : .shelvingloc { color:red }
3) Go to pages impacted by patch, be sure to look at cart with "more details"
4) You see item location italic and red

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bc2d9f869ad0bde3e97e3773e0e050503d8083f4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21030: Date widget on suspend modal not working correctly
Owen Leonard [Tue, 5 Mar 2019 18:22:12 +0000 (18:22 +0000)]
Bug 21030: Date widget on suspend modal not working correctly

This patch makes a change to the suspend hold modal markup in order to
allow the datepicker <selects> to work properly.

To test, apply the patch and locate a patron in the staff client who has
holds.

 - On the checkout or patron detail page, open the holds tab.
 - Click the "Suspend" button for one of the holds.
 - In the modal, trigger the date picker and confirm that the dropdowns
   for selecting month and year work correctly.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c91c1a69a23ff8d826a077c61059953bcc51940b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19046: (QA follow-up) Remove doubled up 'Title as phrase'
Katrin Fischer [Thu, 7 Mar 2019 03:10:28 +0000 (03:10 +0000)]
Bug 19046: (QA follow-up) Remove doubled up 'Title as phrase'

One search option was doubled up by accident.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ae2caab54f53bd9b7fbe8e5c1575f38e97002bf2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19046: Make seach pulldown to retain index selection
Jonathan Druart [Mon, 4 Mar 2019 18:39:29 +0000 (15:39 -0300)]
Bug 19046: Make seach pulldown to retain index selection

This patch also fixes add the term in the search input

Test plan:
Enable IntranetCatalogSearchPulldown
Search for a term using the search input in the header (simple search)
Re-do selecting different indices

The selection must retain on the search result page.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 74ac15800bbf358e3f1133a1f212400797640112)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22442: (bug 13618 follow-up) Fix item search CSV export
Jonathan Druart [Mon, 4 Mar 2019 17:50:36 +0000 (14:50 -0300)]
Bug 22442: (bug 13618 follow-up) Fix item search CSV export

We must not filter assignements statements.

Test plan:
Export item search result as CSV
Without this patch the biblio and biblioitem values are not displayed.
With this patch applied everything is displayed correctly

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bb730c1b05c91ee92db09d117293a0ddb87dace1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22303: Correct bottom in virtualshelves/addbybiblionumber.tt
Fridolin Somers [Mon, 11 Feb 2019 08:54:43 +0000 (09:54 +0100)]
Bug 22303: Correct bottom in virtualshelves/addbybiblionumber.tt

In virtualshelves/addbybiblionumber.tt the include intranet-bottom.inc which closes the HTML last tag is not the last line of the template.

This patch moved bottom include to last line and uses popup-bottom.inc.

Test plan :
1) Permission OK :
1.1) Login in staff interface with user 'Bob'
1.2) Create a new list 'Readme' : category public and allow changes to contents from anyone
1.3) Perform a search
1.4) Check some results
1.5) Click 'Add to list' and on the list 'Readme'
1.6) A popup window opens
1.7) Check its HTML is OK, ending with </html>
2) Permission KO :
2.1) Open a new window (Firefox private session) and login in staff interface with user 'Bill'
2.2) Perform a search
2.3) Check some results
2.4) On session of 'Bob', edit list 'Readme'
2.5) Change : category private and allow changes to contents from owner only
2.6) On session of 'Bill'
2.7) Click 'Add to list' and on the list 'Readme'
2.8) A popup window opens saying 'Sorry, you do not have permission to add items to this list'
2.9) Check its HTML is OK, ending with </html>

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 255af719e65956d84d62ea52fea12619bb851f70)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22246: Fix indexing of large fields with Elasticsearch
Ere Maijala [Fri, 1 Feb 2019 11:18:11 +0000 (13:18 +0200)]
Bug 22246: Fix indexing of large fields with Elasticsearch

Deduplicate multivalued fields and make sure sort fields are not excessively long. Also updates default mappings so that sort fields are not created for item fields where it doesn't make sense.

Test plan:
1. Reset ES mappings in administration
2. Check that sort is '0' for local-classification in biblio mappings.
3. Change sort back to '1' for local-classification for the next steps.
4. Create a record with 20 items, each with a 100 character long call number
5. Check that when indexed, the record in ES does not have duplicates in any of the item fields and local-classification__sort is truncated to 255 characters.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bd68e2f75b2bd0cae7935715f4aa03342809cb9f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22416: (bug 22140 follow-up) Remove warnings in Search.t
Jonathan Druart [Tue, 5 Mar 2019 17:29:58 +0000 (14:29 -0300)]
Bug 22416: (bug 22140 follow-up) Remove warnings in Search.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb7b2907c55d896a7c5b8bccf31daeae8bc5720b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22419: Records listed twice when select/unselect all from the cart
Jonathan Druart [Tue, 5 Mar 2019 18:16:44 +0000 (15:16 -0300)]
Bug 22419: Records listed twice when select/unselect all from the cart

It fixes a browser timeout when records are removed from the cart.
The onchange event already call selRecord.

Test plan:
Launch a search
Add all the result to your cart
Open the cart
Click "select all"
Then remove them all from your cart
=> Without this patch the action will timeout
=> With this patch applied the action is immediate

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a0e10d97223ae2945f6ac64b7d86f4ac2fea9e03)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation
Jonathan Druart [Wed, 27 Feb 2019 12:38:57 +0000 (09:38 -0300)]
Bug 22275: (bug 15836 follow-up) Fix class_sources.class_split_rule FK creation

18.06.00.060 will fail if custom Classification sources were created.

In that case we should use the 'generic' split rule.

Test plan:
% git checkout -b bug_22395_pre 3a0cba67f1387595f570ab9d9efdeabc856345b4
Reset the DB
Go to  Home › Administration › Classification sources
Create a custom "Classification filing rules"
Create a custom "Classification sources" using this filing rules
% git checkout master
% perl installer/data/mysql/updatedatabase.pl
=> Without this patch you will get:
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`#sql-33a_67`, CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`) REFERENCES `class_split
_rules` (`class_split_rule`)) [for Statement "
            ALTER TABLE class_sources
            ADD CONSTRAINT class_source_ibfk_2 FOREIGN KEY (class_split_rule)
            REFERENCES class_split_rules (class_split_rule)
        "] at installer/data/mysql/updatedatabase.pl line 17104.

=> With this patch applied the FK will be created successfully
class_sources.class_split_rule will be set to "generic" for these custom values.

Signed-off-by: Oliver Behnke <oliver.behnke@aei.mpg.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 29bc2b583264a62c29a0f39dd79a5b3a64721ae6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20535: ModZebra called with $record with items stripped
David Gustafsson [Fri, 6 Apr 2018 09:15:07 +0000 (11:15 +0200)]
Bug 20535: ModZebra called with $record with items stripped

ModZebra called with $record with items stripped in
ModBiblioMarc. Remove $record argument to force
record to be loaded again from database with items
embedded.

How to test:
1) Make sure biblios are indexed (with
   rebuild_elastic_search.pl).
2) Perform a search that will produce a sample result
   containing at least one biblio with items.
3) Edit and save a biblio with items.
4) Perform the same search again, the updated biblio
   should now have no items when viewed in the search
   results (No items).
5) Apply patch.
6) Repeat step 1-3.
7) The updated biblio should now have items when viewed
   in the search results.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ebf1a26dae62651d1749a2df2e54ee6d1af148a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16251: Fix value of material select for Rancor 008 widget
Julian Maurice [Wed, 6 Mar 2019 07:58:03 +0000 (08:58 +0100)]
Bug 16251: Fix value of material select for Rancor 008 widget

The material type is selected in accordance with the leader (06-07)

Test plan:
1. Create a new record using the advanced editor
2. Set the leader 6th position to 'c'
3. Save the record and reload the page
4. 'Music' should be automatically selected for 008
5. Try other values for the leader 6th and 7th positions

See comment 0 of this bug for the complete mapping

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 926d7c4ba11ad6cd768c884ec4b2dc71d864b64c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22466: Replace existing occurrences
Jonathan Druart [Wed, 6 Mar 2019 14:59:58 +0000 (11:59 -0300)]
Bug 22466: Replace existing occurrences

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9ff997eda7582dbb68d599ab1436b162dd1559da)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22466: Do not ask for TT methods to be filtered
Jonathan Druart [Wed, 6 Mar 2019 14:59:55 +0000 (11:59 -0300)]
Bug 22466: Do not ask for TT methods to be filtered

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 158b3c3a4cfc8a97cc98a3473ca70395fdb398e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22466: Add tests
Jonathan Druart [Wed, 6 Mar 2019 14:59:35 +0000 (11:59 -0300)]
Bug 22466: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c7ef8e6b2db5830745759ad15fe9d6379f6f62b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18584: remove trailing space from C4/XSLT.pm
Hayley Mapley [Sun, 3 Mar 2019 22:26:54 +0000 (22:26 +0000)]
Bug 18584: remove trailing space from C4/XSLT.pm

Test plan:
1) Open C4/XSLT.pm and confirm that the trailing space at line 313 is
gone.
2) Sign off.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 62b4fbb9dd6b440630251fd6686bf7af83b6d5e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22404: Fix parameter "for" of labels in subscription add form
Josef Moravec [Mon, 25 Feb 2019 08:46:11 +0000 (08:46 +0000)]
Bug 22404: Fix parameter "for" of labels in subscription add form

Attribute "for" of tag labelshould contain input id, not name.

Test plan:
1) Go to serials -> add subscription second step
2) Click on labels of these three fields:
    - First issue publication date
    - Subscription start date
    - Subscription end date

--> without patch, nothing happen
--> with path, the datepicker is shown

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d6d91ac32fdd6c8f3e5fad19a29a943044ec0214)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22228: Update test for updated mappings
Nick Clemens [Mon, 4 Mar 2019 18:37:43 +0000 (18:37 +0000)]
Bug 22228: Update test for updated mappings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ec4ea59ec55de1816b47ab13f33597e4eb9c7664)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22228: Escape lone colons and make sure term is balanced
Ere Maijala [Thu, 31 Jan 2019 11:43:00 +0000 (13:43 +0200)]
Bug 22228: Escape lone colons and make sure term is balanced

Escapes unquoted colons that have whitespace on either side. Removed unbalanced quotes.

Test plan:

1. Make sure the test case described in the bug works
2. Make sure tests pass:
  prove t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Björn Nylén <bjorn.nylen(at)ub.lu.se>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dd98584c8572b85afbd68ff98423605df9b18822)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: DBRev 18.11.03.002
Nick Clemens [Mon, 4 Mar 2019 18:30:55 +0000 (13:30 -0500)]
Bug 19575: DBRev 18.11.03.002

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ff20d029e397acbac2ddaf9d11e6a0a7dc184ce2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Don't lower case fields in db and use update script instead of raw SQL
David Gustafsson [Mon, 18 Feb 2019 13:56:17 +0000 (14:56 +0100)]
Bug 19575: Don't lower case fields in db and use update script instead of raw SQL

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a17c2d9c9fb08ce362b07c3ea1420ae30f0527e8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: (RM follow-up) Fix mapping typo
Nick Clemens [Fri, 15 Feb 2019 14:49:33 +0000 (14:49 +0000)]
Bug 19575: (RM follow-up) Fix mapping typo

Found with QA tools, simple fix

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7df5b35a36e859f745f42b5c857cd965c83b55f3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Keep authority-number as alias and fix query
David Gustafsson [Thu, 14 Feb 2019 15:52:04 +0000 (16:52 +0100)]
Bug 19575: Keep authority-number as alias and fix query

Keep authority-number as alias and change field name
from alias to real field in hard coded Elasticsearch query

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eeda2afd3a710cbf4115b96f1386294df7693252)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Fix an search field
Nick Clemens [Thu, 14 Feb 2019 12:44:13 +0000 (12:44 +0000)]
Bug 19575: Fix an search field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ef2a03a09249ee53ff2c431085673aca3f7c9863)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Rebase and fix tests
root [Tue, 12 Feb 2019 21:52:39 +0000 (21:52 +0000)]
Bug 19575: Rebase and fix tests

This patch lower cases the sort by fields to normalize checking them and adjusts
some existing tests to meet the new expectations.

The regex for splitting terms has been moved into a subroutine so that adjustment was made

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c2061adc8be1a6843c0e082c18629f4a6b8fac78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19575: Use canonical field names and resolve aliased fields
David Gustafsson [Fri, 3 Nov 2017 12:21:22 +0000 (13:21 +0100)]
Bug 19575: Use canonical field names and resolve aliased fields

Adjust elastic search mappings to more closely match Zebra equivalents
resolving serveral issues with coded Zebra searches in templates and
sorting of search results in UI. Also make field names in search strings
case insensitive to accept case variations in template links and user input.

Sponsored-by: Gothenburg University Library
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6d53910f0ca05ae41b0d10ce6f3eb274efd3aca4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior
Jonathan Druart [Thu, 21 Feb 2019 18:28:10 +0000 (15:28 -0300)]
Bug 22360: (bug 21205 follow-up) Restore OPACAcquisitionDetails behavior

Caused by
  commit 7d10549ae8632e6640d3a99014268a2a1e46b3c4
  Bug 21205: Replace C4::Items::GetOrderFromItemnumber calls

At this point $order is a Koha::Acquisition::Order object, not a hashref
anymore.

Test plan:
Create an order, receive items
Enable OPACAcquisitionDetails
At the detail page of the bibliographic record you should see
"X items are on order." at the bottom of the items list

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2331b8a295ce3db011b88bf3d42eacd42c9df4ee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22300: Compiled CSS
Martin Renvoize [Tue, 5 Mar 2019 14:36:46 +0000 (14:36 +0000)]
Bug 22300: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22300: Staff search results: Opt groups in 'sort' pull down are not well formatted
Owen Leonard [Mon, 11 Feb 2019 15:09:36 +0000 (15:09 +0000)]
Bug 22300: Staff search results: Opt groups in 'sort' pull down are not well formatted

This patch adds some CSS to style the staff client search results sort
menu headings. Formerly these were <optgroup> tags with a default
browser style.

To test, apply the patch and regenerate the staff client CSS.

 - Perform a catalog search in the staff client.
 - On the search results page, test the "Sort" menu. Confirm that the
   menu headers more clearly indicate the sections.
 - Test the "Add to list" button menu too, where the same style will be
   in use.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0375414c04e97ce21270c114311a3d96403f8da5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22084: Plugin upgrade method and database plugin version storage will never be...
Kyle M Hall [Tue, 8 Jan 2019 18:10:53 +0000 (13:10 -0500)]
Bug 22084: Plugin upgrade method and database plugin version storage will never be triggered for existing installs

If an existing plugin begins using the upgrade() method, it will never actually get triggered because the installation has already occurred and no database plugin version was stored at the time. Without that database version, the upgrade method will never be triggered.

In addition, if the plugin has no upgrade method, the installed version is never updated in the database!

Lastly, when an upgrade succeeds it prints a warning that the upgrade failed.

Test Plan:
1) Install an older version of the Kitchen sink plugin:
   * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.0/koha-plugin-kitchen-sink-v2.1.0.kpz
2) Delete the "__INSTALLED_VERSION__" key, and the "last_upgraded" key from plugin_data for this plugin, to simulate having installed from an earlier version of Koha
3) Upgrade to the latest version of the Kitchen sink plugin:
   * https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases/download/v2.1.22/koha-plugin-kitchen-sink-v2.1.22.kpz
4) Note "__INSTALLED_VERSION__" still doesn't exist for the plugin, in the plugin_data table
5) Apply this patch
6) Restart all the things
7) Browse to the Kitchen sink configuration page, this should trigger the upgrade method
8) Note the "__INSTALLED_VERSION__" and "last_upgraded" keys exist in plugin_data for the Kitchen Sink plugin

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8c2e03020dc02519dec70b9697794a3624c73937)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22084: Regression tests
Tomas Cohen Arazi [Wed, 9 Jan 2019 10:33:15 +0000 (07:33 -0300)]
Bug 22084: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 57f4c01b9a09d1c2e0fc8a3449ba86574775b840)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume
Tomas Cohen Arazi [Mon, 11 Feb 2019 19:05:23 +0000 (16:05 -0300)]
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume

This patch makes the mentioned method use the biult-in method for
resuming a suspended hold, instead of manually setting the specific
attributes using the accessors.

The side effect for this is that HoldsLog is now honoured.

This patchset also refactors the tests a bit so they rely on the exposed
methods and thus don't rely on specific implementation details (like
suspended hold means a date in suspended_until plus suspended=1).

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> FAIL: It fails loudly because things are done manually
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> SUCCESS: Tests pass!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7c3a5c78c1aacbdb0ad7eb758cb9880ecefcce3a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21765: Regression tests
Tomas Cohen Arazi [Mon, 11 Feb 2019 19:04:59 +0000 (16:04 -0300)]
Bug 21765: Regression tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d441ce5cdadba7a87570162b9f54600c82f150e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22397: Wrong message in koha-sip --start
Tomas Cohen Arazi [Fri, 22 Feb 2019 14:31:52 +0000 (11:31 -0300)]
Bug 22397: Wrong message in koha-sip --start

This patch makes koha-sip --start calls mention 'SIP server' instead of
the wrong 'Zebra daemon'.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e47fa012f6e1ecf94712e0cb759625f136703c03)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22378: Fix audio alerts on SCO
Nick Clemens [Wed, 20 Feb 2019 20:00:01 +0000 (20:00 +0000)]
Bug 22378: Fix audio alerts on SCO

Note: The SCO only supports sounds with a full URL, not KOha built in sounds

To test:
1 - Enable audio alerts
2 -  Enable SCO
3 - Note JS error on loading the alerts
4 - Apply patch
5 - No more error
6 - Test with bug 18251

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fb4707b97cec006e0e6f5c4b4dd430146e97f16a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22411: Date and time in log viewer should respect
Josef Moravec [Mon, 25 Feb 2019 18:21:26 +0000 (18:21 +0000)]
Bug 22411: Date and time in log viewer should respect

Test plan:
Go to log viewer and show some log
-- without patch the date ant time in first column is formatted as
yyyy-mm-dd hh:mm
-- with patch the date is formatted according to your dateformat system
preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dd8749661ce7e48e86fc4eeba3c7c42e0321184e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15149: Serial test prediction pattern does not consider end date
Fridolin Somers [Thu, 21 Feb 2019 16:21:58 +0000 (17:21 +0100)]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: zhihui <zhihui@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e3212c8a969ff17783e50d564aaa412bd01a99b1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18957: Record the time part of the last renewed date
Jonathan Druart [Fri, 22 Feb 2019 14:06:46 +0000 (11:06 -0300)]
Bug 18957: Record the time part of the last renewed date

issues.lastreneweddate is a datetime and we could record the time part
of the date.

Test plan:
Renew an issue
note that the time part of the last renewed date is set correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4585228ea9b5cc407dcec8e4bae499d59007ea96)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18957: Add tests
Jonathan Druart [Fri, 22 Feb 2019 14:01:38 +0000 (11:01 -0300)]
Bug 18957: Add tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54fd0718da1bd27531c7f3ac4ea16d04fb15e634)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14850: (QA follow-up) Remove debugging code
Josef Moravec [Mon, 25 Feb 2019 09:18:50 +0000 (09:18 +0000)]
Bug 14850: (QA follow-up) Remove debugging code

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e99a6de09335fdbe227292835b5231b13d9c1f18)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl
Kyle M Hall [Fri, 22 Feb 2019 12:12:10 +0000 (07:12 -0500)]
Bug 14850: Funds from inactive budgets appear in 'Funds' dropdown on acqui/invoice.pl

Test Plan:
1) Create some inactive and active budgets
2) View an invoice in acquisitions
4) Note the shipping fund dropdown behaves like acqui/parcels.pl

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 831531d3bbd0e440693595d0b4fadc704b020d68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly
Tomas Cohen Arazi [Fri, 22 Feb 2019 15:00:35 +0000 (12:00 -0300)]
Bug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly

This patch corrects a typo, and exports KOHA_CONF as other scripts do.

To test:
- Apply this patch
- Run:
  $ # in kohadevbox
  $ perl misc4dev/cp_debian_files.pl
- Try the new script
  $ sudo koha-sip --start kohadev
=> SUCCESS: tail -f /var/log/koha/kohadev/sip* doesn't show fatal errors
anymore
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7128db531c18d3c75a4bad3424bd77732c0d4687)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13515: (RMaint follow-up) Correction to Database Version
Martin Renvoize [Wed, 27 Feb 2019 08:53:55 +0000 (08:53 +0000)]
Bug 13515: (RMaint follow-up) Correction to Database Version

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22170: Improve display of add/edit library group modal
Katrin Fischer [Tue, 5 Feb 2019 21:44:58 +0000 (21:44 +0000)]
Bug 22170: Improve display of add/edit library group modal

Tries to bring the emodal for adding/editing library root
and sub groups more in line with the rest of Koha.

To test:
 - Go to Administration > Library groups
 - With and without patch test following actions:
   - Add a new root group
   - Edit root group
   - Add sub-group entry
   - Edit sub-group entry
- Verify that with the patch the display of the labels
  is more standard (bold and aligned to the right) and
  the input fields are a bit longer to allow for
  easier data entry.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 90b43c6e5fceda3d6bcc4fb24c99934331df1acc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22130: (follow-up) Show not for loan authorised values in batch checkout
Josef Moravec [Tue, 12 Feb 2019 21:33:50 +0000 (21:33 +0000)]
Bug 22130: (follow-up) Show not for loan authorised values in batch checkout

TEST PLAN
1) In Koha administration, search "BatchCheckouts".
2) Make sure "BatchCheckouts" is set at "Allow".
3) Make sure "BatchCheckoutsValidCategories" contains at least one
patron category.
5) Copy the barcode of an item and change the status document so it
cannot be loaned.
4) Choose a patron which belongs to the patron category at 3).
(their account should not be expired and they should not have active
 fees preferably)
5) Go to the patron details page.
6) Click on "Batch check out".
7) Enter the item barcode.
8) Notice a number is in brackets under the column "Information".
9) Apply patch.
10) Notice the status description has replaced the number.
11) Try it with both: AllowNotForLoanOverride on and off

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit abb1b4a75053aa026740e16cc0197d86f417818e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22130: Correct parameter to get authorized value description.
Pierre-Marc Thibault [Mon, 14 Jan 2019 19:02:49 +0000 (14:02 -0500)]
Bug 22130: Correct parameter to get authorized value description.

This patch corrects the error that shows an authorized value instead of the obvious description of the document status.

TEST PLAN
1) In Koha administration, search "BatchCheckouts".
2) Make sure "BatchCheckouts" is set at "Allow".
3) Make sure "BatchCheckoutsValidCategories" contains at least one patron category.
5) Copy the barcode of an item and change the status document so it cannot be loaned.
4) Choose a patron which belongs to the patron category at 3).
(their account should not be expired and they should not have active fees preferably)
5) Go to the patron details page.
6) Click on "Batch check out".
7) Enter the item barcode.
8) Notice a number is in brackets under the column "Information".
9) Apply patch.
10) Notice the status description has replaced the number.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9d69a4238269073fd03961e091b5099b85fea6e6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22080: (QA follow-up) Add filters
Kyle M Hall [Thu, 21 Feb 2019 12:16:24 +0000 (07:16 -0500)]
Bug 22080: (QA follow-up) Add filters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d90d7a6ce7187016698c280adedf1cb892d320cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22080: Easier translation of ElasticSearch mappings page
Fridolin Somers [Fri, 11 Jan 2019 13:28:07 +0000 (14:28 +0100)]
Bug 22080: Easier translation of ElasticSearch mappings page

Actual translation of ElasticSearch mappings page contains a huge block with a lot of %s.
It makes translation hard.

This patch uses new method from Bug 15395 to split into several translation blocks.

Test plan :
1) Apply patch "Bug 22080: [DO NOT PUSH] test code"
2) Apply this patch
3) Enable ElasticSearch in SearchEngine preference
4) Go to Administration > Search engine configuration
5) Check page is OK
6) Update the PO files of a language : perl translate update xx-YY
7) Write translation strings in misc/translator/po/xx-YY-messages.po
8) Install translation : perl translate install xx-YY
9) Check translated page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit da85289767975938e9e0778a8f64e6ef1eca8d97)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21335: Remove redundant includes of right-to-left.css
Katrin Fischer [Wed, 6 Feb 2019 04:31:28 +0000 (04:31 +0000)]
Bug 21335: Remove redundant includes of right-to-left.css

Fixes redundant includes of the right-to-left.css file.
There is no need to include it in the .tt files as it's part
of the doc-head-close.inc.

Note:
  Make sure your *BaseURL preferences are correctly set as
  this will make the switching between languages work
  correctly and throw you back to the start page otherwise
  every time you switch

Test:
- Install an RTL language like Arabic (ar-Arab)
- Test various pages with English and RTL language:
  - Authorities home page
  - Adding a new bibliographic record
  - Adding a new item or editing items
  - Advanced cataloguing (Rancor) editor
  - Labels start page
  - OPAC detail page
- Verify display is correct and right-to-left.css is available

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cdd14f05ae8672786e5306c41ff0f15ec9fed26f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18166: Show internal and vendor notes for receivied orders
Katrin Fischer [Wed, 6 Feb 2019 12:13:12 +0000 (12:13 +0000)]
Bug 18166: Show internal and vendor notes for receivied orders

This copies the logic for showing, adding and editing vendor
and internal notes from the pending orders to the received
orders.

To test:
- In acquisitions create a basket with orders
- Make your you have some internal and vendor notes
- Close the basket and receive shipment
- Create or reuse an invoice
- Receive some of your orders
- Verify that the notes don't show for received orders
- Apply patch
- Verify that the edit/change vendor/internal note links
  work the same on pending and received orders

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe0a2474c9b6702e7d452032f7657da9b990e81a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16276: (RM follow-up) Fix update statement output
Nick Clemens [Fri, 22 Feb 2019 13:28:50 +0000 (13:28 +0000)]
Bug 16276: (RM follow-up) Fix update statement output

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 55332977bf4d70de9d78c324ad88b302d2174c10)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17236: Add minute and hours to last checked out item on circulation for hourly...
Katrin Fischer [Wed, 6 Feb 2019 12:27:53 +0000 (12:27 +0000)]
Bug 17236: Add minute and hours to last checked out item on circulation for hourly loans

This is a simple fix using the right TT filter:
[% issue.date_due | $KohaDates as_due_date => 1 %]

The time part of the due date will only display if it's an hourly loan (!=23:59)

To test:
- Check out 2 items
  - One with a loan period in days
  - One with a loan period in hours
- Verify the the due date only shows the date part
- Apply patch
- Return items and repeat
- Verify that now the time part will show for the hourly loan

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8211aad8c7ad772685b5e3624b3b55b738fe18a2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21692: (QA follow-up) Enhance test for new
Martin Renvoize [Tue, 19 Feb 2019 19:34:04 +0000 (19:34 +0000)]
Bug 21692: (QA follow-up) Enhance test for new

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 569c64252eba27607deb9eccefe7d72678c7bbb9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21692: created a test for Koha::Account->new
Jasmine Amohia [Thu, 17 Jan 2019 03:33:49 +0000 (03:33 +0000)]
Bug 21692: created a test for Koha::Account->new

Test plan:
1) Run test for /Koha/Account.t and confirm that all tests were
successful

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 34c36a32a057c3a9be062e4ea8b6ec46c41859a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21997: SIP patron information requests can lock patron out of account
Kyle M Hall [Thu, 13 Dec 2018 19:56:22 +0000 (14:56 -0500)]
Bug 21997: SIP patron information requests can lock patron out of account

Many SIP services send an empty password field (AD). Even if allow_empty_passwords is enabled for the given SIP account, this empty password is run though Koha's password checker which increments the number of login attempts for a patron. Thus repeated patron information requests can lock a patron out! Empty password fields in SIP should not call for a password check if allow_empty_passwords is enabled.

Test Plan:
1) Enable a patron password attempt with a limit of 3
2) Send 4 patron information requests with an empty AD field
3) Note the patron's account is now locked
4) Apply this patch
5) Repeat step 2 with a different patron
6) Note the patron's account does not get locked!

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fac2c172143b31255767684e4b22c0ba1ae0aaaf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21997: Unit tests
Kyle M Hall [Mon, 11 Feb 2019 18:16:10 +0000 (13:16 -0500)]
Bug 21997: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d0a6469ad58ccd6067bdfbb6cfb0e28dabc5862a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21622: Adjust incorrect GROUP BY clauses in acqui script
Jonathan Druart [Fri, 19 Oct 2018 15:18:19 +0000 (12:18 -0300)]
Bug 21622: Adjust incorrect GROUP BY clauses in acqui script

acqui/ordered.pl:    GROUP BY aqorders.ordernumber
acqui/spent.pl:    GROUP BY aqorders.ordernumbe

'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY

Test plan:
- Create orders for different basket and using different funds
- Receive some of them
- Hit the ordered and spent pages (from the acqui home page)
=> The tables must contain the same data with and without this patch

Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2d904a55e7f0d5da23d61e5272e36a75e4b68af2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22386: Remove debug statements
Jonathan Druart [Thu, 21 Feb 2019 16:25:22 +0000 (13:25 -0300)]
Bug 22386: Remove debug statements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 25006c04da500078b2af1b14824b67076f2f9df5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22386: Define patron variable when matchign on extended attributes
Nick Clemens [Thu, 21 Feb 2019 14:30:22 +0000 (14:30 +0000)]
Bug 22386: Define patron variable when matchign on extended attributes

For all other methods we define a patron object and check the userid,
we just need to define the $patron here

To test:
0 - Apply unit test patch alone
1 - prove t/db_dependent/Koha/Patrons/Import.t
2 - It dies
3 - Apply this patch
4 - repeat tests
5 - It passes!

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8a9c82c3ec42fb5c2937fa523170b3710288d7fd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22386: Unit tests
Nick Clemens [Thu, 21 Feb 2019 14:29:59 +0000 (14:29 +0000)]
Bug 22386: Unit tests

Signed-off-by: Devlyn Courtier <dcourtier@hccc.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f27a63b9ad770ac56e32a3e79d1ecb657534482)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22389: (bug 15836 follow-up) Add Delete regex links on creating splitting source
Jonathan Druart [Thu, 21 Feb 2019 16:42:30 +0000 (13:42 -0300)]
Bug 22389: (bug 15836 follow-up) Add Delete regex links on creating splitting source

The "Delete" link does not exist when the form is empty.

Test plan:
Create a new classification splitting source
Select "Regex" for routine
=> The delete link does not appear (you cannot remove if there is only
one input)
=> It a regex
=> The 2 delete links appear

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63c5a813c994a4893eaef2cb87fcd26bc594c3e4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22391: Remove group by clause in ajax-getauthvaluedropbox.pl
Nick Clemens [Thu, 21 Feb 2019 16:48:22 +0000 (16:48 +0000)]
Bug 22391: Remove group by clause in ajax-getauthvaluedropbox.pl

To test:
1 - Enable strict sql modes
2 - Tail the error log
3 - Add an item to a basket - note that when fund selected you get an error
4 - Apply patch
5 - Repeat, no error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ba7c3f51ccf72565fb721403e1b24c6a56284b49)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22388: Add missing +x flag to split_callnumbers
Jonathan Druart [Thu, 21 Feb 2019 15:23:05 +0000 (12:23 -0300)]
Bug 22388: Add missing +x flag to split_callnumbers

The following commit added this svc script but did not set the correct
permissions, +x was missing
  commit 328046e59cbf7c858b9218ac2adf27bb42784776
  Bug 15836: Add missing svc script

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e429c4b84d662fcc9466a5ed4ee38ba704881507)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18143: Silence ods MARC framework export flood
Mark Tompsett [Sun, 19 Feb 2017 00:50:32 +0000 (19:50 -0500)]
Bug 18143: Silence ods MARC framework export flood

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b0eb51c8066abbd645731593572277ca5b46715)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18143: Silence XML MARC Framework export flood
Mark Tompsett [Sun, 19 Feb 2017 00:21:59 +0000 (19:21 -0500)]
Bug 18143: Silence XML MARC Framework export flood

TEST PLAN
---------
1) Log in to staff client
2) Click Koha administration
3) Click MARC bibliographic framework
4) export default as xml
5) Read the error log
   -- it's floody and export is default framework
6) export another framework as xml
7) Read the error log
   -- it's floody and export is the correct framework
8) apply the patch
9) repeat steps 4-7
   -- expected frameworks exported, and no flooding.
10) run koha qa test tools

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 719153455c8c58fb8b1a8e9123acef5052dbd462)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20102: Remove attribute "text/css" for <style> element used in staff client templates
Owen Leonard [Thu, 29 Nov 2018 17:53:37 +0000 (17:53 +0000)]
Bug 20102: Remove attribute "text/css" for <style> element used in staff client templates

This patch modifies staff client templates to remove the "type"
attribute from <style> tags. The attribute is no longer valid.

To test, apply the patch and confirm the changes to the templates. The
appearance of the staff client should be unchanged.

Validating pages from the staff client should not return any errors
related to the <style> "type" attribute.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e55d16f0da01dc474dc2f4541926c1daf609aff0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21427: (QA follow-up) Fix for tabs
Martin Renvoize [Fri, 8 Feb 2019 16:54:37 +0000 (16:54 +0000)]
Bug 21427: (QA follow-up) Fix for tabs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d220725694302f187b3ff92c0eedda583919b735)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21427: Format prices on ordered/spent lists consistently
Katrin Fischer [Fri, 11 Jan 2019 21:55:35 +0000 (22:55 +0100)]
Bug 21427: Format prices on ordered/spent lists consistently

Some price information on the spent and ordered list already
used the $Price filter. With this patch all amounts should be
formatted according to the CurrencyFormat system preference.

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 209570f89d050f22fa90eed6a8a70ad9eb56e8a2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22147: Hidden 'Batch modify' button on report print layout
Jasmine Amohia [Wed, 16 Jan 2019 21:26:10 +0000 (21:26 +0000)]
Bug 22147: Hidden 'Batch modify' button on report print layout

Test plan:
1) Create or run a report that has an itemnumber column
2) Notice the Batch modify button under the itemnumber heading
3) Print the page
4) Notice the button no longer shows on the printed page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ea9fb91632d712a6f70f4a3382ba96b4db74f69)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21966: Fix descriptions of acquisition permissions to be more clear (again)
Katrin Fischer [Thu, 6 Dec 2018 14:17:37 +0000 (15:17 +0100)]
Bug 21966: Fix descriptions of acquisition permissions to be more clear (again)

This was already done and pushed on bug 3849, but some of it got
undone accidentally by a later patch.

To test:
- Check the acquisition permissions
- The *budget* permissions should clearly describe their
  use for 'funds'.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 940c5c0add3065d35f776a3a19ba87d936e84a0f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Refactor tests using BASIC authentication
Tomas Cohen Arazi [Tue, 5 Feb 2019 11:24:31 +0000 (08:24 -0300)]
Bug 16497: Refactor tests using BASIC authentication

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 02aa348f653a46cae671f5949a27a205bd5cb4fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: (follow-up) GET operations require staff access
Tomas Cohen Arazi [Fri, 18 Jan 2019 15:02:38 +0000 (12:02 -0300)]
Bug 16497: (follow-up) GET operations require staff access

With the introduction of the /public namespace all other endpoints, the
rest of the endpoints are restricted to privileged users.

This patch makes the GET /libraries and GET /libraries/:library_id
endpoints require 'catalogue' permissions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 562eaa154b9efa20431133db04823c4d36be742d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: (follow-up) Adapt to existing guidelines and RFC
Tomas Cohen Arazi [Fri, 11 Jan 2019 16:23:14 +0000 (13:23 -0300)]
Bug 16497: (follow-up) Adapt to existing guidelines and RFC

This patch makes the original implementation match what is specified on
the RFC [1].

The controller is updated, and so the tests.

To test:
- Apply this patches:
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Tests pass!

[1] https://wiki.koha-community.org/wiki/Libraries_endpoint_RFC

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0718416ff1ca70a25bc12fa3b677fdeafd7854c8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Add POD in Koha/REST/V1/Library.pm
Alex Arnaud [Tue, 5 Dec 2017 14:56:34 +0000 (14:56 +0000)]
Bug 16497: Add POD in Koha/REST/V1/Library.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 311f5f38c328267244481c8e5419be01e7d0aa12)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: (follow-up) New column marcorgcode added
Tomas Cohen Arazi [Fri, 27 Oct 2017 15:07:50 +0000 (12:07 -0300)]
Bug 16497: (follow-up) New column marcorgcode added

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 145f578d267427fd7b0936918d988be1febe658c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Add missing field in definitions due to bug 18066
Josef Moravec [Fri, 5 May 2017 10:49:37 +0000 (10:49 +0000)]
Bug 16497: Add missing field in definitions due to bug 18066

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 99ad829f991a30cd044995f3e93d52fc9b87dc1d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 16497: Add /api/v1/libraries
Jiří Kozlovský [Sun, 31 Jul 2016 09:46:57 +0000 (11:46 +0200)]
Bug 16497: Add /api/v1/libraries

CRUD for libraries via REST API.

GET    /api/v1/libraries              - List all libraries
GET    /api/v1/libraries/{branchcode} - Get one Library
POST   /api/v1/libraries              - Add new Library
DELETE /api/v1/libraries/{branchcode} - Delete Library

Test plan:
  - apply patch
  - run tests: t/db_dependent/api/v1/libraries.t
  - test API with some API tool or simple curl

e.g.:
curl http://host:port/api/v1/libraries
curl http://host:port/api/v1/libraries/cpl

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96456cadc28e7e4b442da76adb2c9b1ece5a68f1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7143: (follow-up) Update about page for new devs (Academy)
Jonathan Druart [Fri, 15 Feb 2019 12:44:52 +0000 (09:44 -0300)]
Bug 7143: (follow-up) Update about page for new devs (Academy)

It's now 2019!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 47839084fb788d2d5339842dfb5c6029984f2928)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21845: Sort of issues in OPAC subscription table
Owen Leonard [Thu, 24 Jan 2019 16:13:47 +0000 (16:13 +0000)]
Bug 21845: Sort of issues in OPAC subscription table

This patch adds a default sort option to the table of subscriptions on
the OPAC detail page. This sorting option matches the sort of data
passed from GetLatestSerials.

To test, apply the patch and locate a subscription in the OPAC which has
multiple issues. They should be sorted by default on publication date.

Signed-off-by: mikael <mikael.Olangcay-Brisebois@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fd9ff6a4f012399fc8408aa25ab1185d8308ea45)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22156: Subscription result list sorts on "checkbox" by default
Owen Leonard [Thu, 17 Jan 2019 16:39:52 +0000 (16:39 +0000)]
Bug 22156: Subscription result list sorts on "checkbox" by default

This patch adds default sorting by title to the subscription search
results list. Previously no default sort was defined, so it defaulted to
sorting by the first column in the table.

To test, apply the patch and go to Serials.

- Perform a search of subscriptions which will return multiple results.
- Confirm that the table of open subscriptions is sorted by default by
  title ascending.
- Confirm the same for the table of closed subscriptions.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8a2d5fab95ae2db5adf8cca16524b7a231680dd3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22351: Compiled CSS
Martin Renvoize [Mon, 25 Feb 2019 18:38:46 +0000 (18:38 +0000)]
Bug 22351: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22351: SCSS conversion broke style on last checked out information
Owen Leonard [Fri, 15 Feb 2019 16:12:22 +0000 (16:12 +0000)]
Bug 22351: SCSS conversion broke style on last checked out information

This patch makes a minor change to the staff client SCSS to correct an
error which happened in the SCSS conversion.

To test, apply the patch and regenerate the staff client CSS. Check out
an item to a patron. The box showing information about the item you just
checked out should be flush with the checkout form box.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d000b4202fc7d8d1e80467c8c9890bd71d96cef0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22239: JavaScript error on subscription detail page when there are no orders
Owen Leonard [Wed, 30 Jan 2019 19:58:25 +0000 (19:58 +0000)]
Bug 22239: JavaScript error on subscription detail page when there are no orders

This page modifies the subscription detail page so that a JavaScript
error isn't triggered when a subscription has no acquisition details.

To test, apply the patch and go to Serials.

 - Locate a subscription which isn't tied to acquisitions. In the
   browser console there should be no errors.
 - Locate a subscription which is part of an order. There should be an
   'Acquisitions details' tab and the order information on that tab
   should be displayed as a collapsible tree.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a27a6e6d729cd3b6be0251c1c6bda5a763fea6bc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>