]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 22511: (follow-up) Fix test plans
Martin Renvoize [Wed, 27 Mar 2019 11:52:07 +0000 (11:52 +0000)]
Bug 22511: (follow-up) Fix test plans

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>
5 years agoBug 22511: Update UI to use accountlines.status
Martin Renvoize [Fri, 22 Mar 2019 12:00:00 +0000 (12:00 +0000)]
Bug 22511: Update UI to use accountlines.status

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>
5 years agoBug 22511: Update void method to use status
Martin Renvoize [Fri, 15 Mar 2019 14:07:24 +0000 (14:07 +0000)]
Bug 22511: Update void method to use status

We added a 'status' field to 'accountlines' in bug 22512 to allow for
more fined grained control over 'types' and 'states'.

This patch updates the void method to utilise this new field so we may
keep the original credit type for later auditing should it be required.

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>
5 years agoBug 22511: Update tests
Martin Renvoize [Fri, 15 Mar 2019 14:18:12 +0000 (14:18 +0000)]
Bug 22511: Update tests

Updated tests to check for 'status' change and fixed 'accounttype' and
moved from t/db_dependent/Accounts.t to the more appropriate
t/db_dependent/Koha/Account/Lines.t

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>
5 years agoBug 21460: (follow-up) Fix bugs found in QA
Andrew Isherwood [Wed, 24 Apr 2019 13:58:41 +0000 (14:58 +0100)]
Bug 21460: (follow-up) Fix bugs found in QA

Fix silly bugs mentioned in comment #29

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21460: (follow-up) Filter params in .pl
Andrew Isherwood [Tue, 23 Apr 2019 09:18:31 +0000 (10:18 +0100)]
Bug 21460: (follow-up) Filter params in .pl

This patch filters the passed parameters in the .pl, rather than doing
it in the template. As per comment 16
(https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21460#c16)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21460: Simplify the code to have only 1 assignment
Andrew Isherwood [Tue, 23 Apr 2019 09:09:33 +0000 (10:09 +0100)]
Bug 21460: Simplify the code to have only 1 assignment

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22551: Stray "//" appears at bottom of opac-detail.tt
phette23 [Mon, 8 Apr 2019 23:00:47 +0000 (16:00 -0700)]
Bug 22551: Stray "//" appears at bottom of opac-detail.tt

Removes a couple stray "//<![CDATA[" like comments which are artifacts of other
code that since been removed. One of the comments causes two forward slashes to
appear at the bottom of each OPAC detail page.

Testing plan:

- enable SocialNetworks
- visit any OPAC detail page, observe "//" at bottom of page
- apply patch
- revisit page, slashes should be gone

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>
5 years agoBug 22413: Improve query string and desc creation for Elasticsearch
Ere Maijala [Tue, 5 Mar 2019 09:04:55 +0000 (11:04 +0200)]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22339: DBRev 18.12.00.062
Nick Clemens [Thu, 25 Apr 2019 10:36:36 +0000 (10:36 +0000)]
Bug 22339: DBRev 18.12.00.062

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22339: Fix search field mappings of MARC fixed fields
Ere Maijala [Thu, 14 Mar 2019 11:31:34 +0000 (13:31 +0200)]
Bug 22339: Fix search field mappings of MARC fixed fields

Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.

Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass:  prove -v t/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20891: Escape html then JSON
Jonathan Druart [Fri, 8 Jun 2018 15:19:41 +0000 (12:19 -0300)]
Bug 20891: Escape html then JSON

To my understanding we need to escape first html chars then to JSON.

If this patch works we will need to rethink the 'To' TT plugin.
It was originally designed to have several escape methods, but with
these changes it will not make sense to name it 'To' if used only to
escape JSON

IIRC we should keep the 2 different ways to use it:
 * [% To.json( string ) %]
 * [% string | $To %]
otherwise it will be hard to use it when called in argument of
patron-title.inc (`git grep To.json`)

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>
5 years agoBug 20891: Escape list's names in JSON
Jonathan Druart [Thu, 7 Jun 2018 15:17:26 +0000 (12:17 -0300)]
Bug 20891: Escape list's names in JSON

When someone uses \ in the description of a list, the datatable in staff
won't load and keeps processing.

Test plan:
- Create a list named "<script>alert('hola');</script>"
- Create another list named "k\o\h\a"
- Hit /cgi-bin/koha/virtualshelves/shelves.pl

=> Without this patch the lists will not be displayed, JSON is
malformated
=> With this patch everything is ok

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
5 years agoBug 20837: (QA follow-up) adding missing filter to make QA tool happy
Liz Rea [Tue, 9 Apr 2019 19:37:13 +0000 (19:37 +0000)]
Bug 20837: (QA follow-up) adding missing filter to make QA tool happy

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>
5 years agoBug 20837: Use ReservesControlBranch to determine holdability of items
Nick Clemens [Wed, 30 May 2018 16:05:04 +0000 (16:05 +0000)]
Bug 20837: Use ReservesControlBranch to determine holdability of items

To test:
 1 - Set a default holds plicy for an item type as 'from home library'
 2 - Set CircControl to 'logged in library'
 3 - Log in as staff from a library without the rule set
 4 - Note you can set holds for patrons of any library on items of type
above
 5 - Toggle ReservesControlBranch and note that nothing changes
 6 - Toggle CircControl and note some combinations don't allow holds
 7 - Apply patch
 8 - Toggle ReservesControlBranch and note that holdability is affected
 9 - Toggle CircControl and note holdability does not change
10 - Read the note on admin/smartrules.pl and confirm it makes sense

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>
5 years agoBug 20837: Unit tests
Nick Clemens [Wed, 30 May 2018 17:29:57 +0000 (17:29 +0000)]
Bug 20837: Unit tests

To test:
prove -v t/db_dependent/Holds.t
prove -v t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

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>
5 years agoBug 22650: Prevent multiple holds on individual items
Nick Clemens [Wed, 24 Apr 2019 15:12:17 +0000 (15:12 +0000)]
Bug 22650: Prevent multiple holds on individual items

This patch corrects a missing id on the holds_to_place field and adds code to disable the box when an item is checked

Additionally script login now places a single hold if an itemnumebr is passed and checks for holdability of the specific item

To test:
 1 - Allow multiple holds per record in circ rules
 2 - In staff client, go to place a hold on a record
 3 - Select a patron
 4 - Increase the number of holds
 5 - Then select a specific item to hold
 6 - Patron now has multiple holds on a single item
 7 - Apply patch
 8 - Repeat, notice that count is disabled when item checked
 9 - Confirm count is enabled when 'Hold next available item' is checked
10 - Set number to more than 1
11 - Check an item and submit
12 - Confirm only one item is reserved
13 - Hit the script directly (with valid info):
     http://localhost:8081/cgi-bin/koha/reserve/placerequest.pl?biblionumber=1&checkitem=1&holds_to_place_count=2&borrowernumber=5
14 - Confirm only one hold is placed
15 - Confirm multiple hits of the url do not generate further holds

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>
5 years agoBug 19241: Waiting items show as available in the cart
Nick Clemens [Tue, 16 Apr 2019 17:21:01 +0000 (17:21 +0000)]
Bug 19241: Waiting items show as available in the cart

The cart uses the same item-status.inc that the details page uses, however, we don't
set the waiting or reserved flags. This patch adds those flags to the script

To test:
1 - Find an item on the opac
2 - Place a hold on the item
3 - Check in the item to confirm the hold
4 - Note the details page on OPAC shows 'On hold'
5 - Add the item to a basket
6 - Note the basket shows 'Available'
7 - Apply patch
8 - Check the cart, should show as 'On hold'

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>
5 years agoBug 22743: Add password modal to overdrive results page
Nick Clemens [Fri, 19 Apr 2019 11:25:43 +0000 (11:25 +0000)]
Bug 22743: Add password modal to overdrive results page

This patch also removes a line abotu ratings which was throwing an error.
Confirm stars rating for OD results are still shown as expected

To test:
 1 - Enable overdrive circulation with password required
 2 - Sign in to OPAC but not overdrive
 3 - Perform a search that returns overdrive results
 4 - Click in to results page
     http://localhost:8080/cgi-bin/koha/opac-overdrive-search.pl?q=cats
 5 - Note 'Login to OverDrive account' link
 6 - Click it
 7 - Nothing happens!
 8 - Apply patch
 9 - Repeat
10 - Success!

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 22729: (RM follow-up) Correct column in schema addition
Nick Clemens [Thu, 25 Apr 2019 10:11:31 +0000 (10:11 +0000)]
Bug 22729: (RM follow-up) Correct column in schema addition

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22729: DBRev 18.12.00.061
Nick Clemens [Thu, 25 Apr 2019 10:09:09 +0000 (10:09 +0000)]
Bug 22729: DBRev 18.12.00.061

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22729: (QA follow-up) Ensure no NULL values before setting NOT NULL
Martin Renvoize [Thu, 25 Apr 2019 07:15:58 +0000 (08:15 +0100)]
Bug 22729: (QA follow-up) Ensure no NULL values before setting NOT NULL

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22729: Adapt /patrons controller code to the change
Tomas Cohen Arazi [Wed, 17 Apr 2019 18:06:44 +0000 (15:06 -0300)]
Bug 22729: Adapt /patrons controller code to the change

This patch makes the controller code aware of the flgAnonymized =>
anonymized change.

To test:
- Run
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22729: Adapt Koha::Patron(s) and tests
Tomas Cohen Arazi [Wed, 17 Apr 2019 18:03:25 +0000 (15:03 -0300)]
Bug 22729: Adapt Koha::Patron(s) and tests

This patch adapts the Koha::Patron(s) code to the column change.
To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22729: DB update
Tomas Cohen Arazi [Wed, 17 Apr 2019 18:01:47 +0000 (15:01 -0300)]
Bug 22729: DB update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22739: Test SelfCheckInTimeout <> 0, not just defined
Tomas Cohen Arazi [Fri, 19 Apr 2019 12:28:35 +0000 (09:28 -0300)]
Bug 22739: Test SelfCheckInTimeout <> 0, not just defined

On sci-main.pl the preference value is tested for 'defined'. This patch
tests it is different than empty string too. This was causing a
JavaScript syntax error, that made it display a wrong message.

To test:
1 - Blank the syspref SelfCheckInTimeout
2 - Attempt to checkin something via sci
=> FAIL: The 'Your request included no check-ins.' message is printed.
3 - Apply this patch, reload the sci-main.pl page
4 - Attempt to checkin something via sci
=> SUCCESS: The UI correctly stacks the scanned barcodes
5 - Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 16232: Fix edit as new in Rancor
Agustin Moyano [Tue, 23 Apr 2019 00:50:49 +0000 (00:50 +0000)]
Bug 16232: Fix edit as new in Rancor

When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.

To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
      => Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
        => Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
        => Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off

Sponsored-by: Carnegie
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 22723: Correct syntax error on confess call in Koha/MetadataRecord/Authority.pm
Fridolin Somers [Wed, 17 Apr 2019 11:58:57 +0000 (13:58 +0200)]
Bug 22723: Correct syntax error on confess call in Koha/MetadataRecord/Authority.pm

In Koha/MetadataRecord/Authority.pm the call to confess is missing string quotes.

It may generates this error :

Can't locate object method "confess" via package "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448.
" (perhaps you forgot to load "Empty String at /usr/share/perl5/MARC/File/XML.pm line 448.
"?) at /home/koha/src/Koha/MetadataRecord/Authority.pm line 186.

Simply missing double quotes.
Also missing use Carp to call confess.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22753: Fix tabs pointed out by QA script
Katrin Fischer [Wed, 24 Apr 2019 06:55:12 +0000 (06:55 +0000)]
Bug 22753: Fix tabs pointed out by QA script

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22753: Fix hold priority adjustment, move to top
Nick Clemens [Tue, 23 Apr 2019 18:03:33 +0000 (18:03 +0000)]
Bug 22753: Fix hold priority adjustment, move to top

Since the holds table can be split we need to calculate the
first priority for each table. However, currently we use the
first in the loop, not taking into account the waiting status.
This patchset sets the first_priority to the first non-found hold

Additionally, some clean-up is done to not display the alter
priority arrows for waiting holds.

To test:
1 - Place several holds on a title
2 - Confirm one of the holds to be waiting
3 - Attempt to move the last hold to the top
4 - Nothing happens
5 - Apply patch
6 - Note that the waiting hold has no options to move in the list
7 - Attempt to move the last hold to the top
8 - It moves as expected!
9 - Split the holds queue by pickup library
10 - PLace some holds for pickup at another branch
11 - Confirm moving these holds works within their own table
12 - Unsplit the queue
13 - Ensure the holds end where you expect (moving in a split
     table didn't move above holds form another table)

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>
5 years agoBug 22762: Fix items.collection display on receiving
Jonathan Druart [Wed, 24 Apr 2019 04:03:34 +0000 (00:03 -0400)]
Bug 22762: Fix items.collection display on receiving

Caused by
  commit 31c29fd31f557306233e6a2936148a5bb10b89a1
  Bug 21206: Replace C4::Items::GetItem

The log says: The method Koha::Item->collection is not covered by tests!

It has highlighted an older problem:
Since
  commit bb1e9c500c810402c64436c53bcc00ffb9a0b857
  Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
the "Collection code" is not filled correctly (items.collection vs items.ccode).

Test plan:
- Set acqcreateitem to "when placing an order"
- Receive an order with items
=> The "Collection code" column must be filled with the items.ccode value
- Edit an item (You may need the patches on bug 22669)
- Change the collection code value
=> The "Collection code" column must be filled with the new value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22751: Switch two-column templates to Bootstrap grid: Patron details
Owen Leonard [Mon, 22 Apr 2019 18:50:15 +0000 (18:50 +0000)]
Bug 22751: Switch two-column templates to Bootstrap grid: Patron details

This patch updates the patron details page template to use the Bootstrap
grid.

To test, apply the patch and view the detail page for a patron in the
staff client. Adjust the browser width and confirm that the page adapts
to different sizes.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21034: Re-indent circulation.tt
Owen Leonard [Tue, 23 Apr 2019 15:41:50 +0000 (15:41 +0000)]
Bug 21034: Re-indent circulation.tt

This patch reindents the template for the checkout page, circulation.tt:

- Trailing spaces removed
- Indentation changed to a consistent 4 spaces
- Markup indentation made more consistent

To test, view the checkout page under various circumstances:

- No card number submitted
- Name submitted (patron search results)
- Card number submitted
  - Restricted patron
  - Patron with circulation messages
  - On-site checkouts
  - Check all tabs: checkouts, relatives' checkouts holds, article
    requests, restrictions, clubs

HTML validation before and after the patch should return the same
results.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22418: (follow-up) OPAC changes
Nick Clemens [Mon, 22 Apr 2019 12:47:40 +0000 (12:47 +0000)]
Bug 22418: (follow-up) OPAC changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22418: Add magnifying glass to 655 results
Nick Clemens [Mon, 22 Apr 2019 12:39:08 +0000 (12:39 +0000)]
Bug 22418: Add magnifying glass to 655 results

To test:
1 - Have some 655 fields linked to authorities
2 - Notice they have no magnifyiung glass
3 - Apply patch
4 - Note they have one now

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>
5 years agoBug 22674: Change wording of payments in the GUI
Katrin Fischer [Tue, 9 Apr 2019 22:02:09 +0000 (00:02 +0200)]
Bug 22674: Change wording of payments in the GUI

This changes the different versions of "Payment, thanks"
to just read "Payment".

To test:
- Look at the Fines & Charges tables in
  - OPAC patron account > your fines
  - Staff patron account > Accounting > Transactions tab
  - Staff patron account > Accounting > Make a payment tab
- Verify all tables display the descriptions correctly
- Decide if you like this better than before
  Yes: sign-off
  No: comment on the bug please

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 21784: Clean up js_includes.inc
Owen Leonard [Wed, 7 Nov 2018 18:55:57 +0000 (18:55 +0000)]
Bug 21784: Clean up js_includes.inc

This patch cleans up js_includes.inc by removing script "type"
attributes which are now invalid HTML. The patch also removes "CDATA"
markers from script blocks. They have been unnecessary since we stopped
using an XHTML doctype.

To test, apply the patch and look at various pages in the staff client
to confirm that no JavaScript-driven interactions are broken.

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>
5 years agoBug 22696: Prefetch items too
Tomas Cohen Arazi [Mon, 22 Apr 2019 13:20:17 +0000 (10:20 -0300)]
Bug 22696: Prefetch items too

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22696: (follow-up) Use new relationship for prefetching
Tomas Cohen Arazi [Fri, 19 Apr 2019 14:29:49 +0000 (11:29 -0300)]
Bug 22696: (follow-up) Use new relationship for prefetching

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22696: Simplify visibility logic in opac-ISBDdetail.pl
Tomas Cohen Arazi [Fri, 12 Apr 2019 18:22:30 +0000 (15:22 -0300)]
Bug 22696: Simplify visibility logic in opac-ISBDdetail.pl

This patch removes many DB queries and uses state-of-the-art Koha code
to accomplish the same things it did before.

To test:
- Apply this patch
- Open opac-ISBDdetail.pl for a known record
=> SUCCESS: No behaviour change.
- Sign off :-D

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22701: Make items prefetchable from Koha::Biblio
Tomas Cohen Arazi [Mon, 22 Apr 2019 13:08:41 +0000 (10:08 -0300)]
Bug 22701: Make items prefetchable from Koha::Biblio

This patch makes Koha::Biblio->items use _new_from_dbic instead of
calling Koha::Items->search. This allows calling it with prefetch
enabled for the items relationship. No noticeable behaviour change takes
place besides this.

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22701: Unit tests for Koha::Biblio->items
Tomas Cohen Arazi [Sat, 20 Apr 2019 12:47:43 +0000 (09:47 -0300)]
Bug 22701: Unit tests for Koha::Biblio->items

This patch adds tests fr the current items() implementation. The idea is
to verify no behaviour change takes place after we make it us
_new_from_dbic instead of calling Koha::Items->search.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22694: Add Koha::Patron::Category->override_hidden_items
Martin Renvoize [Tue, 23 Apr 2019 14:49:28 +0000 (15:49 +0100)]
Bug 22694: Add Koha::Patron::Category->override_hidden_items

This patch introduces a method to determine for a given category if
patrons belonging to it override OpacHiddenItems policies.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patron/Category.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22694: Unit tests
Tomas Cohen Arazi [Fri, 12 Apr 2019 13:42:30 +0000 (10:42 -0300)]
Bug 22694: Unit tests

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22700: Make biblio_metadata prefetchable from Koha::Biblio
Tomas Cohen Arazi [Fri, 12 Apr 2019 16:46:04 +0000 (13:46 -0300)]
Bug 22700: Make biblio_metadata prefetchable from Koha::Biblio

This patch makes $biblio->metadata be prefetchable as the Coding
guidelines require.

A new has_one relationship is added in the Biblio schema, named as the
accessor to also convey to proposed guidelines for readability.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: No regressions!
- Sign off :-D

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>
5 years agoBug 22748: Pass userid to haspermission
Nick Clemens [Mon, 22 Apr 2019 15:05:51 +0000 (15:05 +0000)]
Bug 22748: Pass userid to haspermission

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22755: Fix pod in patron_emailer.pl
Josef Moravec [Tue, 23 Apr 2019 07:38:14 +0000 (07:38 +0000)]
Bug 22755: Fix pod in patron_emailer.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22755: Import Koha::Script into patron_emailer cronjob
Josef Moravec [Tue, 23 Apr 2019 07:34:41 +0000 (07:34 +0000)]
Bug 22755: Import Koha::Script into patron_emailer cronjob

Test plan:
Run patron_emailer.pl cronjob to ensure it is not broken after this
patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems
Tomas Cohen Arazi [Mon, 22 Apr 2019 15:02:02 +0000 (12:02 -0300)]
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems

This patch makes Koha::Item->hidden_in_opac take hidelostitems into
account when performing the calculation.

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail because the code doesn't (yet) care about the
syspref
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 22749: Regression tests for Koha::Item->hidden_in_opac
Tomas Cohen Arazi [Mon, 22 Apr 2019 14:54:21 +0000 (11:54 -0300)]
Bug 22749: Regression tests for Koha::Item->hidden_in_opac

This patch introduces regression tests for Koha::Item->hidden_in_opac to
verify it is not considering the hidelostitems syspref when determining
if an item should be hidden (per policy) in the OPAC.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!

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>
5 years agoBug 22735: Resolve internal server error on missing item type
Marcel de Rooy [Fri, 19 Apr 2019 06:49:48 +0000 (06:49 +0000)]
Bug 22735: Resolve internal server error on missing item type

Trivial fix, similar to opac-detail, applied to ISBD and MARC detail.

Test plan:
Enable ArticleRequests pref.
Make sure you have a biblio with no item type in 942c. (Perhaps you need to
make 942c not mandatory temporarily and save a biblio record without this
field being filled.)
If you are logged in, log out.
Go to MARC or ISBD detail page. No crash anymore?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 22679: Delete related CirculationRules when Removing IssuingRule
Nick Clemens [Tue, 23 Apr 2019 14:17:58 +0000 (14:17 +0000)]
Bug 22679: Delete related CirculationRules when Removing IssuingRule

Unfortunately, the tables here can't use a foreign key as one table uses null where the other uses
'*' This patchset alters the delete method so delete related rules. It is somewhat of a workaround until
all the columns in issuingrules are moved to circulation_rules

To test:
1 - Add some issuing rules in koha, making sure to set maxissueqty
2 - Check the DB: SELECT * FROM circulation_rules;
3 - note some circulation rules were created
4 - Delete your rules via the staff interface
5 - Check the DB, the circulation rules remain
6 - Apply patch
7 - Repeat
8 - Huzzah! The rules delete!
9 - Prove the tests, read the code

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>
5 years agoBug 22759: Fix wrong check of branch rule in C4::Circulation::TooMany
Nick Clemens [Tue, 23 Apr 2019 16:18:51 +0000 (16:18 +0000)]
Bug 22759: Fix wrong check of branch rule in C4::Circulation::TooMany

The condition in TooMany applied branch limits only if the rule didn't have a branchcode, this was wrong

To test:
 1 - Find a title in the catalog, add 8 items, all of a single itemtype, 4 for branch A, four for branch B
 2 - Remove any specific circ rules
 3 - Set a default circ rule for the itemtype used above, limiting the max issue quantity to 3
 4 - Find a patron and checkout the items from branch A
 5 - You should be allowed to checkout 3, but the fourth should trigger 'too many'
 6 - Now checkout the items from branch B, again you can checkout 3 and not four
 7 - Apply this patch
 8 - Assuming you have 6 items out now, try one from either branch, you should trigger 'too many' and have 6
 9 - Return two from branch B and one from branch A
10 - Now you have three items issued total
11 - An item from either branch should be refused now
12 - Test with different values of 'CircControl' and confirm your expectations are met

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>
5 years agoBug 22759: Unit tests
Nick Clemens [Tue, 23 Apr 2019 16:17:20 +0000 (16:17 +0000)]
Bug 22759: Unit tests

To test:
1 - Apply only this patch
2 - prove -v t/db_dependent/Circulation/TooMany.t
3 - It fails
4 - Apply second path
5 - repeat
6 - All green!

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>
5 years agoBug 22501: (follow-up) Use raw filter for course note on details page
Nick Clemens [Thu, 18 Apr 2019 16:35:03 +0000 (16:35 +0000)]
Bug 22501: (follow-up) Use raw filter for course note on details page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22564: DBRev 18.12.00.060
Nick Clemens [Fri, 19 Apr 2019 14:51:08 +0000 (14:51 +0000)]
Bug 22564: DBRev 18.12.00.060

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22564: (QA follow-up) Correct copy-paste message
Marcel de Rooy [Fri, 19 Apr 2019 09:53:53 +0000 (09:53 +0000)]
Bug 22564: (QA follow-up) Correct copy-paste message

We should be replacing Rep here ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22564: Add UI handling for 'Replaced'
Martin Renvoize [Fri, 29 Mar 2019 13:35:27 +0000 (13:35 +0000)]
Bug 22564: Add UI handling for 'Replaced'

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22564: Add database update 'just in case'
Martin Renvoize [Fri, 29 Mar 2019 12:20:26 +0000 (12:20 +0000)]
Bug 22564: Add database update 'just in case'

With the introduction of the 'status' field it's a clear oportunity to
convert any last remaining instances of 'Rep' to 'L' + 'REPLACED'.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22564: Remove references to 'Rep' accounttype
Martin Renvoize [Fri, 22 Mar 2019 15:49:13 +0000 (15:49 +0000)]
Bug 22564: Remove references to 'Rep' accounttype

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22464: Pass forward parameters
Andrew Isherwood [Wed, 6 Mar 2019 14:07:50 +0000 (14:07 +0000)]
Bug 22464: Pass forward parameters

This patch ensures that parameters that are present are passed forward
when accepting the copyright notice.

Test plan:

- Clone the latest version of the FreeForm backend from:
  https://github.com/PTFS-Europe/koha-ill-freeform
- Ensure the ILLModuleCopyrightClearance syspref is populated
- Create an OpenURL in order to pre-populate the FreeForm form, a suitable URL would be:

<your_koha_instance>/cgi-bin/koha/opac-illrequests.pl?openurl=true&backend=FreeForm&method=create&opac=1&atitle=Theater%20careers.%20%5Belectronic%20resource%5D%20%3A%20a%20realistic%20guide.&aulast=Donahue%2C%20Tim&date=2012&genre=article&isbn=978123123123&issn=1234-5678&issue=34&pages=12-34&sid=EBSCO%3AAthlone%20Institute%20of%20Technology%3Aait.101326&title=article%20title%20here&volume=12

- Log in
- Accept the copyright notice
=> TEST: Observe that the FreeForm form is pre-filled with the metadata
supplied in the OpenURL

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>
5 years agoBug 21783: Reindent admin/columns_settings.tt
Owen Leonard [Wed, 7 Nov 2018 17:18:00 +0000 (17:18 +0000)]
Bug 21783: Reindent admin/columns_settings.tt

This patch reindents admin/columns_settings.tt to use four spaces
instead of two for indentation, following coding guidelines.

To test, apply the patch and compare the file to master using the -w
flag to ignore whitespace. The only changes should appear where lines
were added during indentation.

Go to Admin -> Columns settings and confirm that everything works
correctly.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22687: Typo correction for Portuguese manual link
Martin Renvoize [Thu, 11 Apr 2019 09:32:52 +0000 (10:32 +0100)]
Bug 22687: Typo correction for Portuguese manual link

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 16149: Generate and send custom notices based on report output
Nick Clemens [Mon, 17 Apr 2017 15:20:25 +0000 (11:20 -0400)]
Bug 16149: Generate and send custom notices based on report output

Ths patch add an EmailReport function to C4::Reports::Guided

It accepts a notice (module, code, branch) and a report and attempts to
email notices to patron, generating content using report content.

Notice must be in template toolkit syntax, only columns in report are
available for notice.

To test:
1 - Specify various options
2 - Ensure errors are returned if options are incomplete or incorrect
3 - Pass a report containing 'from' and 'email' and 'borrowernumber'
columns and ensure message queue populated as expected

Signed-off-by: Jessica Ofsa <jofsa@vt.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 16149: Unit tests
Nick Clemens [Fri, 12 May 2017 21:13:07 +0000 (17:13 -0400)]
Bug 16149: Unit tests

To test:
prove -v t/db_dependent/Reports/Guided.t

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jessica Ofsa <jofsa@vt.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22649: Add itemtype to item search results and CSV file
Katrin Fischer [Sat, 6 Apr 2019 12:42:39 +0000 (12:42 +0000)]
Bug 22649: Add itemtype to item search results and CSV file

The itemtype can be searched for in the item search form, but
it is not displayed in the result list.
This patch adds the itemtype to the display and the CSV export
file.

To test:
- Try different item searches
- Verify that the itemtype now shows in the result list
- Export to CSV
- Verify that the itemtype shows there correctly as well

Signed-off-by: Axel Amghar <axel.amghar@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22174: Add link to help page for API key management
Katrin Fischer [Tue, 12 Mar 2019 11:19:35 +0000 (11:19 +0000)]
Bug 22174: Add link to help page for API key management

Makes the help link on the API key management page point
to the proper section in the Koha manual.

To test:
- Activate RESTOAuth2ClientCredentials system preference
- Go to any patron account
- Go to More > Manage API keys
- Click on the Help link in top right corner
- Verify that the right section of the Koha manual displays

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>
5 years agoBug 21937: Syspref autoBarcode annual doesn't increment properly barcode
Frédéric Demians [Mon, 3 Dec 2018 17:02:03 +0000 (18:02 +0100)]
Bug 21937: Syspref autoBarcode annual doesn't increment properly barcode

This patch fix the barcode annual builder. The test should pass.

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>
5 years agoBug 21937: Add test to show autoBarcode annual increment bug
Frédéric Demians [Mon, 3 Dec 2018 17:27:08 +0000 (18:27 +0100)]
Bug 21937: Add test to show autoBarcode annual increment bug

This patch show the issue. If the DB contains a barcode (not auto attributed
by Koha) which begin with the year used to generate automatically a new one,
there may be a 'collision'.

prove -v t/db_dependent/Barcodes_ValueBuilder.t

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>
5 years agoBug 15505: Mark Hold Items 'On hold' instead of 'Available'
Nick Clemens [Tue, 27 Dec 2016 17:07:20 +0000 (17:07 +0000)]
Bug 15505: Mark Hold Items 'On hold' instead of 'Available'

This patch adds a 'pending hold' column to C4::Items:GetItemsInfo to
allow for displaying status of an item when it has been selected for a
hold by the holdsqueue and AllowItemsOnHoldCheckout is set to 'Don't
allow'

To test:
00 - Set AllowItemsOnHoldCheckout to 'Allow'
01 - Place a hold on an item
02 - Build the holdsqueue (kohadevbox example below)
      sudo koha-shell kohadev
      perl misc/cronjobs/holds/build_holds_queue.pl
03 - Search for the item on the OPAC
04 - Note item shows as 'Available' in results and details
05 - Toggle AllowItemsOnHOldCheckout to 'Don't allow'
06 - Repeat search, note there is no change
06 - Apply Patch
07 - Search for the item on the OPAC
08 - Note that item now shows as 'Pending hold'
09 - Toggle AllowItemsOnHoldCheckout to Allow
10 - Note item shows as available
11 - prove -v t/db_dependent/Items.t

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>
5 years agoBug 21307: (follow-up) QA fixes
Owen Leonard [Mon, 11 Mar 2019 13:18:06 +0000 (13:18 +0000)]
Bug 21307: (follow-up) QA fixes

This patch corrects a couple of issues discovered by QA: Removed markup
copy-and-paste error; Add some CSS to help the responsive behavior of
the advanced editor controls at smaller browser widths.

To test, apply the patch and open the advanced MARC editor. Test the
appearance of the page at various browser widths. At narrower widths the
status bar and search fields should behave well.

Signed-off-by: Michal Denar <black23@gmail.com>
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>
5 years agoBug 21307: (follow-up) Change the way Codemirror height is calculated
Owen Leonard [Tue, 5 Mar 2019 14:53:18 +0000 (14:53 +0000)]
Bug 21307: (follow-up) Change the way Codemirror height is calculated

This follow-up changes the way the height of the Codemirror editor is
calculated. Using offset() instead of position() returns the correct
values with the changed markup.

To test, apply the patch and load the advanced MARC editor. The "status
bar" should display correctly a the bottom of the editor and there
should be no double scrollbar.

Signed-off-by: Michal Denar <black23@gmail.com>
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>
5 years agoBug 21307: Switch two-column templates to Bootstrap grid: Cataloging
Owen Leonard [Mon, 11 Mar 2019 14:25:27 +0000 (14:25 +0000)]
Bug 21307: Switch two-column templates to Bootstrap grid: Cataloging

This patch modifies two cataloging 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:

 - Cataloging -> Edit record using the advanced editor
 - Cataloging -> Edit items

Signed-off-by: Michal Denar <black23@gmail.com>
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>
5 years agoBug 22584: Add YAML support for Codemirror
Owen Leonard [Wed, 27 Mar 2019 13:16:34 +0000 (13:16 +0000)]
Bug 22584: Add YAML support for Codemirror

This patch adds the dependencies required to provide YAML syntax
highlighting in CodeMirror text areas. The OpacHiddenItems system
preference configuration is updated to use a "text/x-yaml" CodeMirror
syntax.

To test, apply the patch and go to Administration -> System preferences
-> OPAC.

Expand the OpacHiddenItems preference and test that YAML-formatted text
entry has the correct syntax highlighting.

Signed-off-by: Michal Denar <black23@gmail.com>
https://bugs.koha-community.org/show_bug.cgi?id=2700

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22697: Reindent catalogue/result.tt
Owen Leonard [Fri, 12 Apr 2019 14:32:46 +0000 (14:32 +0000)]
Bug 22697: Reindent catalogue/result.tt

This patch reindents the template for staff client catalogue search
results. The only non-whitespace changes are comments to help identify
closing tags and template directives.

To test, apply the patch and perform a catalog search in the staff
client. The results should look correct.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines and added comments.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=22679

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22365: Removing warn when accessing Log Viewer
Aleisha Amohia [Tue, 19 Feb 2019 01:36:14 +0000 (01:36 +0000)]
Bug 22365: Removing warn when accessing Log Viewer

To test:
Go to Tools -> Log Viewer and confirm the warn no longer shows after
applying the patch.

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>
5 years agoBug 21942: Clean up cataloging merge template
Owen Leonard [Tue, 4 Dec 2018 15:32:17 +0000 (15:32 +0000)]
Bug 21942: Clean up cataloging merge template

This patch makes a few minor markup corrections to the cataloging merge
template:

 - Remove invalid "type" attributes from <style> and <script>
 - Add missing closing </span>
 - Remove obsolete YUI grid markup

To test, apply the patch and test the process of merging records in
Cataloging. Everything should look correct and work correctly.
Validating the HTML source should return no errors stemming from the
template.

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>
5 years agoBug 21308: Results from order search do not show the search parameters
Owen Leonard [Fri, 22 Feb 2019 13:26:01 +0000 (13:26 +0000)]
Bug 21308: Results from order search do not show the search parameters

This patch modifies the orders search results page so that the search
form appears in the sidebar. This allows the user to view and re-use
their search parameters.

This patch also moves the "no search results" message to the top of the
page in a message box.

To test, apply the patch and go to Acquisitions -> Orders search.

 - Perform a search which will return results. In the sidebar you should
   see the full orders search form with your search parameters in the
   form fields.

 - Perform a search which will return no results. You should see the
   "Your search returned no results." message in a standard message
   dialog.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoRevert "Bug 15253: Add Koha::Logger based logging for SIP2"
Nick Clemens [Thu, 18 Apr 2019 17:57:51 +0000 (17:57 +0000)]
Revert "Bug 15253: Add Koha::Logger based logging for SIP2"

This reverts commit 03c03ed8cdb94cda4cfd661e3b04f97cb36d8dc4.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoRevert "Bug 15253: (follow-up) Fix qa complaints"
Nick Clemens [Thu, 18 Apr 2019 17:57:41 +0000 (17:57 +0000)]
Revert "Bug 15253: (follow-up) Fix qa complaints"

This reverts commit 9d80f9dc6b7d87bdf2e1536647a0bc8530465bd7.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German
Katrin Fischer [Tue, 18 Dec 2018 23:19:07 +0000 (00:19 +0100)]
Bug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German

To test:
- Apply patch
- Run the German web installer
- Verify the sample notices installs without error
- Verify it looks 'German' in the GUI :)

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>
5 years agoBug 21545: Translate 'Stock rotation slip'
Katrin Fischer [Tue, 18 Dec 2018 23:06:55 +0000 (00:06 +0100)]
Bug 21545: Translate 'Stock rotation slip'

Throwing in some capitalization fixes for the English
version of the notice as well.

To test:
- Verify the changes make sense and the SQL is still valid
  and executes

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>
5 years agoBug 19619: Add support for SIP2 field CM ( Hold Pickup Date ) to Koha
Kyle M Hall [Tue, 8 Jan 2019 15:40:21 +0000 (10:40 -0500)]
Bug 19619: Add support for SIP2 field CM ( Hold Pickup Date ) to Koha

The CM field was all set up for implementation, but never completed.
We should fully implement the CM ( Hold Pickup Date ), which according
to the SIP2 protocol specification is "The date that the hold expires".

Test Plan:
1) Set up a waiting hold for an item
2) Using the sip cli emulator, send an item information request for that item
3) Note the CM field does not show up
4) Apply this patch
5) Restart all the things!
6) Repeat the item information request
7) Note the CM field is now transmitted!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15253: (follow-up) Fix qa complaints
Nick Clemens [Thu, 18 Apr 2019 11:54:07 +0000 (11:54 +0000)]
Bug 15253: (follow-up) Fix qa complaints

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15253: Add Koha::Logger based logging for SIP2
Kyle M Hall [Tue, 1 May 2018 11:47:12 +0000 (11:47 +0000)]
Bug 15253: Add Koha::Logger based logging for SIP2

Now that we have Koha::Logger, we should use it in our SIP server. This
has the potential to make debugging SIP issue much easier. We should add
the userid for the sipuser to the namespace so we can allow for separate
files per sip user if wanted.

Also modifies the log4perl.conf to lazy-open filehandles to log files,
so the same config can be used with log-files needing different
permissions.

Test Plan:
1) Apply this patch set
2) Update the modififed log4perl.conf to your system
3) Restart your sip server
4) Tail your sip2.log, run some queries
5) Note you still get the same output messages as before, with the
   addition of the ip address and username ( if available )
   prefixing the message.

Based on original patches by Kyle Hall and additions by Olli-Antti
Kivilahti.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22645: Add 'ISSN' sarch option to OPAC simple search pull down
Katrin Fischer [Sat, 6 Apr 2019 11:25:01 +0000 (11:25 +0000)]
Bug 22645: Add 'ISSN' sarch option to OPAC simple search pull down

To test:
- Apply patch
- Verify that the ISSN option shows up in the pull down
  for the simple search on top of the OPAC
- Search for an ISSN with the new search option
- Verify the correct search result shows

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22175: (follow-up) Identify columns to exclude from export
Owen Leonard [Thu, 11 Apr 2019 18:49:13 +0000 (18:49 +0000)]
Bug 22175: (follow-up) Identify columns to exclude from export

Bug 21216 added a way to designate DataTables columns to include in
export operations (Copy, CSV, print, etc). However, this solution did
not take hidden columns into account. This patch revises the global
columns configuration settings so that exports will include only visible
columns and will exclude columns with a "noExport" class on the <th>.

To test, apply the patch and clear your browser cache if necessary.

 - Go to Tools -> Stock rotation
 - In the table of rotas, hide some columns in the table and verify that
   export operations include only your visible selections, excluding the
   last column with buttons.
 - Choose a rota and select Manage -> Items. Test that this table works
   in the same way.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22175: Make stock rotation table sortable
Owen Leonard [Fri, 25 Jan 2019 14:02:01 +0000 (14:02 +0000)]
Bug 22175: Make stock rotation table sortable

This patch adds sorting and column configuration to the stock
rotation tables, both rotas and items. No new defaults for the table are
defined.

To test, apply the patch and clear your browser cache if necessary.

 - Go to Tools -> Stock rotation.
   - In the table of rotas test that sorting works correctly.
   - Test that the "Column visibility" button works to show and hide
     columns. The "actions" column should be excluded.
   - Test that export options (Excel, CSV, etc) exclude the "actions"
     column.
   - Choose a rota with multiple items on it and select manage ->
     items. Repeat the above DataTables functionality tests.

 - Go to Administration -> Columns settings and edit the default
   configuration of the stock rotation tables. Confirm that these
   changes are reflected in the corresponding tables.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22532: DBRev 18.12.00.059
Nick Clemens [Thu, 18 Apr 2019 10:51:21 +0000 (10:51 +0000)]
Bug 22532: DBRev 18.12.00.059

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22532: Database update
Josef Moravec [Mon, 18 Mar 2019 16:48:51 +0000 (16:48 +0000)]
Bug 22532: Database update

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>
5 years agoBug 22532: Remove Z39.50 random
Josef Moravec [Mon, 18 Mar 2019 16:46:00 +0000 (16:46 +0000)]
Bug 22532: Remove Z39.50 random

Test plan:
Try to search, preview and import authority from Z39.50, everything
should work as expected

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>
5 years agoBug 22521: (RM follow-up) Adjust tests to use new accounttype
Nick Clemens [Thu, 18 Apr 2019 10:32:32 +0000 (10:32 +0000)]
Bug 22521: (RM follow-up) Adjust tests to use new accounttype

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22318: DBRev 18.12.00.058
Nick Clemens [Thu, 18 Apr 2019 10:08:58 +0000 (10:08 +0000)]
Bug 22318: DBRev 18.12.00.058

This includes DBRev 18.12.00.057 for bug 13795

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22318: (QA follow-up) Correct name of atomicupdate
Martin Renvoize [Mon, 8 Apr 2019 09:28:38 +0000 (10:28 +0100)]
Bug 22318: (QA follow-up) Correct name of atomicupdate

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22318: (follow-up) Add new options to new table filter form
Owen Leonard [Tue, 19 Mar 2019 13:39:39 +0000 (13:39 +0000)]
Bug 22318: (follow-up) Add new options to new table filter form

This patch adds the new language/location options to the form for
filtering entries in the table of news items. Since this markup is
duplicated twice in the template, its contents have been moved to a
BLOCK.

To test, apply the patch and go to Tools -> News. At the top of the
table of news items the "Display location" form should show all options
including OpacNavRight for all your enabled languages.

Confirm that location/language selection still works correctly upon
adding and editing news items.

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>
5 years agoBug 22318: Example implementation: OpacNavRight system preference
Owen Leonard [Thu, 14 Feb 2019 15:49:25 +0000 (15:49 +0000)]
Bug 22318: Example implementation: OpacNavRight system preference

This patch implements a Koha news system replacement of the OpacNavRight
system preference. The changes to koha-news.tt enable the selection of
"OpacNavRight" as a location for the content. opac-main.pl is modified
to ensure that the user's selected language is passed to the template
for use by the KohaNews plugin.

The database update process takes the contents of Koha's OpacNavRight
system preference and adds it to the Koha news system. The OpacNavRight
system preference is then removed from the database.

When the new entry is added to Koha news, the language is set based on
the top selected language in the "opaclanguages" preference. The entry
is added to "All libraries" without an author, title, or expiration
date.

Note that this patch doesn't change the way OPAC news is displayed. I
think it's best to keep existing markup and code for that since it
handles details like branch selection and RSS.

To test, apply the patch and run the database update.

 - In the staff client go to Tools -> News and confirm that there is now
   an entry with the location "OpacNavRight_en" (assuming an "en"
   English interface).
 - Confirm that the previous contents of OpacNavRight were added
   correctly.
 - Go to Administration -> System preferences -> OPAC and verify that
   the OpacNavRight preference has been removed.
 - In the OPAC, confirm that the correct content is displayed in the
   region previously defined in the OpacNavRight system preference.
 - Test that the language and library-specific nature of news items is
   reflected in the behavior of this content area:
   - Define different text based on language and location. Confirm that
     switching translations and logging in to the OPAC both trigger the
     correct display of different content.

Signed-off-by: Michal Denar <black23@gmail.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>
5 years agoBug 22318: Extend Koha news feature to include other content areas
Owen Leonard [Thu, 14 Feb 2019 15:46:24 +0000 (15:46 +0000)]
Bug 22318: Extend Koha news feature to include other content areas

This patch lays the groundwork for using the Koha news tool to replace
OPAC system preferences which embed HTML content in the Koha interface.
This will allow multiple translations of these content blocks to be
created.

This adds a new template plugin, KohaNews. It has a single subroutine,
get(), which takes three parameters:

 - "location" -- the area of the template where the content will appear.
   This will correspond to the system preference it replaces:
   OpacMainUserBlock, OpacNavRight, etc.
 - "lang" -- the user's currently-selected language.
 - "library" -- the user's home library (if they are logged in)

A new "koha_news_block" block is added to the OPAC templates'
html_helpers include. The content area is activated in the template
using this syntax:

[% PROCESS koha_news_block news => KohaNews.get( location =>
"OpacNavRight", lang => news_lang, library => branchcode ) %]

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.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>
5 years agoBug 6730: Rename 'basket' filter to 'basket name' on receive page
Katrin Fischer [Tue, 9 Apr 2019 22:33:48 +0000 (00:33 +0200)]
Bug 6730: Rename 'basket' filter to 'basket name' on receive page

This way it's clear that you can search for the name here, but
not for the number. It also matches the labelling of the
other filter: Basket group name below.

To test:
- Receive shipment
- Enter invoice number and go to receive page
- Look at the filters on the left
- Confirm the changed label and that basket name is searched

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>
5 years agoBug 13795: Remove occurences of unused columns in code
Josef Moravec [Wed, 20 Mar 2019 15:29:32 +0000 (15:29 +0000)]
Bug 13795: Remove occurences of unused columns in code

These patch removes these two columns from backfill_statstics script
and from columns.def - this file is used to create description in guided
reports

Test plan:
1. Run installer/data/mysql/backfull_statistics.pl
--> without this patch, there are associatedborrower and usercode errors
reported
--> with patch, these two columns are not reported

Signed-off-by: Michal Denar <black23@gmail.com>
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>
5 years agoBug 13795: Make database update idempotent
Josef Moravec [Wed, 20 Mar 2019 15:26:38 +0000 (15:26 +0000)]
Bug 13795: Make database update idempotent

Signed-off-by: Michal Denar <black23@gmail.com>
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>