koha.git
5 years agoBug 21573: Move lists barcode and biblionumber entry form to modal
Owen Leonard [Mon, 15 Oct 2018 15:10:28 +0000 (15:10 +0000)]
Bug 21573: Move lists barcode and biblionumber entry form to modal

This patch modifies the staff client lists page so that the
barcode/biblionumber entry form from the left hand sidebar into a modal
window, triggered by a button in the toolbar.

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

 - View the contents of a list in the staff client, logged in as a user
   who has permission to add items.
 - Click the "Add items" button. A modal window should appear with the
   barcode/biblionumber entry form.
 - Submit barcodes and/or biblionumbers and confirm that the correct
   titles are added to the list.
 - Log in again as a user who does not have permission to add to the
   list. Confirm that the button isn't present.

Signed-off-by: Mackey Johnstone <mackeyfj@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17353: (follow-up) Adjust config variable for moremember.tt too
Nick Clemens [Thu, 10 Jan 2019 20:40:02 +0000 (20:40 +0000)]
Bug 17353: (follow-up) Adjust config variable for moremember.tt too

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17353: Add phone number column to checkout search
Nick Clemens [Mon, 26 Sep 2016 17:43:20 +0000 (17:43 +0000)]
Bug 17353: Add phone number column to checkout search

This patch adds borrowers.phone as 'Primary phone' in the checkout
search results. It also ads the table to columns configuration

To test:
1 - Perform a checkout search
2 - Note phone is not displayed
3 - Apply patch
4 - Note phone does not display
5 - Visit columns configuration
6 - Unhide the 'phone' column
7 - Note phone displays
8 - Ensure page functions as before patch

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>
5 years agoBug 20729: Compiled CSS
Nick Clemens [Mon, 28 Jan 2019 12:36:22 +0000 (12:36 +0000)]
Bug 20729: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20729: Update style of datepickers
Owen Leonard [Wed, 10 Oct 2018 18:16:10 +0000 (18:16 +0000)]
Bug 20729: Update style of datepickers

This patch updates the styling of form fields which are configured to
use the jQueryUI datepicker widget. Some CSS has been added, and the
default datepicker configuration has been changed.

To test, apply the patch, rebuild the staff client CSS file, and clear
your cache if necessary. Test pages which include a datepicker to
confirm that they look correct and work correctly. Some examples:

 - Circulation -> Check out -> Specify due date
 - Patrons -> Add patron -> Date of birth, registration date, expiry
   date fields
 - Serials -> Search subscriptions -> Search results page sidebar
 - Tools -> News -> Add news item

And confirm that this change hasn't adversely affected the calendar
tool:

 - Tools -> Calendar

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21399: Sort patron fines in OPAC by date descending as a default
Owen Leonard [Tue, 27 Nov 2018 19:25:09 +0000 (19:25 +0000)]
Bug 21399: Sort patron fines in OPAC by date descending as a default

This patch modifies the DataTables configuration of the logged-in user's
"Fines and charges" table in the OPAC so that the table is sorted by
date, descending.

To test, apply the patch and log in to the OPAC as a user with multiple
fines. Go to the "your fines" page and confirm that the table is sorted
by default on the first column with the newest entries first.

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21913: Clean up payment details page
Owen Leonard [Wed, 24 Oct 2018 16:09:12 +0000 (16:09 +0000)]
Bug 21913: Clean up payment details page

This patch makes various corrections and improvements to the payment
details page:

 - Grid converted to Bootstrap
 - Correct title tag
 - Add patron toolbar
 - Adding missing patron-related JavaScript
 - Improve some language

To test, apply the patch and locate a patron who has one or more
payments on their account.

 - Open Fines -> Account -> Details of a transaction
 - Confirm that the page looks correct and adjusts well at various
   browser widths.
 - Confirm that patron toolbar items work correctly

Signed-off-by: Jose-Mario <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22083: Typo in circulation_batch_checkouts.tt
Caroline Cyr La Rose [Tue, 8 Jan 2019 14:28:35 +0000 (09:28 -0500)]
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>
5 years agoBug 20640: (follow-up) Always send a backend on migrate
Martin Renvoize [Fri, 11 Jan 2019 16:12:24 +0000 (16:12 +0000)]
Bug 20640: (follow-up) Always send a backend on migrate

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Make error message translatable
Martin Renvoize [Fri, 11 Jan 2019 14:50:47 +0000 (14:50 +0000)]
Bug 20640: (follow-up) Make error message translatable

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Redirect to new request at completion
Martin Renvoize [Fri, 11 Jan 2019 12:41:29 +0000 (12:41 +0000)]
Bug 20640: (follow-up) Redirect to new request at completion

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: (follow-up) Degrade gracefully on error
Martin Renvoize [Thu, 1 Nov 2018 15:29:08 +0000 (15:29 +0000)]
Bug 20640: (follow-up) Degrade gracefully on error

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20640: Add backend migration support to ILL
Martin Renvoize [Fri, 27 Apr 2018 07:48:53 +0000 (08:48 +0100)]
Bug 20640: Add backend migration support to ILL

- Add core methods required to support the migration of ILL requests
between backends.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: Use CanItemBeReserved in ILSDI HoldItem instead of CanBookBeReserved.
Alex Arnaud [Tue, 18 Sep 2018 13:05:26 +0000 (13:05 +0000)]
Bug 19945: Use CanItemBeReserved in ILSDI HoldItem instead of CanBookBeReserved.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: Add a test proving that using CanBookBeReserved in ILSDI::HoldItem is...
Alex Arnaud [Tue, 18 Sep 2018 12:59:26 +0000 (12:59 +0000)]
Bug 19945: Add a test proving that using CanBookBeReserved in ILSDI::HoldItem is wrong.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: (follow-up) optimization and test correction
Mark Tompsett [Tue, 27 Mar 2018 19:31:36 +0000 (19:31 +0000)]
Bug 19945: (follow-up) optimization and test correction

The double call to CanItemBeReserved was pointless in
the C4/Reserves.pm HoldItem, as CanBookBeReserved calls
CanItemBeReserved and even returns that code.

Additionally, the tests failed, because there were 5
tests not 4.

TEST PLAN
----------
prove t/db_dependent/ILSDI_Services.t
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 19945: ILSDI - Return the reason a reserve is impossible
Alex Arnaud [Wed, 10 Jan 2018 15:31:54 +0000 (15:31 +0000)]
Bug 19945: ILSDI - Return the reason a reserve is impossible

Currently, the ILDSI services HoldTitle and HoldItem always return a
"NotHoldable" code is the reserve is impossible. We need to know why

Test plan:

 - Apply this patch
 - Place a hold on a non reservable title using ILS-DI web service
   (http://koha-opac.example.org/cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1&bib_id=1&request_location=)
 - you should get the reason instead of NotHoldable,
 - Place a hold on a non reservable item using ILS-DI web service
   (http://koha-opac.example.org/cgi-bin/koha/ilsdi.pl?service=HoldItem&patron_id=1&bib_id=1&item_id=1)
 - you should get the reason instead of NotHoldable,

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22066: Record library_id for manual credits
Tomas Cohen Arazi [Mon, 7 Jan 2019 17:06:01 +0000 (14:06 -0300)]
Bug 22066: Record library_id for manual credits

On creating manual credits, the (newly introduced) branchcode should be
set now. This trivial patch makes it work.

To test:
- Create a manual credit for a known patron
- Using MySQL check the result:
  $ sudo mysql
  > SELECT * FROM accountlines WHERE borrowernumber=<known_id>;
=> FAIL: The created accountline row has NULL for the branchcode
- Apply this patch
- Create a manual credit for the patron
- Run:
  > SELECT * FROM accountlines WHERE borrowernumber=<known_id>;
=> SUCCESS: branchcode is set correctly
-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>
5 years agoBug 21241: DBRev 18.12.00.009
Nick Clemens [Mon, 28 Jan 2019 11:45:49 +0000 (11:45 +0000)]
Bug 21241: DBRev 18.12.00.009

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (follow-up) Made SQL change idempotent
Alex Buckley [Mon, 24 Dec 2018 21:38:24 +0000 (21:38 +0000)]
Bug 21241: (follow-up) Made SQL change idempotent

Also added the new pref to sysprefs.sql

Also simplified the conditional statement.

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (follow-up) Code Golf
Martin Renvoize [Wed, 7 Nov 2018 11:35:36 +0000 (11:35 +0000)]
Bug 21241: (follow-up) Code Golf

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: (follow-up) Syspref to control fallback to SMS when no email is defined
Alex Buckley [Wed, 31 Oct 2018 13:52:29 +0000 (13:52 +0000)]
Bug 21241: (follow-up) Syspref to control fallback to SMS when no email is defined

This patch adds a new system preference (FallbackToSMSIfNoEmail)
which if enabled Koha will send suggestion notices by SMS if a borrower
has a defined SMSalertnumber and no email.

The use of the syspref prevents automatic fallback to sending suggestion notices as SMS when there's no defined email.

Test plan:
1. Chose a patron who has no email address set, but does have a
smsalertnumber set (this value is set in the Patron messaging
preferences section after the SMSSendDriver syspref is set)

2. Log into the OPAC with that user and submit a suggestion

3. In the staff client go to Acquisitions->Suggestions and tick the
suggestion and set its status to 'Accepted'

4. In the database query the message_queue and notice the
message_transport_type of the message is set to 'email' even though the
patron has no email address set.

5. Apply patches, restart memcached and plack

6. Check the 'FallbackToSMSIfNoEmail' syspref
is disabled

7. Repeat steps 2,3 and observe in the message_queue
table the message_transport_type = 'email'

    i.e. If the syspref is disabled then the message is still sent by email
    to borrowers with defined smsalertnumber and no email address

8. Enable the 'FallbackToSMSIfNoEmail' syspref
and repeat steps 2,3 and notice the
message_transport_type = 'sms'

    i.e. If the syspref is enabled then the message is sent by sms to
    borrowers with defined smsalertnumber and no email address

9. Repeat steps 2,3 with a patron with an email
address and no smsalertnumber trying with the 'FallbackToSMSIfNoEmail' syspref
enabled and disabled and notice in both cases the
message_transport_type = email.

    i.e. If a borrower has an email address defined the suggestion
    notice will always be sent via email

10. Repeat steps 2,3 with a patron with no email or smsalertnumber trying with the 'FallbackToSMSIfNoEmail' syspref enabled and disabled and notice in both cases the message_transport_type = email

    i.e. If the borrower has no smsalertnumber and no email defined then the
    suggestion notice will be sent by 'email'

11. Run t/db_dependent/Suggestions.t

Sponsored-By: Brimbank Libraries, Australia
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 21241: (follow-up) Renamed system preference

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21241: Conditional to choose appropriate message_transport_type for suggestion...
Alex Buckley [Thu, 16 Aug 2018 14:06:56 +0000 (02:06 +1200)]
Bug 21241: Conditional to choose appropriate message_transport_type for suggestion notices

Introducing a conditional into C4/Suggestions.pm to check if no patron
email exists but a smsalertnumber does exist then the suggestion notice
message_transport_type is set to 'sms', otherwise the suggestion
message_transport_type='email'.

This ensures patrons with no email address still receieve their
suggestion notices because at present the message_transport_type is
hardcoded to 'email'.

Test plan:
1. Chose a patron who has no email address set, but does have a
smsalertnumber set (this value is set in the Patron messaging
preferences section after the SMSSendDriver syspref is set)

2. Log into the OPAC with that user and submit a suggestion

3. In the staff client go to Acquisitions->Suggestions and tick the
suggestion and set its status to 'Accepted'

4. In the database query the message_queue and notice the
message_transport_type of the message is set to 'email' even though the
patron has no email address set.

5. Apply this patch, restart memcached and plack

6. Repeat steps 2,3 with the same patron and query the message_queue
table again and notice this time the message_transport_type = 'sms'

7. Repeat steps 2,3 with a patron with no smsalertnumber or email
address. Query the database and observe the
message_transport_type=email.

If no smsalertnumber is set then the message_transport_type is set to
'email' by default

Sponsored-By: Brimbank Library, Australia
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>
5 years agoBug 22207: course reserves page does not have unique <body> id
Lucas Gass [Fri, 25 Jan 2019 15:37:21 +0000 (15:37 +0000)]
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>
5 years agoBug 21089: Compiled CSS
Nick Clemens [Mon, 28 Jan 2019 11:37:47 +0000 (11:37 +0000)]
Bug 21089: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21089: Overlapping elements in ordering information on acqui/supplier.pl
Owen Leonard [Mon, 7 Jan 2019 13:48:55 +0000 (13:48 +0000)]
Bug 21089: Overlapping elements in ordering information on acqui/supplier.pl

This patch changes the HTML structure of the vendor edit page so that
the markup is a little simpler. CSS is modified to match. This structure
should serve as a model for other similar form structures:

 <fieldset class="rows">
     <ol>
         <li>
             <label>General label:</label>
             <label class="radio">
                 Specific label 1 <input type="radio" />
             </label>
             <label class="radio">
                 Specific label 2 <input type="radio" />
             </label>
         </li>
     </ol>
 </fieldset>

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

 - Go to Acquisitions -> Vendor search -> Vendor -> Edit vendor
 - In the "Ordering information" section, confirm that the position of
   radio buttons looks correct.
 - Confirm that radio button labels work correctly.
 - Confirm that the adjacent dropdown menus work well.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: Make Koha::Hold->suspend reject found holds
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:49:37 +0000 (13:49 -0300)]
Bug 21478: Make Koha::Hold->suspend reject found holds

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: Unit tests
Tomas Cohen Arazi [Fri, 25 Jan 2019 16:48:54 +0000 (13:48 -0300)]
Bug 21478: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21478: Add Koha::Exceptions::Hold
Tomas Cohen Arazi [Fri, 25 Jan 2019 15:48:04 +0000 (12:48 -0300)]
Bug 21478: Add Koha::Exceptions::Hold

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21877: (RM follow-up) Move space into conditional
Nick Clemens [Mon, 28 Jan 2019 11:32:55 +0000 (11:32 +0000)]
Bug 21877: (RM follow-up) Move space into conditional

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21877: Use AuthorisedValues.GetDescriptionByKohaField for notforloan in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:45:02 +0000 (09:45 +0100)]
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>
5 years agoBug 21877: Show authorized value description for withdrawn in checkout
Fridolin Somers [Tue, 22 Jan 2019 08:47:22 +0000 (09:47 +0100)]
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>
5 years agoBug 22203: Holds modal does not link to patorn account
Nick Clemens [Thu, 24 Jan 2019 14:57:46 +0000 (14:57 +0000)]
Bug 22203: Holds modal does not link to patorn account

To test:
1 - Place a hold for a patron
2 - Check the item in at the pickup location
3 - Note the holds modal does not link to patron
4 - Apply patch
5 - Check in item again
6 - Patron name in modal is a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
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>
5 years agoBug 21989: JS error in "Add orders from MARC file" - addorderiso2709.pl
Owen Leonard [Mon, 14 Jan 2019 14:17:23 +0000 (14:17 +0000)]
Bug 21989: JS error in "Add orders from MARC file" - addorderiso2709.pl

This patch undoes the changes to addorderiso2709.tt introduced by Bug
19753. The item information tab can include embedded JavaScript for
cataloging plugins, and these don't currently work with JS in the
footer.

To test, apply the patch and test the JavaScript driven features of the
"Add to basket from a staged file" page:

  - Acquisitions -> Vendor -> Basket -> Add to basket from a staged file
    - MARC and Card previews, select all/clear all
    - Item information tab: Cataloging plugins for fields like date
      acquired, barcode
    - Default accounting details tab: Show inactive control

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>
5 years agoBug 22049: (QA follow-up) update MarkIssueReturned call in process_koc.pl
Josef Moravec [Thu, 3 Jan 2019 10:05:37 +0000 (10:05 +0000)]
Bug 22049: (QA follow-up) update MarkIssueReturned call in process_koc.pl

Test plan:
Try to upload koc file with some returns
Success: the file should be correctly processed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22049: (follow-up) Remove leftover variable
Tomas Cohen Arazi [Mon, 31 Dec 2018 11:28:03 +0000 (08:28 -0300)]
Bug 22049: (follow-up) Remove leftover variable

The $circControlBranch variable was originally set to be used to pick
the right dropbox branch. It was only used in MarkIssueReturned, to get
the right Koha::Calendar object. As this responsability was moved top to
the AddReturn caller, and the fact that _GetCircControlBranch is
actually used for fines rules, there's no use for it in this context.
And it was left on the previous patch as a mistake.

To test:
- Make sure the variable is not actually used:
  $ git grep '$circControlBranch'
=> SUCCESS: removed variable is not actually used.
- Sign off :-D

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>
5 years agoBug 22049: Add tests
Tomas Cohen Arazi [Fri, 28 Dec 2018 18:23:38 +0000 (15:23 -0300)]
Bug 22049: Add tests

The current tests only check some failure use cases. This patch makes it cover more use cases

To test:
- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests pass!

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>
5 years agoBug 22049: Make MarkIssueReturned rely on returndate only
Tomas Cohen Arazi [Fri, 28 Dec 2018 17:39:07 +0000 (14:39 -0300)]
Bug 22049: Make MarkIssueReturned rely on returndate only

This patch changes the params accepted by
C4::Circulation::MarkIssueReturned by removing the $dropbox_branch
param.

This passed branchcode was only used to initialize the Koha::Calendar
object, but the date arithmetic has already taken place in a couple
places before we reach this point. This logic needs to be simplified
(bug 14591), and this is the starting point.

To test:
- Apply this patch
- Run:
  $ git grep MarkIssueReturned
=> SUCCESS: Check all the uses of the function either originally passed
undef, or now pass the same date that would've been calculated anyway,
in the returndate param.
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation/MarkIssueReturned.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 22051: Make Koha::Object->store translate incorrect value exceptions
Tomas Cohen Arazi [Fri, 28 Dec 2018 15:15:53 +0000 (12:15 -0300)]
Bug 22051: Make Koha::Object->store translate incorrect value exceptions

This patch adds a new condition to Koha::Object->store so it catches
incorrect value-related DBIC exceptions.

This DBIC exceptions get now translated into
Koha::Exceptions::Object::BadValue exceptions with relevant parameters
passed.

To test:
- Apply the exception and unit tests patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Object.t
=> FAIL: Tests fail because this exception handling code is not
implemented
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 22051: Unit tests
Tomas Cohen Arazi [Fri, 28 Dec 2018 15:15:36 +0000 (12:15 -0300)]
Bug 22051: Unit tests

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>
5 years agoBug 22051: Add Koha::Exceptions::Object::WrongValue
Tomas Cohen Arazi [Fri, 28 Dec 2018 14:33:13 +0000 (11:33 -0300)]
Bug 22051: Add Koha::Exceptions::Object::WrongValue

This patch adds a new exception to be thrown in Koha::Object->store when
a DBIC exception is thrown regarding bad data format.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 21002: Add ->add_debit method to Koha::Account
Martin Renvoize [Wed, 12 Dec 2018 08:54:01 +0000 (08:54 +0000)]
Bug 21002: Add ->add_debit method to Koha::Account

Sponsored-by: PTFS Europe
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21002: Add tests for Koha::Account::add_debit
Martin Renvoize [Wed, 12 Dec 2018 08:53:37 +0000 (08:53 +0000)]
Bug 21002: Add tests for Koha::Account::add_debit

Sponsored-by: PTFS Europe
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21993: Display a user-friendly message when the CSRF token is wrong
Jonathan Druart [Wed, 12 Dec 2018 17:59:54 +0000 (14:59 -0300)]
Bug 21993: Display a user-friendly message when the CSRF token is wrong

Instead of dying!

Test plan:
Assuming you have a patron with borrowernumber=51 and another one that
can be deleted with borrowernumber=42

- authorities-home.pl
 * Delete an authority record
 * hit /cgi-bin/koha/authorities/authorities-home.pl?op=delete

- basket/sendbasket.pl
 * Send a basket to someone
 * hit /cgi-bin/koha/basket/sendbasket.pl?email_add=1

- members/apikeys.pl
  * Generate and delete an API key for a patron
  * hit /cgi-bin/koha/members/apikeys.pl?patron_id=51&op=delete

- members/deletemem.pl
  * Delete a patron
  * hit /cgi-bin/koha/members/deletemem.pl?member=42&op=delete_confirmed

- members/mancredit.pl
  * Add a manual credit
  * hit /cgi-bin/koha/members/mancredit.pl?borrowernumber=51&add=1

- members/maninvoice.pl
  * Add a manual invoice
  * hit /cgi-bin/koha/members/maninvoice.pl?borrowernumber=51&add=1

- members/member-flags.pl
  * Change permissions for a patron
  * hit /cgi-bin/koha/members/member-flags.pl?member=51&newflags=1

- members/member-password.pl
  * Change the password for a patron (from the staff interface)
  * hit /cgi-bin/koha/members/member-password.pl?member=51&newpassword=aA1

- members/memberentry.pl
  * Edit some patron's info
  * hit /cgi-bin/koha/members/memberentry.pl?borrowernumber=51&op=save

- members/paycollect.pl
  * Pay an individual fine
  * hit something like /cgi-bin/koha/members/paycollect.pl?borrowernumber=51&pay_individual=1&accounttype=L&amount=1.00&amountoutstanding=1.00&accountlines_id=157&paid=1
  You may need to edit some values

- tools/import_borrowers.pl
  * Import some patrons
  * hit /cgi-bin/koha/tools/import_borrowers.pl?uploadborrowers=1

- tools/picture-upload.pl
  * Upload an image for a patron
  * You will need to edit the html content
  hit Home › Tools › Upload patron images
  then locate the csrf_token input and modify its value

Note for QA:
- Opac is not done as blocking_errors.inc does not exist for this
interface
- ill/ill-requests.pl
I did not manage to replace this occurrence

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21965: Update two-column templates with Bootstrap grid: Patrons part 3
Owen Leonard [Wed, 2 May 2018 18:13:33 +0000 (18:13 +0000)]
Bug 21965: Update two-column templates with Bootstrap grid: Patrons part 3

This patch modifies several patron templates to use the Bootstrap grid
instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

Markup has been corrected in paycollect.tt and readingrec.tt where a
table row lacked <tr>.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Patron -> Notices
 - Patron -> Purchase suggestions
 - Patron -> Circulation history
 - Patron -> Routing lists
 - Patron -> Statistics
 - Patron -> Fines
   -> Pay

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21438: Update two-column templates with Bootstrap grid: Patron card creator
Owen Leonard [Wed, 2 May 2018 18:33:04 +0000 (18:33 +0000)]
Bug 21438: Update two-column templates with Bootstrap grid: Patron card creator

This patch modifies the patron card creator templates to use the
Bootstrap grid instead of YUI.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> patron card creator
   - Manage -> Card batches
     - Edit card batch
   - Manage -> Layouts
     - Edit layout
   - Manage -> Images
   - Manage -> Card templates
     - Edit template
   - Manage -> Printer profiles
     - Edit profile

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21792: Switch two-column templates to Bootstrap grid: Serials part 3
Owen Leonard [Thu, 8 Nov 2018 17:10:00 +0000 (17:10 +0000)]
Bug 21792: Switch two-column templates to Bootstrap grid: Serials part 3

This patch modifies several serials templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and go to Serials.

 - Add or edit a new subscription. The "create an item..." and "do not
   create an item..." labels should look correct.
 - Search for subscriptions
   - Select two or more subscriptions to batch edit.
     - The subscription batch edit page should look correct and adjust
       well to various browser widths.
   - View a subscription and click the "Renew" button. The subscription
     renewal pop-up window should look correct.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21992: Remove unused Koha::Patron->update_password method
Tomas Cohen Arazi [Wed, 26 Dec 2018 16:22:55 +0000 (13:22 -0300)]
Bug 21992: Remove unused Koha::Patron->update_password method

This patch removes the no longer used method.

To test:
- Apply this patch
- Run:
  $ git grep update_password
=> SUCCESS: Only references are in Auth_with_ldap.pm and not related
- Sign off :-D

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>
5 years agoBug 22048: Use set_password in Auth_with_ldap.pm
Tomas Cohen Arazi [Wed, 26 Dec 2018 16:19:05 +0000 (13:19 -0300)]
Bug 22048: Use set_password in Auth_with_ldap.pm

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>
5 years agoBug 22048: Use set_password in tests
Tomas Cohen Arazi [Wed, 26 Dec 2018 13:59:55 +0000 (10:59 -0300)]
Bug 22048: Use set_password in tests

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Auth.t \
          t/db_dependent/Koha/Patrons.t \
          t/db_dependent/Search/History.t \
          t/db_dependent/selenium/authentication.t \
          t/db_dependent/selenium/regressions.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 22048: Use set_password opac/opac-password-recovery.pl
Tomas Cohen Arazi [Thu, 13 Dec 2018 15:56:42 +0000 (12:56 -0300)]
Bug 22048: Use set_password opac/opac-password-recovery.pl

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>
5 years agoBug 22048: Use set_password in create_superlibrarian.pl
Tomas Cohen Arazi [Thu, 13 Dec 2018 15:34:20 +0000 (12:34 -0300)]
Bug 22048: Use set_password in create_superlibrarian.pl

Use $patron->set_password instead of update_password. In this case the
'skip_validation' param needs to be set as no password strength checks
are expected.

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>
5 years agoBug 22048: Use set_password in memberentry.pl
Tomas Cohen Arazi [Thu, 13 Dec 2018 15:21:02 +0000 (12:21 -0300)]
Bug 22048: Use set_password in memberentry.pl

To test:
- Verify that changing the password and userid of a patron by globally
editing they works,

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>
5 years agoBug 22048: Use set_password in member-password.pl
Tomas Cohen Arazi [Wed, 12 Dec 2018 17:43:36 +0000 (14:43 -0300)]
Bug 22048: Use set_password in member-password.pl

This patch makes member-password.pl use $patron->set_password instead of
update_password. The side effect is that setting password and userid
become separate steps in the code.

For the password all the initial checks are the same, but password
strength is checked on calling set_password and an exception is thrown.
So instead of checking the password quality, we just wait for exceptions
and behave the same as before.

Bonus: you will notice I reused the initially fetched $patron object.
Things get simpler :-D

To test:
- Verify that changing the password / userid for a patron works as usual

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>
5 years agoBug 22048: Use set_password in onboarding.pl
Tomas Cohen Arazi [Wed, 12 Dec 2018 16:40:54 +0000 (13:40 -0300)]
Bug 22048: Use set_password in onboarding.pl

To test, verify the onboarding process sets the password correctly.

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>
5 years agoBug 21826: Remove strict and warning from Heading.pm
Ere Maijala [Thu, 22 Nov 2018 09:25:20 +0000 (11:25 +0200)]
Bug 21826: Remove strict and warning from Heading.pm

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21826: Move Heading tests to db_dependent since they require database connection
Ere Maijala [Thu, 22 Nov 2018 09:23:57 +0000 (11:23 +0200)]
Bug 21826: Move Heading tests to db_dependent since they require database connection

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21826: Add tests
Ere Maijala [Mon, 19 Nov 2018 12:26:00 +0000 (14:26 +0200)]
Bug 21826: Add tests

Adds tests for new Heading::valid_bib_heading_subfield and ModBiblio with auto-created authorities.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21826: (QA follow-up) Add UNIMARC support
Martin Renvoize [Tue, 13 Nov 2018 16:02:40 +0000 (16:02 +0000)]
Bug 21826: (QA follow-up) Add UNIMARC support

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21826: Use subfield map in LinkBibHeadingsToAuthorities
Ere Maijala [Tue, 13 Nov 2018 16:43:50 +0000 (16:43 +0000)]
Bug 21826: Use subfield map in LinkBibHeadingsToAuthorities

Use only allowable subfields when creating authorities from
bibliographic records.

Sponsored-by: National Library of Finland
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22047: Fix opac/opac-passwd.pl call
Tomas Cohen Arazi [Wed, 26 Dec 2018 15:42:28 +0000 (12:42 -0300)]
Bug 22047: Fix opac/opac-passwd.pl call

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>
5 years agoBug 22047: Add 'skip_validation' param to Koha::Patron->set_password
Tomas Cohen Arazi [Wed, 26 Dec 2018 15:37:07 +0000 (12:37 -0300)]
Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password

This patch makes Koha::Patron->set_password expect a hashref as param
and adds support for an 'skip_validation' param to be passed. Its purpose is to
make the method skip the relevant password strength checks if required.

It targets the Auth_with_ldap.pm usage when the 'update_password' flag
is set in the configuration.

The tests on this bug cover this use case so, to test:

- Apply the tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> FAIL: Tests fail, code doesn't work as expected
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass! Yay!
- Sign off :-D

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>
5 years agoBug 22047: Unit tests
Tomas Cohen Arazi [Wed, 26 Dec 2018 15:37:00 +0000 (12:37 -0300)]
Bug 22047: Unit 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>
5 years agoBug 21672: Switch templates to Bootstrap grid: Various
Owen Leonard [Thu, 25 Oct 2018 19:02:31 +0000 (19:02 +0000)]
Bug 21672: Switch templates to Bootstrap grid: Various

This patch modifies various templates to add or improve coverage of the
Bootstrap grid.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Administration -> Item circulation alerts
 - Authorities -> Authorities search -> Merge records
 - Catalog -> Bibliographic details -> Rota (StockRotation must be
   enabled)
 - Tools -> News: Main and add/edit view

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22111: Format amount shown on place holds when maxoutstanding is reached (staff)
Katrin Fischer [Sat, 5 Jan 2019 03:50:36 +0000 (03:50 +0000)]
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>
5 years agoBug 22113: Add price formatting on item lost report
Katrin Fischer [Sat, 5 Jan 2019 05:41:48 +0000 (05:41 +0000)]
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>
5 years agoBug 21855: Changed "deprecated delete_unverified_opac_registrations.pl cronjob" to...
Olivia Lu [Wed, 16 Jan 2019 03:54:25 +0000 (03:54 +0000)]
Bug 21855: Changed "deprecated delete_unverified_opac_registrations.pl cronjob" to "cleanup_database"

To Find Fix:

1. Go to Koha Administration
2. Search PatronSelfRegistrationVerifyByEmail
3. Verify that NOTE now says "system preference requires the
cleanup_database ..."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 18909: Enable the maximum zebra records size to be specified per instance
Kyle M Hall [Tue, 6 Mar 2018 18:29:22 +0000 (13:29 -0500)]
Bug 18909: Enable the maximum zebra records size to be specified per instance

The default for Zebra is to not return results where the record size is
greater than 1045 KB ( 1 MB ). Some libraries need to increase this
ceiling, but it may come at a cost with z39.50 compatibility with other
services. For that reason, we should make this setting configurable on a
per-instance basis.

Test plan for kohadevbox:
1) Apply this patch
2) Run:
   $ reset_all
3) Restart Zebra:
   $ sudo koha-zebra --restart kohadev
4) Check how zebrasrv was called:
   $ ps waux | grep zebrasrv
=> SUCCESS: Looks like
 ... /usr/bin/zebrasrv -v none,fatal,warn -k 1024
5) Edit /etc/koha/sites/kohadev/koha-conf.xml, add:
   <zebra_max_record_size>2048</zebra_max_record_size>
6) Repeat (3) and (4)
=> SUCCESS: Looks like
 ... /usr/bin/zebrasrv -v none,fatal,warn -k 2048
7) Sign off :-D

General test plan:
1) Apply this patch
2) Build a Debian package
3) Specify a zebra_max_record_size of 2048 in your koha_conf.xml
4) Restart zebra
5) Index a record greater than 1 MB but smaller than 2 MB
6) Note that it is searchable!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22118: Format hold fee when placing holds in OPAC
Katrin Fischer [Sat, 12 Jan 2019 08:21:38 +0000 (09:21 +0100)]
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>
5 years agoBug 11922: Add SHOW_BCODE patron attribute for Norwegian web installer
Jasmine Amohia [Thu, 17 Jan 2019 02:32:08 +0000 (02:32 +0000)]
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>
5 years agoBug 19920: Removed unnecessary code from C4/Members.pm
Jasmine Amohia [Wed, 16 Jan 2019 02:11:42 +0000 (02:11 +0000)]
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>
5 years agoBug 20491: Updating the MARC subfield desciption of 952q
helene hickey [Wed, 16 Jan 2019 22:06:15 +0000 (22:06 +0000)]
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>
5 years agoBug 7403: Shorten CataloguingLog preference description
helene hickey [Wed, 16 Jan 2019 02:16:26 +0000 (02:16 +0000)]
Bug 7403: Shorten CataloguingLog preference description

To test:

1) Look at value of CataloguingLog prefernce
2) Apply the patch and the value should change
3) Verify that the warning has been removed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: (QA follow-up) Remove unused variable
Kyle M Hall [Tue, 22 Jan 2019 18:54:59 +0000 (13:54 -0500)]
Bug 7614: (QA follow-up) Remove unused variable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: (QA follow-up) Tidy code to remove tab characters
Kyle M Hall [Tue, 22 Jan 2019 18:50:39 +0000 (13:50 -0500)]
Bug 7614: (QA follow-up) Tidy code to remove tab characters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: (QA follow-up) Fix POD merge missed in rebase
Kyle M Hall [Tue, 22 Jan 2019 18:49:13 +0000 (13:49 -0500)]
Bug 7614: (QA follow-up) Fix POD merge missed in rebase

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: Don't allow un-usable pickup locations in the opac pickup locations pulldown
Kyle M Hall [Mon, 20 Aug 2018 14:48:07 +0000 (10:48 -0400)]
Bug 7614: Don't allow un-usable pickup locations in the opac pickup locations pulldown

Also fully qualifies some subroutine calls that fail for reasons unkown.

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: (follow-up) If patron's home library is not a pickup library, let them...
Lari Taskula [Thu, 21 Dec 2017 14:55:58 +0000 (16:55 +0200)]
Bug 7614: (follow-up) If patron's home library is not a pickup library, let them choose another one

This patch fixes an issue where patron is not allowed to place a hold in OPAC
while their home library is not a pickup library.

Instead, they should be presented with a list of other available pickup locations.

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: Fix my variable earlier declaration bug.
Olli-Antti Kivilahti [Thu, 9 Mar 2017 11:06:20 +0000 (13:06 +0200)]
Bug 7614: Fix my variable earlier declaration bug.

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: Build a list of pickup locations in OPAC considering transfer limits
Lari Taskula [Fri, 10 Feb 2017 15:10:49 +0000 (17:10 +0200)]
Bug 7614: Build a list of pickup locations in OPAC considering transfer limits

This patch enables the checks for transfer limits for given biblionumber in
OPAC when patron proceeds to place a hold. In case none of the items of that
biblio can be transferred to a library, that library will not be included in
the list of pickup locations.

To test:
1. Make sure you meet the following requirements:
   1.1: You are able to make holds in OPAC
   1.2: System preference UseBranchTransferLimits set to "Enforce"
   1.3: System preference BranchTransferLimitsType set to "item type"
        (for the sake of simplicity of this test plan, but you may also
         set it to "collection code" and deal with ccodes instead)
   1.4: System preference item-level_itypes set to "specific item"
   1.5: You have the default libraries and item types, otherwise replace
        the branchcodes and itemtypes in this test plan with your own
2. Make sure 'Fairfield' in cgi-bin/koha/admin/branches.pl has not disabled
   its ability to act as a "Pickup location"
3. Have a biblio with exactly one item of item-level itemtype 'BK'
4. Set item holdingbranch as 'CPL'
5. Go to cgi-bin/koha/admin/branch_transfer_limits.pl (keep this page open in
   a second tab for faster testing)
6. Select library 'Centerville'
7. Uncheck the checkbox 'FFL - Fairfield' and click Save
8. Go to OPAC and find your biblio, and start placing a hold on it
9. Click at the list of "Pick up location"s.
10. Observe that it is missing 'Fairfield'
11. Go back to cgi-bin/koha/admin/branch_transfer_limits.pl
12. Repeat step 6 and this time, check the checkbox 'FFL - Fairfield'
13. Refresh the page you arrived at step 8
14. Observe that it now includes 'Fairfield'

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: Consider transfer limits in Koha::Template::Plugin::Branches
Kyle M Hall [Wed, 15 Aug 2018 18:27:45 +0000 (14:27 -0400)]
Bug 7614: Consider transfer limits in Koha::Template::Plugin::Branches

Consider transfer limits in Koha::Template::Plugin::Branches->pickup_locations.

This patch modified the mentioned method to consider branch transfer limits and
does not include any library in the returned list of libraries in case a branch
transfer limit applies for a given book or item.

To be tested in following patches.

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: Check transfer limit in CanBookBeReserved and CanItemBeReserved
Lari Taskula [Tue, 7 Feb 2017 15:51:18 +0000 (17:51 +0200)]
Bug 7614: Check transfer limit in CanBookBeReserved and CanItemBeReserved

This patch adds $branchcode_to parameter to CanBookBeReserved and
CanItemBeReserved. It represents the pickup location for the hold. This patch
checks if the library is configured to be a pickup location (see Bug 7534), and
also if the item can be transferred into the given library (see Bug 18072).

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

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 7614: Add a new method Koha::Libraries->pickup_locations
Lari Taskula [Thu, 9 Feb 2017 17:21:32 +0000 (19:21 +0200)]
Bug 7614: Add a new method Koha::Libraries->pickup_locations

This patch adds a new method, Koha::Libraries->pickup_locations. This method
takes either an item or a biblio as a parameter, and returns the list of
acceptable pickup locations by considering libraries' configuration to act
as a pickup location as well as any branch transfer limits that may apply.

To test:
1. prove t/db_dependent/Koha/Libraries.t

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: (QA follow-up) Remove type from script tags
Nick Clemens [Wed, 23 Jan 2019 14:14:05 +0000 (14:14 +0000)]
Bug 17047: (QA follow-up) Remove type from script tags

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: DBRev 18.12.00.008
Nick Clemens [Wed, 23 Jan 2019 13:55:13 +0000 (13:55 +0000)]
Bug 17047: DBRev 18.12.00.008

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: Compiled CSS
Nick Clemens [Wed, 23 Jan 2019 13:27:48 +0000 (13:27 +0000)]
Bug 17047: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: Schema changes
Nick Clemens [Wed, 23 Jan 2019 13:10:39 +0000 (13:10 +0000)]
Bug 17047: Schema changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: Add a third option for Mana system preference
Alex Arnaud [Wed, 23 Jan 2019 09:20:06 +0000 (10:20 +0100)]
Bug 17047: Add a third option for Mana system preference

This adds the "No, let me think about it" option.
It is the default option. If the Mana system preference
is set to "No, let me think about it", the user is warned
on the admin home page that he has not decided yet to use
or not Mana knowlegde base.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: add a dedicated page for Mana setup
Alex Arnaud [Thu, 27 Sep 2018 13:15:50 +0000 (13:15 +0000)]
Bug 17047: add a dedicated page for Mana setup

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: SQL reports management with Mana-KB
Baptiste Wojtkowski [Wed, 8 Mar 2017 15:46:24 +0000 (15:46 +0000)]
Bug 17047: SQL reports management with Mana-KB

Includes:

* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments

* SytemPreferences:
Mana Activation:
    - add a value "no, let me think about it", that is the default value.
    - as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
    - Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)

* Interface :
    - On mana-search, rows are now sorted by date of last import, then by number of users
    - Windows redesigned to improve the user experience

* New Feature : report a mistake.
    - people can now report an invalid data (wrong, obsolete,...)
    - if a data is reported as invalid many time, it will appear differently
    - Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
    - When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists

* API (svc/mana)
    - add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
    - no hardcoding for resources in the code of api (api needs to be called with a ressourcename)

* New feature : SQL report sharing
    - Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
    - New feature: share reports with Mana-KB
    - New feature: search report in Mana-KB with keywords
    - New feature: load reports from Mana-KB

Test plan:
    1 - Apply Patch + update database
    2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
        <!-- URL of the mana KB server -->
        <!-- alternative value http://mana-test.koha-community.org to query the test server -->
        <mana_config>https://mana-kb.koha-community.org</mana_config>
    3 - Check Mana syspref and AutoShareWithMana syspref are not activated
    4 - Search the syspref ManaToken and follow the instructions
    5 - subscriptions
      - Try create a new subscription for a first serial  => Mana-KB shouldn't show you anything (except if the base hase been filled)
      - Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
      - Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
      - Activate AutoShareWithMana => Subscriptions
      - Create a new subscription for a second serial
      - There shouldn't be any Share button
      - Create a second subscription => the message should appear, click again on use

    6 - SQL Report
      - Create a new SQL report, without notes.
      - On the table with all report (reports > use saved), there should be the action "Share"
      - If you click on share, you have an error message
      - Create a new report, with a title and notes longer than 20 characters
      - You  can share it with mana => you will have a success message
      - On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of  the report you shared, it should appear. You can use it, it will load it into your report list.

    7 - Report mistakes.
      - On any table containing Mana-KB search results, you can report a mistake and add a comment.

    8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: subscriptions management with Mana-KB
morgane alonso [Thu, 25 Aug 2016 08:22:50 +0000 (08:22 +0000)]
Bug 17047: subscriptions management with Mana-KB

- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB

- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB

- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 17047: add Mana-KB syspref
morgane alonso [Thu, 25 Aug 2016 08:12:16 +0000 (08:12 +0000)]
Bug 17047: add Mana-KB syspref

Add the system preference to enable or disable Mana-KB webservice on koha.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20274: Itemtypes report gives zero results if item-level_itypes set to bibliograp...
helene hickey [Tue, 15 Jan 2019 23:07:34 +0000 (23:07 +0000)]
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>
5 years agoBug 22122: Rearranged inputs from a patrons basket in Acquisitions.
Ethan Amohia [Wed, 16 Jan 2019 03:26:36 +0000 (03:26 +0000)]
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>
5 years agoBug 22101: Ill Requests missing in menu on advanced search page
Owen Leonard [Fri, 11 Jan 2019 16:27:17 +0000 (16:27 +0000)]
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>
5 years agoBug 22125: branches.pickup_location should be flagged as boolean
Tomas Cohen Arazi [Mon, 14 Jan 2019 11:04:51 +0000 (08:04 -0300)]
Bug 22125: branches.pickup_location should be flagged as boolean

This trivial patch just marks the mentioned column as a boolean.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
https://bugs.koha-community.org/show_bug.cgi?id=16497

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21192: Do not pick SelfRegistration hidden fields for SelfModification
Jonathan Druart [Mon, 13 Aug 2018 15:55:55 +0000 (12:55 -0300)]
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>
5 years agoBug 21170: Remove "isn't numeric in numeric eq (==)" warnings in MARCdetail
Jonathan Druart [Mon, 17 Dec 2018 15:55:34 +0000 (12:55 -0300)]
Bug 21170: Remove "isn't numeric in numeric eq (==)" warnings in MARCdetail

Easily removed switching the two conditions.

Test plan:
Hit catalogue/MARCdetail.pl?biblionumber=1
=> Without this patch you will see in the log warnings like
  Argument "ddc" isn't numeric in numeric eq (==) at /home/vagrant/kohaclone/catalogue/MARCdetail.pl line 277.
=> With this patch applied the warnings do no longer appear

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22006: Handle undefined itemnumber for Koha::Account::Line->item
Jonathan Druart [Fri, 14 Dec 2018 19:15:24 +0000 (16:15 -0300)]
Bug 22006: Handle undefined itemnumber for Koha::Account::Line->item

If there is no item linked to an account line, the ->item method should return undef.
Without this patch it explodes with:
Carp::croak('DBIC result _type  isn\'t of the _type Item') called at /home/vagrant/kohaclone/Koha/Object.pm line 102

Exists since the introduction of this method by bug 12001

Reported on bug 19489 comment 18.

Test plan:
  prove t/db_dependent/Koha/Account/Lines.t
must return green

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22006: Add tests
Jonathan Druart [Fri, 14 Dec 2018 19:14:42 +0000 (16:14 -0300)]
Bug 22006: Add tests

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>