Commit Graph

31134 Commits

Author SHA1 Message Date
Fridolin Somers 7ac6f7034b Bug 21832: add unit test
Adds a check that is_expired exists in service GetPatronInfo.

Test plan :
Run : prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove ref to bug number, we have git for that

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20ce110f5c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e305856af)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7037e350d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-04-24 09:50:24 +02:00
Fridolin Somers d059090472 Bug 21832: Restore is_expired in ILS-DI GetPatronInfo service
Since Bug 17578 removed C4::Member::GetMemberDetails, the information "is_expired" disappeared from ILS-DI service GetPatronInfo.

I propose to restore in by adding the code that exisited in C4::Member::GetMemberDetails directly in C4::ILSDI::Services.

Test plan :
1) Enable ILS-DI webservice
2) Choose a patron not expired
3) Call web-service (replace X with patron's borrowernumber) :
   /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X
4) You see : <is_expired>0</is_expired>
5) Choose a patron expired
6) Call web-service (replace X with patron's borrowernumber) :
   /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X
7) You see : <is_expired>1</is_expired>

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0748911eb2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 531040897b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ec1145c148)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-04-24 09:50:19 +02:00
Fridolin Somers a54244ace4 Update release notes for 17.05.01 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:48:38 +01:00
Fridolin Somers e8b3c24337 Merge remote-tracking branch 'translate/17.11.17-translate-20190326' into 17.11.x 2019-03-26 07:41:46 +01:00
Fridolin Somers 66f99074ba Increment version for 17.11.17 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:40:47 +01:00
Fridolin Somers 83e5504eef Increment version for 17.11.16 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:40:43 +01:00
Koha translators 59d6437309 Translation updates for Koha 17.11.17 2019-03-26 03:36:50 -03:00
Fridolin Somers 6e7dee0f1d 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 639ad97d84)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30c9167dd4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9918ef23a3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:30:40 +01:00
Fridolin Somers 55e9c05a66 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 99ea714345)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 31ebb5abd0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 13cdadbe8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:30:33 +01:00
Fridolin Somers 37aa846127 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 ffb40290f8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c2531f6fef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f68db17b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:30:27 +01:00
Fridolin Somers e14da89d10 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 5d4f80feac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4bc7751e4a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef6d4aef4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:30:20 +01:00
Fridolin Somers 04a9bf6b7f 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 28edd88483)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0014f64348)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ba64a98d07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:30:15 +01:00
David Cook 1fe15f1b92 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 3bd9004966)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 296f6756ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d272137c4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:25:29 +01:00
Julian Maurice 9ba061ada6 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 926d7c4ba1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d7988f672f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f858a9746)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-26 07:23:18 +01:00
Jose-Mario Monteiro-Santos 73891afe8d Bug 18723: Change dot into comma
This fixes the regression that multiplies the amount entered by 100
when CurrencyFormat is set to FR. It replaces the last dot with a
comma before dealing with the value of ActualCost and ReplacementCost.

Test Plan:
a)Replicate the issue:
    0- Set CurrencyFormat to FR
    1- Go to Acquisitions
    2- Search for a Vendor
    3- Click on "New basket"
    4- Give basket a name and click "Save"
    5- Click on "Add to basket"
    6- Add an order through preferred method
    7- In Accounting details, enter a vendor price with dot decimal (i.e. 19.44)
    8- Save your order line
    9- Click on "Close this basket"
    10- Confirm closing of basket by clicking on "Yes, close"
    11- Click on "Receive shipment"
    12- Enter an invoice number and click "Next"
    13- Click on "Receive" to the right of your order
    14- In Accounting details, notice the Actual cost is written with a decimal dot.
    15- Change the Actual cost, using a dot decimal (i.e 20.99)
    16- Receive the order
    17- Click on "Save"
    18- In "Already received" notice the price is multiplied by 100 (i.e. 2099,00)
    19- Click on "Cancel receipt"
    20- Click on "Receive" to the right of your order
    21- In Accounting details, change the Actual cost, using a comma decimal (i.e. 20,99)
    22- Receive the order
    23- Click on "Save"
    24- In "Already received", notice the price is correct.
b)Apply the patch
c)Test the patch:
    1- Click on "Cancel receipt"
    2- Click on "Receive to the right of your order
    3- Change the Actual cost/Replacement cost, using a dot decimal (21.99)
    4- Receive the order
    5- Click on "Save"
    6- Notice that the Actual cost and the Replacement cost use commas
    7- Change the Actual cost, using a comma decimal (21,99)
    8- Click on "Save"
    9- In "Already received", notice the price is still correct.

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c7f47ea36a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bf7524f0b1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 126d7bcbe1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-13 17:46:17 +01:00
Mark Tompsett 838875f67c 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 5b0eb51c80)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 854f1ca17a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e448cb9042)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-12 09:17:06 +01:00
Mark Tompsett 878c25efb5 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 719153455c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 65a6cd355e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

(cherry picked from commit e6bfbc6832)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-12 09:17:00 +01:00
Fridolin Somers 954cf66078 Bug 22323: cronjob runreport.pl CSV add encoding
Cronjob runreport.pl runs SQL reports and can export as CSV.
This export needs to be UTF-8 encoded.

This pathes replaces use of Text::CSV_XS by Text::CSV::Encoded like in other places like tools/viewlog.pl.
It adds a decode of headers bcause they will be encoded lika other lines.

Test plan:
1) Create a new item with itemnotes 'accentué'
2) Create a SQL report with :
SELECT barcode,itemnotes AS itè FROM items WHERE itemnotes LIKE 'accenté'
3) Run this report
4) You see well encoded header and content
5) Run from command line (replace X by report number) :
misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
6) You well encoded header and content
7) Go to saved reports table
8) Look at saved results of report
9) You well encoded header and content

Signed-off-by: Mikaël Olangcay Brisebois <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 83fe95d0c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0ad76960cd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bde83720d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-07 09:09:16 +01:00
Fridolin Somers ca0aa482df Bug 21587: [17.11.x] correct rebase
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-03-04 16:22:43 +01:00
Fridolin Somers b561c2dbd3 Revert "Bug 21986: Do not escape quotation marks when cataloguing"
This reverts commit 7e21b1fd2d.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-27 09:44:51 +01:00
Martin Renvoize 28191756d1 Bug 22254: Correction to datehandling in test
Adding 13 months is not always the same as adding 1 month and then
adding 12 months in DateTime maths.  This patch rectified the test
to match the correct behaviour in koha.

Test plan.

1) Modify the test (around line 268) to test against the suspect
   leap date of 2019-01-31 and watch the test fail.
2) Apply the patch (which also adds this modification to test
   for such a leap date) and watch the test now pass.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1da0ba48b6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 413f34ba24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 60f8ca789f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-25 11:17:29 +01:00
Fridolin Somers 3a19cfad18 Update release notes for 17.11.15 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-25 07:28:13 +01:00
Fridolin Somers b031050b21 Merge remote-tracking branch 'translate/17.11.15-translate-20190225' into 17.11.x 2019-02-25 07:22:52 +01:00
Koha translators 63ad0672ab Translation updates for Koha 17.11.15 2019-02-25 03:10:23 -03:00
Fridolin Somers aac5a9d717 Increment version for 17.11.15 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-25 07:08:28 +01:00
Katrin Fischer 7b7351e441 Bug 21441: Fix wrong reference to a 'holds' table on system information tab
It looks like a typo snuck in on the about page, listing a holds
table instead of reserves.

To test:
- Manually create the same PK (reserve_id) in reserves and old_reserves
- Verify that the message on about > system information now
  correctly lists those tables (not holds and old_reserves)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cfea47cb06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d7c112bc0e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3947327b65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-22 09:23:45 +01:00
Kyle M Hall a99c081e7b Bug 21829: (QA follow-up) - Update the number of unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3f5b98fd9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60b1a4f836)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 81ae463c1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-22 09:13:44 +01:00
Jonathan Druart e41042878e Bug 21829: Correctly format dateexpiry in notices (date only)
dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b160af2a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ecb86a84c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5493a99486)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-22 09:12:58 +01:00
Jonathan Druart 76bfd3a06d Bug 21829: Add tests for dateexpiry format in notices
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04e121a741)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1106c0fa59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f7bcb149d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-22 07:24:05 +01:00
Katrin Fischer 1d5424c954 Bug 17347: Ignore whitespace before and after on renewing
When an item is checked out, Koha ignores whitespace
at the beginning and the end of the entered barcode.
This makes life easier, if a barcode is C&P from another
page. This patch makes the renewal page behave the same.

To test:
- Checkout an item
- Renew the item from the renew tab or renewal page
  entering the barcode with leading and trailing
  whitespace
- "Barcode not found"
- Apply patch
- Try again
- Barcode should be found now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0e220869f5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c881b32b5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3c9af06611)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-15 08:09:06 +01:00
Liz Rea 3ae9aa63db Bug 22282: Fix PDF issue when exporting PDF in French format.
Fixing up QA comments, keeping 1st instance and removing the 2nd.
Original test plan by Christophe Croullebois.

To test :
Without the patch :

1° select in Acquisitions preferences/OrderPdfFormat French 3-page
2° restart plack if needed
3° In acqui/basketgroup.pl select closed tab
4° Click on "Export as PDF" button
5° You should see a blank page saying "Internal Server Error"

With the patch :

Do the same

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0844f2c174)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 981670c68c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25111a3182)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-15 08:07:01 +01:00
Marcel de Rooy 0c01c67027 Bug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term or code
The test should check $4 or $e for fields ne 111,711.
And should check $4 or $j for 111,711.

Test plan:
Edit a record, add a meeting in 711 without $4 but with $j.
Without this patch the term is not visible, with this patch it is.

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 6179f23dd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9199083de8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ce9ac1f7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-15 08:04:58 +01:00
Fridolin Somers 8c6f6b8848 Bug 22242: Javascript error in value builder cased by Select2
Same as Bug 17780 but in value builders.

Select2 (Bug 13501) introduced divs and inputs that broke some
assumptions about the expected HTML structure. This patch checks if
input has name attribute, because some inputs in Select2 have not.

It brakes value builders marc21_linking_section.tt and
unimarc_field_4XX.tt.

Test plan :
1)  On a MARC21 database
2)  Define 774$0 as a regular subfield
3)  Define 774$4 with an authorised value category
4)  Define 774$t with value builder marc21_linking_section
5)  Create a new record
6)  Use value builder in 774$t
7)  Search for a record and click choose
8)  Without patch : a popup window does not close and show a blank
    screen
9)  With patch : popup windows get close and you see in field 774 $0 and
    $t field with values
10) Same tests with a UNIMARC database on field 461 with value builder
    unimarc_field_4XX.tt

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

Tested successfully with MARC21

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ca0234d34)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55b20ad1a7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 800e3ae8eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-15 07:16:35 +01:00
helene hickey e4fb7e3f23 Bug 21290: Updating documentation for ModItem
To test:
Review the patch and check it is now updated correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a5bfee706)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e96eed9b84)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
(cherry picked from commit 3ea009bcc3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:32:03 +01:00
Jasmine Amohia 0fb7784e13 Bug 20679: Removed 'rows per page' from report print layout
Test plan:
1. Create a report or view an existing report
2. Notice that 'Rows per page:' is visible
3. Print report (Ctrl+P)
4. Confirm that on printed report, 'Rows per page:' is no longer visible

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 65b64bcafa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ba8cd76c62)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
(cherry picked from commit cd7e62f06b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:30:31 +01:00
Caroline Cyr La Rose 251fd804ff Bug 22083: Typo in circulation_batch_checkouts.tt
There is a typo in circulation_batch_checkouts.tt that makes Koha skip
a warning if the user cannot borrow due to circulation rules.

This patch corrects this typo.

To test:

1. In Administration > Global system preferences, 'Allow'
   BatchCheckouts and enter patron categories in
   BatchCheckoutsValidCategories
2. Go to Administration > Circulation and fines rules
3. Enter a rule where a certain category of patrons (that is in
   BatchCheckoutsValidCategories) cannot take out a particular item type
4. Search the catalog for an item of that item type
5. Copy the barcode
6. Go into patrons and find a patron of that category
7. Click on the Batch checkout tab
8. Paste the barcode in the box and click Check out
9. It should say 'Too many checked out'
10. Apply the patch
11. Try the check out again, it should show both warnings ('Too many
    checked out' and 'This patron can't check out this item per library
    circulation policy')

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 3ee95bd021)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4c928041f1)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
(cherry picked from commit c641fb1b08)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:24:16 +01:00
Lucas Gass 112d84a4cc Bug 22207: course reserves page does not have unique <body> id
Test plan: Go to cgi-bin/koha/opac-course-reserves.pl in the OPAC and
make sure the body id is opac-course-reserves

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikaël Olangcay Brisebois <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 358adce2e7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a4345d8af3)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
(cherry picked from commit da0de43d4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:20:51 +01:00
Nick Clemens 3c23aae299 Bug 21877: (RM follow-up) Move space into conditional
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b4cbb1643)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 582a84a6c7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a93fca9b20)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:05:56 +01:00
Fridolin Somers bbd5699f37 Bug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout
Using only TT plugin for authorised value description is a better code.

Test plan :
Part 1:
1.1) On a catalog with items.notforloan defined with authorized values category NOT_LOAN
1.2) Define in NOT_LOAN an authorized values 1 with description 'at the beach'
1.3) Define in NOT_LOAN an authorized values 2 with description empty
Part 2:
2.1) Set preference 'AllowNotForLoanOverride' to 'Don't allow'
2.2) Edit an item with notforloan=1
2.3) Checkout this item => You see 'Item not for loan (at the beach)'
2.4) Edit an item with notforloan=2
2.5) Checkout this item => You see 'Item not for loan'
Part 3:
3.1) Set preference 'AllowNotForLoanOverride' to 'Allow'
3.2) Edit an item with notforloan=1
3.3) Checkout this item => You see 'Item is normally not for loan (at the beach)'
3.4) Edit an item with notforloan=2
3.5) Checkout this item => You see 'Item is normally not for loan'

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 36df53ad8d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30895e2c56)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 11abf890e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:05:44 +01:00
Fridolin Somers 6903dc8260 Bug 21877: Show authorized value description for withdrawn in checkout
During checkout the withdrawn information is displayed in a message :
"Item has been withdrawn".

Like in other pages and like notforloan, we should display the withdrawn authorized value description.

This patch adds this display.
Add <span> so that translation does not change.
Also adds class 'co-withdrawn' (like in checkin 'ci-*' classes) to ease hidding this new information via CSS.

Test plan :
1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN
2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash'
3) Define in WITHDRAWN an authorized values 2 with description empty
4) Edit an item with withdrawn=1
5) Checkout this item => You see 'Item has been withdrawn (dropped in trash)'
6) Edit an item with withdrawn=2
7) Checkout this item => You see 'Item has been withdrawn'

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 cfd59672bb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c22928630a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea3972c080)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-12 16:05:31 +01:00
Katrin Fischer 5148262441 Bug 22111: Format amount shown on place holds when maxoutstanding is reached (staff)
Displays amount outstanding correctly when holds are blocked
by maxoutstanding.

To test:
- Check maxoutstanding system preference value
- Add a fine to a patron account exceeding maxoutstanding
- Try to place a hold for this patron from staff
- Verify this message is shown:

     Patron has outstanding fines: 6.00

- Toggle CurrencyFormat system preference and verify display
  changes according to setting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Mikael 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 c37ded9671)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 78e617b201)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2f918ab38d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 13:53:05 +01:00
Katrin Fischer b4c420af86 Bug 22113: Add price formatting on item lost report
The item lost report displays the price and replacement
price for lost items. With the patch they will display
according to the CurrencyFormat system preference.

To test:
- Mark 1 or more items lost
- Make sure that replacement cost and purchase price are set
- Go to Reports > Items lost
- Search for your lost items
- Verify price and replacement price display
- Apply patch and toggle CurrencyFormat to different settings
- Refresh lost items report
- Verify prices are always displayed according to syspref setting

Signed-off-by: Olivia Lu <olivialokm@gmail.com>
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 c3fb484fe2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit da8e5fcd24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ad483b204)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 13:50:35 +01:00
Katrin Fischer 31597400e6 Bug 22118: Format hold fee when placing holds in OPAC
When Koha charges for holds, a message with the fee is
shown before the patron places the hold. The amount needs
to be formatted according to CurrencyFormat system preference.

To test:
- Add a hold fee to your patron category
- Log into the OPAC
- Search for a record to place a hold on
- Click Place hold
- Verify there is a note showing about the hold fee
- Toggle CurrencyFormat and HoldFeeMode and verify
  that the formatting is always correct

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Mikael 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 4f0618a888)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b8527c5057)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9880c7d852)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 13:31:54 +01:00
Jasmine Amohia d6d4bb6993 Bug 11922: Add SHOW_BCODE patron attribute for Norwegian web installer
Test plan:
1. Notice that /patron_attributes.sql and /patron_attributes.txt can be
located in 2-Valgfritt
2. Confirm that the SHOW_BCODE patron attribute in the English web
installers .sql and .txt file is also in the Norwegian web installers
.sql and .txt file

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 495619649b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9f2110cbbe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0451ac7f66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 13:11:05 +01:00
Jasmine Amohia d5ba703bc3 Bug 19920: Removed unnecessary code from C4/Members.pm
A seperate bug (Bug 16853) removed the subroutine used in this file. I removed the code as it had become unnecessary.

Test plan:
1. Confirm that &changepassword can't be found in C4/Members.pm

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 9f446de791)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a41ee8ad18)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2ec9cb5e94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 13:04:54 +01:00
helene hickey aa7bbb11fb Bug 20491: Updating the MARC subfield desciption of 952q
Test plan:
1) Go to admin, then to MARC frameworks, then to default
frameworks structure, then subfield stucture for 952
2) Verify that 'q'
is described as 'checked out'
3) Go to <intranet>/cgi-bin/koha/cataloguing/additem.pl?biblionumber=x
4) Verify
that 'q' is also descirbed as 'Checked out' in
5) Apply patch and update
your database
6) Verify that the description of 'q' has changed to 'Date
due'
7) Go to <intranet>/cgi-bin/koha/cataloguing/additem.pl?biblionumber=x
6) Verify that it has changed to 'Date due'

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

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

Bug 20491: (QA follow-up) Remove atomic update

We should not update existing installations, especially
since this would not work for translated frameworks.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e4e4c9cbc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cabf7be324)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a93a7422ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 13:01:44 +01:00
helene hickey a1e331883c Bug 20274: Itemtypes report gives zero results if item-level_itypes set to bibliographic records
1) Go to reports then catalog by item types
2) Pick a location and look at table
3) Change the system prefernce of item-level_itypes
4) Verify a zero result
5) Apply patch and retry
6) Verify that result does not change to zero on either preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ad2c206cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8194f17e4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da94385c99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 10:51:22 +01:00
Ethan Amohia 72d6652697 Bug 22122: Rearranged inputs from a patrons basket in Acquisitions.
Test Plan:
1. From home page, go to "Acquisitions"
2. Add a test vendor under "New vendor"
3. Give the vendor any name and click "Save"
4. Click "New Basket"
5. Give the basket a name and click "Save"
6. Click on "Add to basket"
7. Click on "From an external source"
8. Note the order of inputs (ISBN, ISSN, Title...)
9. Go back to the homepage
10. Go to "Cataloging"
11. Click on "New from Z39.50/SRU" button. A new window should open
12. The order of inputs under 'Z39.50/SRU Search' should all match the
order of inputs from step 8. (Except "Select MARC framework)

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 03e5ec6170)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 16ad847fa6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2fffaf647f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 10:39:24 +01:00
Owen Leonard 01d26165a9 Bug 22101: Ill Requests missing in menu on advanced search page
This patch adds [% USE Koha %] to header.inc so that Koha.Preference
calls will work correctly.

To test, apply the patch and log in to the staff client as a user who
has permission to access the ILL module.

- Go to the catalog's advanced search page
- Cnfirm there is a header menu item under "More" for
  "ILL requests."

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45deff8b43)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b456961a6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 807e473fbb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 10:37:47 +01:00
Jonathan Druart f6d389221c Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification
There was a mix up between "modification" and "edit" for $action in
opac-memberentry.pl.

If a patron is logged into the OPAC and they attempt to submit changes to their
personal details without having actually changed anything, the page reloads with
a message stating 'No changes were made.' However, the fields that now appear
are those that have been allowed/hidden according to the preferences set for
patron self registration, even if patron self registration is disabled. This can
lead to problems if there are discrepancies between the fields allowed for self
register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to
'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField
and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is
different between the two settings and save (for example, specify 'mobile' to be
hidden in the former, but don't include in the list of fields to be hidden in
the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice
that the editable fields correspond to those not hidden by
PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by
PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any
fields that would otherwise be hidden by the Self Modification settings).

Reported-By: Chris Slone <cslone@camdencountylibrary.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e0b1f945f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 63ebdb8159)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 70e95a7dc6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2019-02-04 10:33:18 +01:00