]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 14576: (QA follow-up) Tidy up feature documentation
Liz Rea [Wed, 27 Mar 2019 23:56:51 +0000 (23:56 +0000)]
Bug 14576: (QA follow-up) Tidy up feature documentation

To test:
Apply this patch with all of the others
run the updatedatabase, it should work
install a new Koha, this pref should be installed and look fine in the
interface.
Check the syspref, make sure the text looks ok and makes sense.

Bonus points:
for checking to make sure PROC: _PERM_ appears in the new
pereference if InProcessingToShelvingCart was set
for checking to make sure _ALL_: CART appears in the new preferenec if ReturnToShelvingCart was previously set.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: (follow-up) Using item objects, not hashrefs
Nick Clemens [Wed, 27 Mar 2019 11:36:47 +0000 (11:36 +0000)]
Bug 14576: (follow-up) Using item objects, not hashrefs

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 14576: Replaced calls using deprecated method GetItem with Koha::Items->find
Hayley Mapley [Tue, 26 Mar 2019 23:16:20 +0000 (12:16 +1300)]
Bug 14576: Replaced calls using deprecated method GetItem with Koha::Items->find

Test plan:
1) Apply all patches except this one
2) Checkout out an item to a patron
3) Check the item in - note that this will fail
4) Apply this patch, and repeat steps 1-3, noting instead that the the
check is instead successful
5) Verify also that reserves act as expected
5) Sign off

Sponsored-by: Catalyst IT
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 14576: Rebase fixes Fix test Rebase code
Nick Clemens [Wed, 20 Mar 2019 15:46:26 +0000 (15:46 +0000)]
Bug 14576: Rebase fixes Fix test Rebase 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 14576: (follow-up) fix some typos and style
Nick Clemens [Wed, 20 Feb 2019 18:45:44 +0000 (18:45 +0000)]
Bug 14576: (follow-up) fix some typos and style

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 14576: Update to use get_yaml_pref_hash
Nick Clemens [Wed, 12 Dec 2018 13:30:11 +0000 (13:30 +0000)]
Bug 14576: Update to use get_yaml_pref_hash

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 14576: Unit tests
Nick Clemens [Wed, 4 Oct 2017 15:21:57 +0000 (15:21 +0000)]
Bug 14576: Unit tests

To test:
1 - prove -v t/db_dependent/Circulation/Returns.t
2 - prove -v t/db_dependent/Circulation/issue.t
3 - prove -v t/db_dependent/UsageStats.t
4 - All should pass

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@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>
5 years agoBug 14576: Allow arbitrary automatic update of location on checkin
Nick Clemens [Wed, 4 Oct 2017 15:19:26 +0000 (15:19 +0000)]
Bug 14576: Allow arbitrary automatic update of location on checkin

This patch adds a new syspref "UpdateItemLocationOnCheckin" which
accepts pairs of shelving locations.  On check-in the items location is
compared ot the location on the left and, if it matches, is updated to
the location on the left.

This preference replaces ReturnToShelvingCart and
InProcessingToShelvingCart preferences.  The update statement should
insert values that replciate these functions.  Note existing
functionality of all items in PROC location being returned to
permanent_location is preserved by default.  Also, any items issued from
CART location will be returned to their permanent location on issue (if
it differs)

Special values for this pref are:
_ALL_ - used on left side only to affect all items
_BLANK_ - used on either side to match on/set to blank (actual blanks
        will work, but this is an easier to read option)
_PERM_ - used on right side only to return items to permanent location

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Set the new system preference UpdateitemLocationOnCheckin
   to the following (assuming sample data):
   NEW: FIC
   FIC: GEN
4) Create an item, set its location to NEW
5) Check in the item, note its location is now FIC
6) Check in the item again, note its location is now GEN
7) Check in the item again, note its location remains GEN
8) Test using _ALL_, _BLANK_ and _PERM_ for updates
9) Try entering various incorrect syntax in the pref and note you are warned

Sponsored by:
    Arcadia Public Library (http://library.ci.arcadia.ca.us/)
    Middletown Township Public Library (http://www.mtpl.org/)
    Round Rock Public Library (https://www.roundrocktexas.gov/departments/library/)

Signed-off-by: Michal Denar <black23@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>
5 years agoBug 22764: Change marcfield to MARC field in alert message
Katrin Fischer [Wed, 24 Apr 2019 23:42:45 +0000 (23:42 +0000)]
Bug 22764: Change marcfield to MARC field in alert message

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22764: More YUI grid cleanup
Owen Leonard [Wed, 24 Apr 2019 13:19:38 +0000 (13:19 +0000)]
Bug 22764: More YUI grid cleanup

This patch cleans up a few places where templates still contain YUI grid
markup. Some other minor markup problems are also fixed.

 - additional-fields.tt:
   - Converts YUI grid to Bootstrap
   - Replaces obsolete <tt> tag with styled <span>
   - Adds _() function to string in embedded JavaScript

 - detail.tt:
   - Fixes some stray YUI grid classes
   - Fixes corresponding JavaScript to enable page adjustments

 - moredetail.tt:
   - Removes unnecessary YUI grid markup

To test, apply the patch and view the affected pages, confirming that
everything looks correct and that the page adjusts well to various
browser widthds.

When testing the bibliographic detail page, enable AmazonCoverImages and
view a record with and without an Amazon cover image. The layout should
work in both cases.

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 22664: More making acquisitions links more easily clickable
Liz Rea [Wed, 17 Apr 2019 05:20:23 +0000 (05:20 +0000)]
Bug 22664: More making acquisitions links more easily clickable

To test:

* create a basket with an order from a staged record, and an order from
a suggestion
* add that basket to a basket group when you close it.
* note that the links to the basket in the first column, the link to the
basket group in the second column, and the link to
the suggester in the summary column are very small (only the ID# is
linked)
* apply this patch, restart the things
* refresh the page, note that the previously ogled links are now bigger
and easier to find and click, and that the links work and such
* rejoice.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22664: Link names in order search results instead of numbers
Liz Rea [Mon, 8 Apr 2019 19:00:01 +0000 (19:00 +0000)]
Bug 22664: Link names in order search results instead of numbers

To test:
Make up some orders, put some in basket groups.
Search for your vendor's orders, note that the only thing linking to the
order is a tiny number in parentheses.
Apply this patch, restart the things.
Refresh the results, note that te basket names *and* numbers are linked
now.
Rejoice.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22734: Fund not marked as mandatory when ordering from a staged file
Owen Leonard [Thu, 18 Apr 2019 14:22:35 +0000 (14:22 +0000)]
Bug 22734: Fund not marked as mandatory when ordering from a staged file

This patch does some refactoring of JavaScript to make handling of
required fields more robust. It also moves some template JavaScript to
the footer and some to a separate file.

A fallback "pattern" attribute is added to the quantity field, requiring
0-9+ values.

The "required" property of the funds dropdown is now dependent on the
value set under the "Default accounting details" tab. If a default is
selected, the individual item funds are preselected and not marked
required.

To test, apply the patch and begin the process of ordering from a staged
file.

 - Select all items to import.
   - Under each item, the fund should be marked mandatory.
   - The quantity field should accept only numbers.
   - Select the "Default accounting details" tab and select a default
     fund.
     - Return to the "Select to import" tab. Your selected default fund
       should now be preselected under each item. The fund should no
       longer be marked required.

       Un-selecting a default fund should result in each item fund
       select becoming required.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20692: Extreme toggle checking for plack
Mark Tompsett [Mon, 28 May 2018 16:45:29 +0000 (16:45 +0000)]
Bug 20692: Extreme toggle checking for plack

TEST PLAN
---------
sudo koha-plack --disable
sudo koha-plack --disable
sudo koha-plack --enable

sudo koha-plack --disable
echo $?
sudo koha-plack --disable
echo $?
sudo koha-list --noplack
echo $?
sudo koha-plack --enable
echo $?
sudo koha-plack --enable
echo $?
sudo koha-list --plack
echo $?

git bz apply 20692
sudo perl ~/misc4dev/cp_debian_files.pl
then repeat the test.

It should also be noted, because the enable
and disable are now split, if for some reason
they become out of sync, an enable or disable
should correct them.

Because these are bash scripts, the test tool
(/home/vagrant/qa-test-tools/koha-qa.pl)
does not apply.

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 22511: Fix type role->roll
Nick Clemens [Thu, 25 Apr 2019 11:10:29 +0000 (11:10 +0000)]
Bug 22511: Fix type role->roll

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: (QA follow-up) Refactor status description in templates
Josef Moravec [Thu, 25 Apr 2019 08:28:13 +0000 (08:28 +0000)]
Bug 22511: (QA follow-up) Refactor status description in templates

Test plan:

Before this patch, some accounttypes does not show status (for example
        voided payment)

After this patch, the status is always generated - defaults to empty
string

This behaviour should be same in intranet and opac

In OPAC templates there was even bug (used variable account instead of
        ACCOUNt_LINE), so the status was not shown at all

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 22511: (QA follow-up) Fix update database
Josef Moravec [Thu, 25 Apr 2019 08:25:42 +0000 (08:25 +0000)]
Bug 22511: (QA follow-up) Fix update database

Test plan:
Run db update (and have some voided accountlines)
--> without patch it fails with error message similar to:
    Can't use string ("Payment") as a HASH ref while "strict refs" in use at
    (eval 1393) line 19.
--> with patch it runs as expected

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 22511: (follow-up) Add DB Update
Martin Renvoize [Wed, 10 Apr 2019 09:05:07 +0000 (10:05 +0100)]
Bug 22511: (follow-up) Add DB Update

This update takes old VOID accountlines and attempts to restore the
original accounttypes using the offsets and set the status to 'VOID'

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: (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>