koha.git
5 years agoBug 22501: (QA follow-up) use $raw for the note in the intranet
Liz Rea [Tue, 9 Apr 2019 17:56:43 +0000 (17:56 +0000)]
Bug 22501: (QA follow-up) use $raw for the note in the intranet

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8c7bc8946b4d100da841916b4fe5fa12c2505fb5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22501: OPAC course reserves notes should allow html links
Lucas Gass [Tue, 26 Mar 2019 17:41:36 +0000 (17:41 +0000)]
Bug 22501: OPAC course reserves notes should allow html links

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 79f1008c7ed97117c248c6aead8742bc64dd0353)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22642: Corrections to updatedatebase for bug 12395
Martin Renvoize [Mon, 8 Apr 2019 17:04:14 +0000 (18:04 +0100)]
Bug 22642: Corrections to updatedatebase for bug 12395

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8b3f1cb151787d742886a328225ceb07d202f2f5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19497: Removed title (tooltip) from Edit button in items_search_fields.tt
Hayley Mapley [Thu, 14 Mar 2019 04:14:57 +0000 (04:14 +0000)]
Bug 19497: Removed title (tooltip) from Edit button in items_search_fields.tt

This patch removes the tooltip that appears when hovering over the Edit button
of Item Search Fields in the staff client. This was done for consistency reasons,
including that this tooltip is not translated and tooltips do not appear to be
on the majority of buttons in the staff client.

Test plan:
1) In Home->Administration->Item search fields create a new search field
if you haven't got any already
2) Observe the tooltip that appears when hovering over the Edit button in
the Item serach fields table.
3) Apply the patch and observe that the tool tip no longer appears.

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 968c888e1579ab28ec165819a011612d8b8f5570)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19670: DBRev 18.11.05.002
Nick Clemens [Thu, 11 Apr 2019 13:39:10 +0000 (13:39 +0000)]
Bug 19670: DBRev 18.11.05.002

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f7869ad48b8f2f86f2b912aad1c3dcbd1a5679c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19670: Change Collation of marc_field to allow mixed case mappings
Ere Maijala [Thu, 14 Mar 2019 12:33:18 +0000 (14:33 +0200)]
Bug 19670: Change Collation of marc_field to allow mixed case mappings

Test plan:
1. Apply patch and update database
2. Verify that you can add a search field mapping for both 100a and 100A.
3. Verify that the above also works with a newly-created database.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a5f3d405f56202beb4426da52f3bf4019f26484b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22444: currencies_manage permission doesn't provide link to manage currencies...
Owen Leonard [Wed, 6 Mar 2019 19:02:50 +0000 (19:02 +0000)]
Bug 22444: currencies_manage permission doesn't provide link to manage currencies when selected alone

This patch modifies the acquisitions sidebar menu so that it checks
properly for the currencies_manage permission.

This patch also removes the menu link directly to the administration
home page. Since we're removing the check on the general
"CAN_user_parameters" permission it doesn't make sense to assume the
page is accessible.

To test, apply the patch and modifiy a staff user so that they have no
"parameters" permissions but do have "currencies_manage" permission.

Go to the Acquisitions home page. There should be a link to currencies
management in the sidebar menu.

Perform the same test with a user who has "parameters" permissions but
not "currencies_manage" permission. There should be no link to
currencies in the acquisitions sidebar menu. The user should have access
to the administrative home page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 761b410f99cbbfff8e353c538fde2b6816408795)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21263: Pickup library not set correctly when using Default holds policy
Maryse Simard [Thu, 7 Feb 2019 13:24:03 +0000 (08:24 -0500)]
Bug 21263: Pickup library not set correctly when using Default holds policy

In the case of a specific item hold, it can only be fulfilled if the pickup library
matches the hold fulfillment policy. Therefore, if OPACAllowUserToChooseBranch is
set to don't allow, the pickup library should correspond to the policy.

In case of hold that does not specify an item, the homebranch or holdingbranch
can't be determined at this time, so the pickup library still defaults to the
homebranch of the borrower. Same if there is no policy or it states 'any'.

To test:
- Make sure OPACAllowUserToChooseBranch is set to don't allow
- Make sure you have two branches A and B
- Have one item whose homebranch is B
- Have one user whose homebranch is A
- Make sure the circulation rules allow the user to reserve the item's item type

1. Go to Administration > Circulation and fines rules
2. Create a Default holds policy by item type for that item type
    - Item type = item's item type
    - Hold policy = From any library
    - Hold pickup library match = item's home library
    - Return policy = item returns home
3. Go to the OPAC and log in with the user's credentials
4. Search for the item
5. Click on "Place hold"
6. Select a specific item and confirm hold
7. In the user's file on the OPAC and check the reservation's pickup library. It should be the item's homebranch

You can then repeat the steps for 'item's holding library' or 'any library' as
the Hold pickup library match. It should also work the same way if there is no
'Default holds policy by item type' for this item type but a 'Default checkout,
hold and return policy' set.

Finally, check that placing a hold without selecting a specific item still
defaults the pickup library to the borrower's homebranch.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 275dee5f9b9a26b3490bf3646c71c78a2d8647eb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22121: Display 'Price paid' on ILL requests according to CurrencyFormat pref
Martin Renvoize [Mon, 15 Apr 2019 17:55:21 +0000 (18:55 +0100)]
Bug 22121: Display 'Price paid' on ILL requests according to CurrencyFormat pref

To test:
- Install BLDSS backend
  see: https://wiki.koha-community.org/wiki/ILL_backends
  - Add a new BLDSS ILL request
  - Edit ILL request
  - Fill in Price paid field
  - Verify Price paid is formatted correctly on 'Manage ILL request'
    page

Signed-off-by: Ethan Amohia <ethan.amohia@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(reimplimentation of commit 1493c42e7bae5bffab430072587b7aa0527f6fc7 for 18.11.x series)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22472: Make column_exists early return if the table does not exist
Jonathan Druart [Thu, 7 Mar 2019 12:14:25 +0000 (09:14 -0300)]
Bug 22472: Make column_exists early return if the table does not exist

On the way we move TableExists to C4::Installer, where it belongs to.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7208ac6196a8619dbb0cca3b6f01480f4c46cab1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22472: Add tests
Jonathan Druart [Thu, 7 Mar 2019 12:14:06 +0000 (09:14 -0300)]
Bug 22472: Add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 19b9aacfbae616f7198cd93ebdbd97115d204c5b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21659: Change link to basket group edit page
Katrin Fischer [Thu, 4 Apr 2019 00:56:43 +0000 (00:56 +0000)]
Bug 21659: Change link to basket group edit page

I have taken another look at other links like the one
from acq order search and changed the link to not lead
to the vendor's basket group page but to the edit page
of the invidividual basket group.

To test:
- Same as first patch, verify links now lead
  to the basket grou edit page

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

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9cbc5f2aa072ec41a70fd1fa1de4f684fcd695e9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21659: Fix links to basket groups from order receive page
Katrin Fischer [Mon, 11 Mar 2019 16:24:16 +0000 (16:24 +0000)]
Bug 21659: Fix links to basket groups from order receive page

Fixes a problem with the template variables on the order
receive page, so that the links to basket groups work
correctly again.

To test:
- Create some orders with and without basket groups
- Receive shipment
- Verify that the basket group links for pending orders work right
- Receive an order line
- Verify that the basket group links for received orders work right

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3db5feb900d3e6a6400767c771afe78bab0fa880)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22634: Standardize table creation for stockrotation* tables in kohastructure.sql
Katrin Fischer [Wed, 3 Apr 2019 20:35:38 +0000 (22:35 +0200)]
Bug 22634: Standardize table creation for stockrotation* tables in kohastructure.sql

The existing pattern is:
DROP TABLE IF EXISTS ...
CRATE TABLE

Stockrotation was using:
CREATE TABLE IF NOT EXISTS ...
which would not recreate the table in a database it's already
existing in possibly causing mismatches in table structure.

To test:
- Drop your database
- Run through the web installer
- Make sure there are no Database/SQL errors
- Makse sure the 4 stockrotation tables have been created

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fbdb2b2be009140be6f9b5b84c765741bc828a3c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22624: Show OPAC description for authorised values in OPAC
Katrin Fischer [Mon, 1 Apr 2019 19:15:18 +0000 (19:15 +0000)]
Bug 22624: Show OPAC description for authorised values in OPAC

Patch adds the IS_OPAC parameter to a few GetByCode calls in
OPAC files.

To test:
- Add different OPAC and intranet descriptions to some authorised
  value categories:
  - TERM
  - DEPARTMENT
  - LOC
  - CCODE
- Create a new course using the values and adding items to it
- Check the course reserves overview and detail pages in OPAC
- Verify Department, term, location, and collection show
  the OPAC description if existing
- Create a subscription, make sure a default location is selected
- Check the OPAC detail page, subscription tab for this subsription
  in the OPAC
- Verify the location of the subscription displays correctly

Signed-off-by: Mikaël Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3323a428eaf662a0ba1a31b2cb56002a7372461a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13629: SingleBranchMode removes both library and availability search from advance...
Owen Leonard [Thu, 4 Apr 2019 18:27:28 +0000 (18:27 +0000)]
Bug 13629: SingleBranchMode removes both library and availability search from advanced search

This patch modifies the OPAC advanced search form so that it is possible
to limit searches to available items even if there is only one library.

To test, apply the patch and go to the advanced search page in the OPAC.

 - With only one library configured: There should be a section labeled
   "Availability" with just the "only available" checkbox.

 - With multiple libraries: The section should be labeled "Location and
   availability" and should have the library dropdown and the
   availability checkbox.

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 7acb5394e1f62728c90a1d18e988c23a3e2862d2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14358: Changing the module refreshes the page and resets library choice
Owen Leonard [Thu, 4 Apr 2019 14:05:21 +0000 (14:05 +0000)]
Bug 14358: Changing the module refreshes the page and resets library choice

This patch makes an incremental change towards fixing Bug 14358: The
"New notice" button is converted to a dropdown button which asks the
user to select a module to start with.

To test, apply the patch and go to Tools -> Notices. Test the "New
notice" button and confirm that module selections are reflected in the
notice add form you are shown.

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 edf173e6ef1fa6de6e07f41c229799733456901a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22680: Compiled CSS
Nick Clemens [Thu, 11 Apr 2019 12:30:50 +0000 (12:30 +0000)]
Bug 22680: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d498c2563d76c05a1e819d63d8b56f732c3a7768)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22680: OPAC language footer not positioned correctly
Owen Leonard [Wed, 10 Apr 2019 17:55:22 +0000 (17:55 +0000)]
Bug 22680: OPAC language footer not positioned correctly

This patch modifies the OPAC CSS so that the language-selection footer
is positioned correctly.

To test, apply the patch and rebuild the OPAC CSS.

- Enable one or more translations in the OPAC
- View a page in the OPAC which can display in your browser without a
  vertical scrollbar (for instance, the OPAC main page with no news
  items or OpacMainUserBlock).
  - The language-selection footer should appear at the bottom of the
    screen. At smaller browser heights the footer should scroll
    offscreen.
  - Test with content in the opaccredits system preference, and with
    OpacKohaUrl enabled. The footer should still be positioned
    correctly.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d8a196cc9decd19a5401907adc64c7dee80a0c55)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22626: 'Filter paid transactions' broken on Transactions tab in staff
Owen Leonard [Tue, 9 Apr 2019 16:06:27 +0000 (16:06 +0000)]
Bug 22626: 'Filter paid transactions' broken on Transactions tab in staff

This patch changes a parameter in the function which filters the
DataTable of transactions. The addition of more columns to the table
changed the index of the column which is being filtered.

To test, apply the patch and locate a patron who has multiple fines or
charges, some of them paid. Go to Accounting -> Transactions. Test the
"Filter paid transactions" link. Table rows which show "0.00" in the
"Oustanding" column should be hidden.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9c0197a8d1b1a29f28de4b91e6605ae0a1088235)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20937: Truncate items for print notices when user has an email
Nick Clemens [Wed, 27 Feb 2019 17:45:47 +0000 (12:45 -0500)]
Bug 20937: Truncate items for print notices when user has an email

To test:
 1 - Set PrintNoticesMaxLines to 1
 2 - Checkout 2 (or more) items to a patron and make them overdue to trigger a
notice
 3 - Make sure the patron has an email
 4 - Make sure the notice you are sending is set to 'print' as the type
 5 - Run overdue_notices.pl without the 'nomail' option
 6 - Find the message and note all items have been added
 7 - Apply patch
 8 - Clear the message queue
 9 - Re-run overdue_notices.pl
10 - Confirm the message now has only 1 item.
11 - Set PrintNoticesMaxLines to 0
12 - Clear the message queue
13 - Re-run overdue_notices.pl
14 - Confirm the message has 2 items as expected

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 083f789b9548ec70d86dc48911df1bc9febda619)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22075: Fix encoding problem with RIS export in OPAC
Katrin Fischer [Sun, 7 Apr 2019 16:25:28 +0000 (16:25 +0000)]
Bug 22075: Fix encoding problem with RIS export in OPAC

When exporting a record with diacritics in RIS
format from the detail page in OPAC the encoding
is not correct and the diacritics appear broken.

This patch fixes it.

To test:
- Find or create a record with some special
  chars in your OPAC
- Go to the detail page
- Save as > RIS
- Verify the diacritics are broken in an editor
- Apply patch
- Repeat and verify everything now displays correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfeac6486516f185d9882d294d5000ab773c7dd5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22541: Invoice adjustments should show invoice number and include link on ordered...
Nick Clemens [Mon, 25 Mar 2019 12:55:03 +0000 (12:55 +0000)]
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c2ce5df6f550fd2452b978e1b5f7ac54e66b092)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22595: Items search is mixing inputs
Fridolin Somers [Wed, 27 Mar 2019 15:19:29 +0000 (16:19 +0100)]
Bug 22595: Items search is mixing inputs

Items search is using inputs and selects from search form to create an Ajax call.

In this call selects are parsed before inputs.
But a custom search field can be used with authorised values and used after a regular search field.
In this case the "q" param is not ordered like the "name" param.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use a regular filter like call number
5) Click on new field
6) Use custom field with an authorised value
7) Perform search
=> Without patch you get wrong resuts, authorised value is used as value for first field
=> You can see this by listening traffic in Firebug, look at params "f" and "q"
8) Check some combinaison of select and input filters

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e9989568e171ebcfc73df80c49556e0b663a8ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19747: Add link to article requests help page
Katrin Fischer [Tue, 12 Mar 2019 11:11:45 +0000 (11:11 +0000)]
Bug 19747: Add link to article requests help page

Newer manuals contain information about article requests.
This patch adds the link to the article request section
in the manual.

To test:
- Activate ArticleRequests system preference
- Go to Circulation > Article requests
- Click on Help
- Verify that you end up in the proper section of the manual

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 64740260e51b4249dbc99d151dadfb173cde5298)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22618: (RMaint follow-up) Backport fix
Martin Renvoize [Mon, 15 Apr 2019 11:57:54 +0000 (12:57 +0100)]
Bug 22618: (RMaint follow-up) Backport fix

Remove tests for bug 15774 not in 18.11.x series that somehow got
wrongly introduced by the above bug bug backport

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22646: Fix use of PrivacyPolicyURL
Magnus Enger [Fri, 5 Apr 2019 08:03:58 +0000 (10:03 +0200)]
Bug 22646: Fix use of PrivacyPolicyURL

To test:

PatronSelfRegistration = Allow
PatronSelfRegistrationDefaultCategory = PT (or some other real category)
GDPR_Policy = Enforced
PrivacyPolicyURL = Some URL

- Go to <opac>/cgi-bin/koha/opac-memberentry.pl and verify that the text "privacy
  policy" displays a link to the current page, not the URL in PrivacyPolicyURL
- Go to Administration > System preferences > Patrons > Privacy
- Verify that the descriptions of GDPR_Policy and PrivacyPolicyURL does not
  mention that PrivacyPolicyURL needs to be set if GDPR_Policy is set.
- Apply the patch
- Verify that opac-memberentry.pl now links to the URL in PrivacyPolicyURL
- Verify that the syspref descriptions mention the relationship between them

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 35921d30a99f3f4c4cdb21438c8516444a10f24c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21013: Missing itemtype for checkut makes patron summary print explode
Owen Leonard [Thu, 14 Mar 2019 13:15:01 +0000 (13:15 +0000)]
Bug 21013: Missing itemtype for checkut makes patron summary print explode

This patch moves retrieval of the item type description from the script
to the template using the ItemTypes template plugin.

To test, apply the patch and locate an item which is checked out to
someone. Modify the database record for that item to remove the item
type (items.itype).

View the print summary for the patron who has that item checked out. The
page should display correctly. Checked-out items which have an item type
should show that item type description correctly.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ea7245631ebfb16d4921a6cf7b4b46799a241ff9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22295: Make Elasticsearch query builder group multi-term queries
Ere Maijala [Fri, 8 Mar 2019 11:27:26 +0000 (13:27 +0200)]
Bug 22295: Make Elasticsearch query builder group multi-term queries

Test plan:

1. Do an advanced search for
Title = new
AND
Title = york
2. Verify that the results match an advanced search for:
Title = new york
3. Verify that tests in t/db_dependent/Koha/SearchEngine/Elasticsearch still pass

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 e90cb16d79f611caa3cd6d6cbbca4ea01d7a8077)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22288: Correct item search in batchMod by barcode file
Nick Clemens [Sat, 23 Mar 2019 11:44:53 +0000 (11:44 +0000)]
Bug 22288: Correct item search in batchMod by barcode file

To test:
1 - Have a list of barcodes that exist in your catalog
2 - Go to Tools->Batch item modification
3 - Attempt to modify items using the list
4 - Get an error page
5 - Apply patch
6 - Repeat
7 - Modification should work correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 192e3baa75f16891582244595fe305292b886dda)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22390: Never copy items if original order has been created from a subscription
Jonathan Druart [Mon, 4 Mar 2019 19:07:22 +0000 (16:07 -0300)]
Bug 22390: Never copy items if original order has been created from a subscription

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Tiny change to the code comment: serial => subscription order

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d6122ff78d4344441ed45ceb26ed09af83a15d15)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22390: (bug 15184 follow-up) Use aqorders.subscriptionid instead of biblio.serial
Jonathan Druart [Thu, 21 Feb 2019 17:48:24 +0000 (14:48 -0300)]
Bug 22390: (bug 15184 follow-up) Use aqorders.subscriptionid instead of biblio.serial

It seems that we made a wrong assumption on bug 15184, see
  commit d658cb6f7ecb18845a78d4708ee63ad1126f220f
  Bug 15184: Do copy items for not a serial OR if items are created on ordering

To know if an order has been created from a subscription we should check
$order->subscriptionid instead of the $biblio->serial flag

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ec78d0cddbb5cf5455a2c67130062917a0a23484)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22618: Move tests to t/db_dependent/Acquisition.t
Nick Clemens [Tue, 2 Apr 2019 18:02:14 +0000 (18:02 +0000)]
Bug 22618: Move tests to t/db_dependent/Acquisition.t

prove -v t/db_dependent/Acquisition.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ea3cbef473a8b542b58341ef38beb9f7be20f4a1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22641: Use raw filter on html slip
Nick Clemens [Sat, 23 Mar 2019 08:13:13 +0000 (08:13 +0000)]
Bug 22641: Use raw filter on html slip

To test:
Enable SCO
Load a patron
Hit finish, print slip
Note slip shows as raw html
Apply patch
Repeat, get a correctly formatted slip

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=22068

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 247d0d1df1ee5cc7f3184d8ac6ab35373af739b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17978: Unit tests for changes
Nick Clemens [Mon, 24 Dec 2018 15:59:22 +0000 (15:59 +0000)]
Bug 17978: Unit tests for changes

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 313df03ed06f8c4229b38d0306c380214d895c4e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17978: Check if hold can be placed before placing on placerequest.pl
Nick Clemens [Mon, 24 Dec 2018 14:33:51 +0000 (14:33 +0000)]
Bug 17978: Check if hold can be placed before placing on placerequest.pl

To test:
 1 - Set an All/All/All rule with reserves limited 2 to
 2 - Search in the staff side
 3 - Select all records (or more than 2) from the results
 4 - Click 'Place hold'
 5 - Find a patron, place holds
 6 - You get more holds than you should
 7 - Delete those holds
 8 - Apply patch
 9 - Search and select more than 2 records
10 - Find patron, place holds
11 - Only 2 holds are placed

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fa53eb4cfa1d0c2125fc3097e6d2328899fc4259)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17978: Circ rules will not limit holds
Kyle M Hall [Tue, 19 Dec 2017 19:20:56 +0000 (14:20 -0500)]
Bug 17978: Circ rules will not limit holds

The crux of this issue is that all those holds are unfilled record level holds. The code that checks for the number of holds the user already has *always* uses a branchcode of some form. Because of this, any open record level holds are completely ignored for this purpose.

Test Plan:
1) Set ReservesControlBranch to "item's home library"
2) Set an All libraries/All Patrons/All itemtypes rules limiting a patron to 2 holds
3) Place 3 record level holds, you can but you should not be able to!
4) Delete the holds
5) Apply this patch
6) Attempt to place 3 record level holds
7) Note that you cannot!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d7a5925aa0a7a185c8671d8c9989d80bdf2c0939)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22068: (QA follow-up) Return meaningful error codes
Tomas Cohen Arazi [Fri, 5 Apr 2019 18:13:36 +0000 (15:13 -0300)]
Bug 22068: (QA follow-up) Return meaningful error codes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e98dacf9f1f8464f0db394da6bc1152f96713597)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22068: Prevent patrons to cancel article request they did not create
Jonathan Druart [Thu, 14 Feb 2019 20:03:17 +0000 (17:03 -0300)]
Bug 22068: Prevent patrons to cancel article request they did not create

opac-article-request-cancel.pl doesn't check that the article request to
be cancelled actually belongs to the logged-in borrower. This results in
any logged-in user being able to cancel any article request just by
changing the id in the URL.

Test plan:
- Login with Patron P1, create an article request
- Cancel it
- Create another one
- Copy the cancellation link (must be /cgi-bin/koha/opac-article-request-cancel.pl?id=X)
- Login with Patron P2
- Hit the cancellation link
=> Without this patch the article request is cancelled
=> With this patch applied there is a 404 redirection

Note that the 404 will also appears when the article request id does not
exist.

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0b931d5de3c4fe9fa2b4823d9b8727b28a46aa7c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21003: Made Edit keywords more consistent in add_items-step2.tt
Hayley Mapley [Thu, 7 Mar 2019 20:28:48 +0000 (20:28 +0000)]
Bug 21003: Made Edit keywords more consistent in add_items-step2.tt

When adding a course reserve with a barcode that already exists, the
title, breadcrumbs, and legend of the form all specify that the user is
editing, and not adding, the book.

Test plan:
Same as comment 1

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 41e0ff7cd6240c2c9ba2d1bec816b191ef091eb1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21003: Removed warning and changed wording on add_items-step2.tt
Hayley Mapley [Thu, 7 Mar 2019 02:50:12 +0000 (02:50 +0000)]
Bug 21003: Removed warning and changed wording on add_items-step2.tt

When editing an item in a Course Reserve, the page displayed is the same
that is displayed when adding an item to a Course Reserve. This patch
removes the warning 'This course already has this item on reserve' when
the item is being edited, as well as changes the title, breadcrumbs, and
header of the div. This patch also Changes the header of the div to say
'Edit 'book_name' in 'course_name'' instead of 'Add 'book_name' to
'course_name'' when adding items to a course reserve if the item is
already present.

To test:
1) Create a new course in Course Reserves (you will need Course
    Reserves enabled in syspref)
2) Add an item by clicking the Add reserves button
3) Click the edit button on the right hand side of the item listing
under the Reserves heading
4) Observe that the warning 'The course already has this item on reserve' appears, and that the title, breadcrumbs and
header of the div all say Add/Reserve
5) Apply the patch
6) Repeat step 3 and observe that the title, breadcrumbs and header of
the div now say Edit
7) Also verify that when adding a reserve with a barcode that does not
yet exist in the course reserves that the warning 'The course already...' is not displayed and that the header of the div says Add
8) Finally verify that when adding a reserve with a barcode that DOES
exist in the course reserves that the warning 'The course already...' IS
displayed and the header of the div says Edit
9) Sign off!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3eee6f3091fcb621152af7f4db6441c98cb74558)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 12441: Search.pl conditional checks and displays using same syspref
Hayley Mapley [Thu, 14 Mar 2019 03:47:59 +0000 (03:47 +0000)]
Bug 12441: Search.pl conditional checks and displays using same syspref

Script search.pl checks OPACdefaultSortField and OPACdefaultSortOrder, but
shows defaultSortField and defaultSortOrder when using Advanced Search
in the staff client.

Test plan:
Apply the patch and then check that the Advanced Search uses
defaultSortOrder and defaultSortField sysprefs instead of the OPAC
sysprefs in the conditional. Check that sort behaviour in Advanced
Search still functions as expected. (It should do - this doesn't change
what displays, just improves consistency).

Sponsored-by: Catalyst IT
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c786e4de2369de34ce26610309cbce53534446d3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22475: Shelving location doesn't appear on tags list view
Owen Leonard [Thu, 7 Mar 2019 16:04:25 +0000 (16:04 +0000)]
Bug 22475: Shelving location doesn't appear on tags list view

This patch corrects the tags list view so that shelving location appears
correctly. Previously the template tried to display a variable which was
empty.

To test, apply the patch and locate an title which has both a tag
applied to it and a shelving location defined for one or more items. Go
to Tools -> Tags and click the tag to view titles with that tag. In the
location column of the table the shelving location should appear along
with library and call number.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54cf1df239e3b83ae5550e3ef499038dd5597d95)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 10345: Increment copy number when adding multiple copies.
Björn Nylén [Thu, 28 Mar 2019 09:28:29 +0000 (10:28 +0100)]
Bug 10345: Increment copy number when adding multiple copies.

To test:
1. Add multiple copies of an item with data in the 'Copy number' field. Note that tha data will be identical for all items.
2. Apply patch.
3. Add multiple copies of an item with a positive integer (ie. only digits) in the 'Copy number' field. Note that the copy number is incremented for each item.
4. Add multiple copies of an item with some other type of data in the 'Copy number' field. Note that the copy number field remains unchanged for the added items.

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 0e0a3173859d4374087e99e1a7cd929c8da61c76)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22620: OPAC description for CCODE in opac-reserve.tt
Fridolin Somers [Tue, 2 Apr 2019 07:57:35 +0000 (09:57 +0200)]
Bug 22620: OPAC description for CCODE in opac-reserve.tt

Bug 20450 added CCODE to opac-reserve.tt using AuthorisedValues TT plugin.

This patch changes the plugin call so that it requests OPAC description.

Test plan :
1) Define a CCODE with staff and OPAC descriptions
2) Apply this collection on an item
3) At OPAC, place an hold on this item
4) Verify the collection display correctly OPAC description and not staff description

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 05e49e6be98723f67ec85a5843fad1fc9787925f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22575: Item type administration uses invalid error class for dialog
Owen Leonard [Tue, 26 Mar 2019 14:11:28 +0000 (14:11 +0000)]
Bug 22575: Item type administration uses invalid error class for dialog

This patch modifies the item types administration script so that it
passes a valid message type to the template, where the type is used as a
CSS class. "Error" is a nonexistent dialog class. It should be "alert."

To test, apply the patch and go to Administration -> Item types.

 - Try to delete an item type which is in use. The style of the error
   dialog should be correct.
 - Try to add an item type using a code which already exists. The error
   should look correct.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40503c8fa86e6c4480ec8ca59e28f0c6f394502d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22607: DBRev 18.11.04.001
Nick Clemens [Sat, 23 Mar 2019 08:51:15 +0000 (08:51 +0000)]
Bug 22607: DBRev 18.11.04.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ced69febf3de17691d885e9ee7e03ef46c28b2ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22607: Change default value in issues.renewals to '0'.
Josef Moravec [Fri, 29 Mar 2019 08:13:48 +0000 (08:13 +0000)]
Bug 22607: Change default value in issues.renewals to '0'.

This patch change renewals column of issues and old_issues tables.

Now it is NOT NULL default 0. It does not make sense when number of
renewals is undefined, it is always integer with value zero or more

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cf95f0a7e6897d3dc4b90c92ffad19230379d7cb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22611: Correction for call to get create_item in EDI.pm
Colin Campbell [Mon, 1 Apr 2019 11:16:51 +0000 (12:16 +0100)]
Bug 22611: Correction for call to get create_item in EDI.pm

There was a typo in the addition of a call to
effective_create_items causing processing to abort after adding
a single copy.

This patch reverts to using the C4::Context call as used for the
first copy created, the intended call to effective_create_items
is a wrapper around that as the field in the basket is guaranteed
to be null (its not set when we call AddBasket). Being consistent
and explicit in what we call should guard against future changes
in dependencies exposing the logic flaw

Added some comments to make logical flow of code clearer

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f6bc67e851722451a970d085f51fb11fb03e21b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22648: Fix typo in SQL in smart-rules.pl
Katrin Fischer [Sat, 6 Apr 2019 10:19:14 +0000 (10:19 +0000)]
Bug 22648: Fix typo in SQL in smart-rules.pl

Fixes 2 SQL statements for setting the maximum
number of checkouts possible.

To test:
- In 18.11
- Verify that setting Default checkout, hold and return policy works
- Verfiy that setting Default checkout, ohld and return policy by
  patron category works

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (follow-up) Add Modern::Perl
Nick Clemens [Fri, 29 Mar 2019 13:17:14 +0000 (13:17 +0000)]
Bug 13895: (follow-up) Add Modern::Perl

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 94206510d7a7641e0e283738f56249c90f7d632e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22586: IntranetReportsHomeHTML no longer renders as HTML on reports-home.pl
Lucas Gass [Tue, 26 Mar 2019 11:17:31 +0000 (11:17 +0000)]
Bug 22586: IntranetReportsHomeHTML no longer renders as HTML on reports-home.pl

As of 18.11 the IntranetReportsHomeHTML syspref no longer renders HTML
on report-home.pl. I think this is being filtered wrong in the template.

Test Plan:

1) Edit IntranetReportsHomeHTML, set to "<p>Test</p>"
2) View a report, note that you see the html p tags are displayed
litterly
3) Apply this patch
4) Reload the page
5) Note the p tags are rendered as html

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7aaa10e0922b21f1c9ed40ede0d3dfc0a63c2832)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22596: use raw TT filter in items search with custom field
Fridolin Somers [Wed, 27 Mar 2019 14:37:51 +0000 (15:37 +0100)]
Bug 22596: use raw TT filter in items search with custom field

When items search is with a custom field using authorised values, html TT filter is breaking the JS, it should use raw.

Test plan :
1) Go to Administration > Item search fields
2) Define a search field with an authorised values category
3) Go to items search
4) Use the "New field" link
5) Check use of custom field is OK

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb7e0f018c479024f0ceacb9f0c235b556ec2979)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (QA follow-up) Make the class plural
Tomas Cohen Arazi [Wed, 27 Mar 2019 17:23:18 +0000 (14:23 -0300)]
Bug 13895: (QA follow-up) Make the class plural

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eabcec1d6c172e0e590aa497eae0c264bcd2b5dc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Fix test
Josef Moravec [Wed, 13 Mar 2019 16:25:38 +0000 (16:25 +0000)]
Bug 13895: Fix test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 583328e3f8c2e1827419185628069ad8c9979943)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Adapt naming according to voted RFC
Josef Moravec [Wed, 13 Mar 2019 16:03:09 +0000 (16:03 +0000)]
Bug 13895: Adapt naming according to voted RFC

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a142369b309068ed2ba5d34f033f4e047483401d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (follow-up) Fix POST response
Josef Moravec [Mon, 25 Feb 2019 22:17:01 +0000 (22:17 +0000)]
Bug 13895: (follow-up) Fix POST response

Test plan:
prove t/db_dependent/api/v1/chcekouts.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 47ad7afccaf1ca0ae7b8dbfad9998aaac6d9a938)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Change renewal endpoint
Josef Moravec [Thu, 21 Feb 2019 00:26:17 +0000 (00:26 +0000)]
Bug 13895: Change renewal endpoint

Instead of PUT on /checkout/{checkout_id} endpoint, you should now call
POST on /checkouts/{checkout_id}/renewal

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 95d23bc3c38f3cd6a4e6be3aac451c3899cccc83)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Refactor test using REST Basic auth
Josef Moravec [Thu, 21 Feb 2019 00:15:22 +0000 (00:15 +0000)]
Bug 13895: Refactor test using REST Basic auth

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a0148b440a4f05c6a6d216c85b03ea502b0da95b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Remove create_item and create_biblio subs from test
Josef Moravec [Wed, 20 Feb 2019 21:42:36 +0000 (21:42 +0000)]
Bug 13895: Remove create_item and create_biblio subs from test

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a7e704382fa97ba08c8d2d57f6a818e76e858770)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Remove the opac checks in privileged endpoint
Josef Moravec [Wed, 20 Feb 2019 21:30:49 +0000 (21:30 +0000)]
Bug 13895: Remove the opac checks in privileged endpoint

Test plan:
prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4672e6e6c40cf595da7e836525e5b6e486f78efe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology
Josef Moravec [Mon, 4 Feb 2019 14:22:54 +0000 (14:22 +0000)]
Bug 13895: (follow-up) Adapt checkout endpoint to openapi, update terminology

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1dfb57164fd6d986b110caa695a3baf9800ff93a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts
Tomas Cohen Arazi [Fri, 10 Nov 2017 19:16:49 +0000 (16:16 -0300)]
Bug 13895: (QA follow-up) Adjust OpenAPI definitions for checkouts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b63fd774c181b96e514122c0d693f222b99b1cdd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13895: Add API routes for checkouts retrieval and renewal
Julian Maurice [Mon, 23 Mar 2015 12:10:46 +0000 (13:10 +0100)]
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Lari Taskula <larit@student.uef.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e3f2e346f884e2ba6e4a8f43709955f776a259de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21049: Set 007/00 when selecting material type (Rancor)
Julian Maurice [Fri, 8 Mar 2019 09:12:50 +0000 (10:12 +0100)]
Bug 21049: Set 007/00 when selecting material type (Rancor)

There is a 1-1 relationship between the material type values and the
position 00 of 007 field. Selecting a material type should set this
position's value.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 856425db1e156ee4faf1aae70b0a78845711ba43)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21049: Fix value of material select for Rancor 007 widget
Julian Maurice [Wed, 6 Mar 2019 07:43:18 +0000 (08:43 +0100)]
Bug 21049: Fix value of material select for Rancor 007 widget

The material type is selected in accordance with position 0 of 007

Test plan:
1. Create a new record using the advanced editor
2. Select a material type for field 007 and set at least the position 0
   of this field
3. Save the record and reload the page
4. The material type should remain selected
5. Try with all available material types

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e85294a738da7cce2a4897998ffa795f977b4cd7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22536: Display problem in Holds to Pull report
Owen Leonard [Tue, 19 Mar 2019 12:41:26 +0000 (12:41 +0000)]
Bug 22536: Display problem in Holds to Pull report

This patch modifies the display of several values in the holds to pull
report so that they can be displayed as lists instead of as chunks of
HTML generated in SQL.

This patch modifies the SQL in pendingreserves.pl so that values can be
formatted in the same way that holding branch is. The better long-term
solution is to remove SQL from pendingreserves.pl altogether, but this
is a quick fix.

This patch also makes a couple of minor markup changes to fix
validation.

To test, apply the patch and go to Circulation -> Holds to pull. To see
the changes the patch makes your holds to pull list should have titles
with multiple items at multiple branches, with call number, copy number,
and enumeration data. These values should all be displayed in bulleted
lists.

Signed-off-by: David Roberts <david.roberts@ptfs-europe.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9a321c128fed457bf6d11d2ce7ee7edf7dd28004)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22560: Forgotten password "token expired" page still shows boxes to reset password
Owen Leonard [Fri, 22 Mar 2019 13:19:51 +0000 (13:19 +0000)]
Bug 22560: Forgotten password "token expired" page still shows boxes to reset password

This patch modifies the OPAC password recovery template so that the new
password entry form doesn't appear if the patron has followed an invalid
or expired link.

This patch also corrects the markup in the page title.

To test, apply the patch and follow the process for resetting a
forgotten password. When you follow the password recovery link, modify
the URL so that the "uniqueKey" parameter is different.

The page should show an error message. The password entry form should
not appear.

Check the page title in the browser's title bar. It should look correct.

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7ac1457ffc27cf6ec5a3a7bab6abc8a010e02b6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22561: Forgotten password requirements hint doesn't list all rules for new passwords
Owen Leonard [Fri, 22 Mar 2019 12:57:31 +0000 (12:57 +0000)]
Bug 22561: Forgotten password requirements hint doesn't list all rules for new passwords

This patch modifies a few templates in the OPAC so that all available
information on password requirements is displayed for each case where
the patron is setting a password:

 - If the RequireStrongPassword system preference is set, a message
   should appear listing strong password requirements and minimum
   password length.
 - If RequireStrongPassword is not set, the message should only ask for
   a minimum password length.

To test, apply the patch and enable the PatronSelfRegistration and
OpacResetPassword preferences.

On the following pages, test with RequireStrongPassword both on and
off. The correct messages should appear.

 - OPAC -> Forgot password. Follow the process to reset your password
   until you reach the step where you are entering the new password.
 - OPAC -> Register here. Check the password section of the registration
   form.
 - OPAC -> Log in -> Change your password.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 50be1c4006e0a1d7e3b537bd849bc77f7a6bb56f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17746: (QA follow-up) Make set_password.pl generate a password if required
Tomas Cohen Arazi [Wed, 20 Feb 2019 14:26:40 +0000 (11:26 -0300)]
Bug 17746: (QA follow-up) Make set_password.pl generate a password if required

This patch makes the set_password.pl script generate the password if it
is not passed as an argument.

It also changes the behaviour of set_password.pl: it will now print the
userid and password (generated or not) to mimick the behaviour from
koha-reset-passwd.

The koha-reset-passwd gets simplified as it doesn't generate the random
password anymore, it passes the responsability to set_password.pl

To test:
- Follow the steps from the original platch
- Verify all behaves as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ef48c8708736e9d5b16e462e520302c007cb4c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17746: Add misc/admin/set_password.pl script
Tomas Cohen Arazi [Mon, 4 Feb 2019 18:09:34 +0000 (15:09 -0300)]
Bug 17746: Add misc/admin/set_password.pl script

This patch introduces a script that allows changing a patron's password.
The change overrides the defined password enforcement policy.

If multiple conditions are passed to match on the patron, they all need
to match. Otherwise an error message is printed.

Attributes to search the patron on:
- cardnumber
- patron_id (a.k.a. borrowernumber)
- userid

we usually know some of them, but if we specify more than one, they need
to match a patron, together.

To test:
1) Apply this patch
2) Have a known patron (i.e. you know the cardnumber, the borrowernumber
   and the userid).
3) Run:
  $ kshell
 k$ perl misc/admin/set_password.pl --cardnumber <the_card_number> \
                                    --password a_password
4) Verify you can login with the new password
5) Repeat 3) through 5) with --patron_id and --userid
=> SUCCESS: You can login in all cases
6) Try combining some or all the parameters
=> SUCCESS: It fails when it should, it succeeds when it should
7) Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2f6542e1ebbd15977b47c86d2a9ef55fa0c5e9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17746: Make koha-reset-passwd user set_password.pl
Tomas Cohen Arazi [Tue, 5 Feb 2019 17:04:12 +0000 (14:04 -0300)]
Bug 17746: Make koha-reset-passwd user set_password.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0cd4ca289bd2e1bd11fdbd015225a909971ce213)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22550: OPAC suggestion form doesn't require mandatory fields
Owen Leonard [Wed, 20 Mar 2019 16:24:42 +0000 (16:24 +0000)]
Bug 22550: OPAC suggestion form doesn't require mandatory fields

Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
   Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
   The required fields should be labeled in red.
   (you can change the mandatory fields by preference 'OPACSuggestionMandatoryFields')

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>
Signed-off-by: Jogiraju,T. <rajujogi.t@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28e7f1d4e7a114b04d6940463f47351466a638dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22495: Restore Elasticsearch mapping for su-geo
Ere Maijala [Tue, 12 Mar 2019 09:29:33 +0000 (11:29 +0200)]
Bug 22495: Restore Elasticsearch mapping for su-geo

Test plan:
1. Reset mappings
2. Run perl misc/search_tools/rebuild_elastic_search.pl -d -b -v
3. Do a search and verify that the Places facet works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 53b059afbb5731373a92a3ebaaceea4e1d656363)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21974: Make Elasticsearch connection settings configurable
Ere Maijala [Mon, 17 Dec 2018 14:22:58 +0000 (16:22 +0200)]
Bug 21974: Make Elasticsearch connection settings configurable

Default settings are appended in get_elasticsearch_params so that there's a central place for them. Defaults can be overridden in koha-conf.xml.

Test plan:

1. Verify that searches still work with the patch applied.
2. Verify that search fails after adding the following under <elasticsearch> in koha-conf.xml:
<cxn_pool>Static</cxn_pool>
3. Verify that search fails after adding the following under <elasticsearch> in koha-conf.xml:
<cxn_pool>FOO</cxn_pool>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 65f35447e93008810cec3eba63a286b9940d5824)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21622: (RM follow-up) adjust for changes from bug 21282
Nick Clemens [Mon, 25 Mar 2019 12:58:39 +0000 (12:58 +0000)]
Bug 21622: (RM follow-up) adjust for changes from bug 21282

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 18f9c3eb514f5733c55d92b16bd0f38d29161290)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21998: Silent tests
Jonathan Druart [Wed, 27 Feb 2019 17:49:35 +0000 (14:49 -0300)]
Bug 21998: Silent tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e9fa69ca64e78cc9ea540e3fed1e9ffb1b3488fe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21998: Throw exception on bad pattern
Josef Moravec [Tue, 18 Dec 2018 11:53:21 +0000 (11:53 +0000)]
Bug 21998: Throw exception on bad pattern

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ee73d577ed564d98e77cf25fcdadcbc594f7217c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21998: Add pattern parameter in Koha::Token
Marcel de Rooy [Wed, 19 Sep 2018 13:36:36 +0000 (15:36 +0200)]
Bug 21998: Add pattern parameter in Koha::Token

Allow a pattern too in Koha::Token->generate. Only supported length.
Does not affect CSRF calls. So tiny change without further impact.

Test plan:
Run  t/Token.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b794643bb075c0aa5de81f2481ae1df56f674309)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: (follow-up) Use Basic auth in tests
Josef Moravec [Tue, 26 Feb 2019 09:16:05 +0000 (09:16 +0000)]
Bug 19661: (follow-up) Use Basic auth in tests

Test plan:

prove t/db_dependent/api/v1/acquisitions_funds.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 48484173e26bf9859984860a17089f09de5c8b6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: Add and change properties and parameters to conform to the funds RFC.
Matthias Meusburger [Tue, 15 Jan 2019 09:46:04 +0000 (10:46 +0100)]
Bug 19661: Add and change properties and parameters to conform to the funds RFC.

Also, perform an exact search when searching on the fund owner id.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e98cc4503cedba411371d4005be41b5822569c8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: Use Koha::Acquisition::Funds instead of C4::Budgets
Matthias Meusburger [Wed, 17 Jan 2018 10:49:14 +0000 (11:49 +0100)]
Bug 19661: Use Koha::Acquisition::Funds instead of C4::Budgets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b6be4024196c9e62363eabf0d2ad0b9f9141d15c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 19661: REST API - Funds Endpoint
Matthias Meusburger [Thu, 12 Oct 2017 07:55:12 +0000 (07:55 +0000)]
Bug 19661: REST API - Funds Endpoint

This patch adds a new route to the REST api:

/api/v1/acquisitions/funds/

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 717975abebe938a5e79ffc07055ed6190b43f206)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21948: Compiled CSS
Nick Clemens [Fri, 22 Mar 2019 19:20:55 +0000 (19:20 +0000)]
Bug 21948: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7a9a8f2f08e4b74af712d59e1f1f9f0a7b3205a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21948: Clean up style of item detail page
Owen Leonard [Tue, 4 Dec 2018 19:53:29 +0000 (19:53 +0000)]
Bug 21948: Clean up style of item detail page

This patch removes some page-specific style from the item detail page in
the staff client and adds some markup in order to trigger a more
generally-used style.

This patch also adds a font-awesome icon to the "Edit item" link on the
page.

To test, apply the patch and regenerate the staff client CSS. Open a
bibliographic record and view the "Items tab."

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 32020105e8494ba82a8a505711c5047560c9d304)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoUpdate release notes for 18.11.04 release v18.11.04
Martin Renvoize [Mon, 25 Mar 2019 17:16:50 +0000 (17:16 +0000)]
Update release notes for 18.11.04 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoIncrement version for 18.11.04 release
Martin Renvoize [Mon, 25 Mar 2019 16:36:38 +0000 (16:36 +0000)]
Increment version for 18.11.04 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoTranslation updates for Koha 18.11.04
Koha translators [Mon, 25 Mar 2019 16:08:08 +0000 (13:08 -0300)]
Translation updates for Koha 18.11.04

(cherry picked from commit 40211e2a2a4939ee379fde2e2c10f2b7c89849ac)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22565: (QA follow-up) Fix test Acquisition.t
Josef Moravec [Mon, 25 Mar 2019 11:21:45 +0000 (11:21 +0000)]
Bug 22565: (QA follow-up) Fix test Acquisition.t

Test plan:
prove t/db_dependent/Acquisition.t
should pass

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 607eb83bc06410d59aefb6907070865f9f272115)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22565: Add test for ModReceiveOrder regression
Martin Renvoize [Mon, 25 Mar 2019 11:04:37 +0000 (11:04 +0000)]
Bug 22565: Add test for ModReceiveOrder regression

This test checks that order_internalnote is only updated for the given
orderline in ModReceiveOrder.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9bf2b27df5c0b403feea9f78962244d6cbf8a7c8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22565: Do NOT replace all internalnote's on receive
Martin Renvoize [Mon, 25 Mar 2019 10:49:15 +0000 (10:49 +0000)]
Bug 22565: Do NOT replace all internalnote's on receive

Bug 21467 introduced a but whereby setting any order_internalnote on
receive one would end up setting all orders to have that internalnote.

This patch adds the missing WHERE clause to the database query which was
likely lost during a rebase?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9acf69f7a690a78bd09af7afbb28e4b32c493903)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13735: Update PrepareItemrecordDisplay to use maxlength
Katrin Fischer [Wed, 6 Feb 2019 02:02:11 +0000 (02:02 +0000)]
Bug 13735: Update PrepareItemrecordDisplay to use maxlength

The PrepareItemrecordDisplay method used to generate the item
display on receiving serials was using a hardcoded maxlength
of 255 on input fields. This patch updates it to use the
maxlength defined in the frameworks instead as the normal
item form does.

To test:
- Create or reuse an existing subscription
- Make note of the framework the record uses
- Add an item on receive
- Check the maxlength on the various fields is set to 255
  (check source code or use developer tools)
- You can also verify that by adding a long note to
  one of the note fields
- Apply patch
- Repeat tests, the maxlength should now be 9999
- In your framework settings, change the length of one
  of the subfields to another value
- Verify that the item form reflects the change

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>
(cherry picked from commit 0429aadc217f05a98bbaa51f955b835ac552fd7a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21130: (Follow up OPAC Results) Prevent HTML class from being translated
Blou [Tue, 11 Sep 2018 18:42:03 +0000 (14:42 -0400)]
Bug 21130: (Follow up OPAC Results) Prevent HTML class from being translated

This fixes the same issue where "title" is being translated (in fr-CA at least) and thus
break the javascript impacting the result display in the OPAC

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5334e0f32a8b93c407c2bfc931397a0ae70b8d64)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21130: Prevent HTML class from being translated
David Bourgault [Fri, 27 Jul 2018 21:13:42 +0000 (17:13 -0400)]
Bug 21130: Prevent HTML class from being translated

Adds a xsl:value-of tag to prevent the value from being translated.

TEST PLAN
0) Apply patch
1) Translate
2) In the opac, div.record has not changed

NOTE:
I don't know if this bug affects all translations, I noticed it when translating to fr-CA.
The fix will work for all languages.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e64fb90311a9f2b37b49fc670962089cbb3d32de)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13763: (follow-up) Strip leading whitespace characters from input barcode
Josef Moravec [Wed, 20 Mar 2019 15:52:07 +0000 (15:52 +0000)]
Bug 13763: (follow-up) Strip leading whitespace characters from input barcode

this makes the work with barcodes from input consistant on checking out,
     checking in and renewing

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28ff4f6393e65ebfca60c05611fafc926f1fb239)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13763: Added check for filter syspref in renew.pl
Hayley Mapley [Thu, 14 Mar 2019 04:58:31 +0000 (04:58 +0000)]
Bug 13763: Added check for filter syspref in renew.pl

In Circulation->Renew, the renew feature does not check the system
preference itemBarcodeFilter to see whether the barcode needs to be
converted. This patch fixes this, adding a check for the system pref and
applying it accordingly to convert the barcode if it is needed.

Test plan:
1) In Circulation->Renew, enter a barcode that you know exists in the
catalogue but add extra spaces, breaking up the barcode. Note that this
fails with a warning that says 'No item matches this barcode'

2) In system Preferences, set the itemBarcodeInputFilter pref to Remove
spaces and repeat step1. Note that the result is the same as in step 1

3) Apply the patch

4) Repeat step 1, and note that the filter removes the spaces and the
item is renewed (or gives an error that indicates it recognises the
barcode)

Sponsored-by: Catalyst IT
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 48e9082043115416063e66217db60f0054b68088)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: DBRev 18.11.03.004
Nick Clemens [Thu, 21 Mar 2019 18:11:29 +0000 (18:11 +0000)]
Bug 18736: DBRev 18.11.03.004

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bc36d8e06b3b43b09b655718f7fad5a1780b246a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: Calculate tax depending on rounding
Nick Clemens [Tue, 15 Jan 2019 15:06:06 +0000 (15:06 +0000)]
Bug 18736: Calculate tax depending on rounding

Marcel's comments pointed out that while I tried to avoid storing
rounded values it is required for tax generation.

This patch makes that change and adds test coverage and POD for
populate_order_with_prices

To test:
Follow plan on other patches, ensure that orders and totals match on the
basket, invoice, and budget pages

prove -v t/db_dependent/Acquisition/populate_order_with_prices.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0aeae50229c6a381fe112644b72eefd6848fb655)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (QA follow-up) Resolve uninitialized warn from Biblio.pm L3334
Marcel de Rooy [Fri, 14 Dec 2018 09:46:56 +0000 (10:46 +0100)]
Bug 18736: (QA follow-up) Resolve uninitialized warn from Biblio.pm L3334

Running t/db/Budgets.t:
Use of uninitialized value in join or string at C4/Biblio.pm line 3334.

Test plan:
Run again. Verify no warnings left.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 876323cf5bb5185834a875f3da29ac33f7760ef4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 18736: (QA follow-up) Change to signed, add large int test
Marcel de Rooy [Fri, 28 Sep 2018 09:20:49 +0000 (11:20 +0200)]
Bug 18736: (QA follow-up) Change to signed, add large int test

[1] Add trivial subtest in t/Number/Price.t
Checking a negative number and a large number for the MAX_INT change.
Note: Confusing to have t/Prices.t too.

[2] Change UNSIGNED to SIGNED in get_rounding_sql. Although I did not spot
problems with negative prices, we theoretically could while casting.
cast(-2 as unsigned) == 18446744073709551614

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2f5e839bf780955d228c9672abce9d6e5ad1aedf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>