Commit graph

31937 commits

Author SHA1 Message Date
Kyle M Hall
c967e010c0 Bug 20285: Lost item refund won't always pay down lost item fee first
Due to a simple typo, the accountline passed to Koha::Account::pay from _FixAccountForLostAndReturned is not used. That means that the credit for the lost item fee may be applied to other fees before it is used on the lost fee itself.

Test Plan:
1) Find a patron with existing fines
2) Ensure your settings will charge patrons for lost items
3) Check out an item to a patron with existing fees that need paid
4) Mark the item lost, charging the lost item fee
5) Return the item
6) Note the fee was refunded, but it paid down earlier fines first,
   and not the lost item fee first
7) Apply this patch set
8) Repeat steps 1 - 5
9) Note the lost item fee is the first fee to be paid off by the lost
   item fee refund

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works as expected.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:38:12 +00:00
Kyle M Hall
2acf4bf510 Bug 20285: Unit Test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:38:10 +00:00
812adec528 Bug 19970: Revise change of bug 19413 to work better for translations
This patch changes how the submit and cancel buttons appear in the MARC
008 plugin window. The controls are now displayed as buttons in a
floating toolbar.

To test you must have MARC tag 008 configured to use the
marc21_field_008.pl plugin.

- Apply the patch and open an existing or blank record in cataloging.
- Click the plugin link next to tag 008 to trigger the popup window.
- Confirm that "Save" and "Cancel" appear correctly in a toolbar.
- Scroll down the page to confirm that the toolbar "sticks" to the top
  of the window.
- Confirm that the "Save" and "Cancel" buttons work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:35:41 +00:00
3495de67d4 Bug 20760: Fill authorised values in svc framework
To test:
 1 - Map a marc field to an authorised value in the default framework -
say 300$c -> CCODE
 2 - Open the advanced cataloguing editor
 3 - Create a new field 300$c - note there is no dropdown
 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define
 5 - Note the many instance of
Koha::Schema::ResultSet::AuthorisedValueCategory->HASH...
 6 - Apply patch
 7 - Restart memcached and plack
 8 - reload/recreate record in rancor
 9 - Note that 300$c is now a dropdown as expected
10 - repeate 4
11 - note the authorised values look correct in response

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:34:33 +00:00
6613f36d5a Bug 20911: Use 'POST' to submit search history forms
To test:
1 - Enable EnableOpacSearchHistory and EnableSearchHistory
2 - Do some searches
3 - View your search history in staff/opac
4 - Confirm you can delete single or multiple rows
5 - Confirm other page functionality has not changed

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:34:15 +00:00
8126454496 Bug 20892: Correct basketgroup link in histsearch.pl
When searching an order, histsearch.pl page, you see if exists the backetgroup as a link.
This link is composed of "basketgroup.pl?booksellerid=xxx", it must also contain "basketgroupid=xxx" and "opa=add".

See Bug 11429 for example.

Test plan :
1) Create an order in a basket and add it to a basketgroup
2) Search for this order, you get to page histsearch.pl
3) Check clicking on basketgroup id leads to basketgroup details page

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:23:09 +00:00
3c65318243 Bug 20899: Fix patron's name display
This is a follow-up for
  commit fa54100dff
  Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]

We should use patron-title.inc to display (or hide) patron's info on the
checkout history view

Test plan:
Issue an item, go to the biblio, click the circulation history for this
tab.
Note that the patron's name is showing.

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>
2018-06-15 10:20:17 +00:00
d795654ebf Bug 20918: Fix left-side navigation on the checkout history page
commit fa54100dff
  Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]

Removed:
-    biblionumber => $biblionumber, # required for left-side navigation

But did not deal with the side-effects.

Test plan:
When you are on the "Checkout history" page (/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=42),
the left-side navigation is broken if this patch is not applied, the biblionumber is not set.

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>
2018-06-15 10:18:28 +00:00
2367760e99 Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl
Koha::Number::Format->round use Number::Format->round with a precision=2
We should use it directly instead of Koha::* modules. It will avoid the
DB entry to fail because schema changes.

From the koha-devel list:

http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html

16.06.00.042

Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching
feature equivalent to the aggressive ISBN matcher)
DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in
'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`,
`me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`,
`me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE (
`active` = ? )" with ParamValues: 0=1] at
/usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836.
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column
'me.p_sep_by_space' in 'field list' at
/inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209

Basically, the update code uses Koha::Number::Price, which in full
modern object mode goes for its newly added *p_sep_by_space* _in the
18.05 code_.  But the DB doesn't have it yet (it comes with 17.12.00.022).

Signed-off-by: Blou <philippe.blouin@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:12:43 +00:00
38d75d28af Bug 20832: Fix opac user profile page when there is overdue fine and no rental charge
Test plan:
0) Do not apply the patch
1) Have an overdue fine linked with specific item currently checked out
to your patron
2) Do not have any unpaid rental fees
3) Go to this patron profile in opac - page opac-user.pl
4) The page crashes with "Can't call method "get_column" on an undefined
value at
/usr/share/koha/opac/cgi-bin/opac/opac-user.pl line 217" in log
5) Apply the patch
6) Restart plack
7) The page should working and show the right amounts for fines

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-15 10:10:59 +00:00
6650c7efb4 Bug 20851: Add module to circ/article-request-slip.pl
See bug 20468, comment7.
Although the script seems to compile well, we better add the module here.
Trivial change.

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>
2018-06-08 09:48:12 -04:00
f7176c356d Bug 20756: Compiled CSS
This patch contains the compiled CSS file

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:12 -04:00
cbb5207c1c Bug 20756: OPAC "Share list" button should be styled with an icon
This patch adds a new "share" icon to the sprite image used to style
controls in the OPAC. The "share list" links now have a "sharelist"
class which is used to style the links with the new icon.

Also changed: Fixed the page structure markup of opac-shareshelf.tt.

To test you must have the OpacAllowSharingPrivateLists system preference
enabled.

 - Log in to the OPAC and go to Lists -> Your lists.
 - Create one or more private lists if necessary.
 - In the table of your lists there should be a "Share" link with the
   new icon.
 - View one of these lists and confirm that the "Share" link at the top
   of the table of list items.
 - Click through to the share list page and confirm that the page looks
   correct.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:12 -04:00
Bernardo Gonzalez Kriegel
eeeb15c8f8 Bug 20700: MARC21 add/update leader/007/008 codes
This add/updates some codes from updates 22 (Apr/16)
and 23 (Nov/16)

Update 22 https://www.loc.gov/marc/up22bibliographic/bdapndxg.html

Sound Recording 007/03 n (new)
Sound Recording 007/10 n (new)
Sound Recording 007/01 r (new)
Sound Recording 007/01 s (new)

Update 23 https://www.loc.gov/marc/up23bibliographic/bdapndxg.html

Leader/18 n (new)
Music 008/20 p (new), b (renamed)

To test:
1) Apply the patch
2) Clean your browser cache
3) Go to cataloguing -> new record
4) Leader plugin: check leader/18, new option 'n'
5) 007 Plugin:
a) Sound recording
	check 007/01 new 'r'
	check 007/03 new 'n'
	check 007/10 new 'n'
b) Electronic resource
	check 007/01 new 's'
6) 008 Plugin: Music, check 008/20 renamed 'b', new 'p'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:12 -04:00
2529a218ee Bug 20886: Do not cast undef to 0 (TO_JSON)
We should not cast undefined values to 0.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This was a bug I introduced. I think the fix is right, and if something
gets broken for this, it means it was making the wrong assumptions on
the data.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:12 -04:00
d86ff0f5db Bug 20778: (bug 19777 follow-up) Fix subscription deletion
Caused by
  commit 666a1b2760
  Bug 19777: Move template JavaScript to the footer: Serials, part 3

TT vars should not be used in .js files

Test plan:
Delete a subscription, confirm you see the confirmation popup and that
the it deletes the subscription correctly after it has been confirmed.

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>
2018-06-08 09:48:12 -04:00
3e91d99a15 Bug 20053: Drop type attribute "text/javascript" in OPAC templates
This patch is a reimplementation of the original from Indranil Das Gupta
and the QA follow-up from Julian Maurice. Original test plan:

Conformance rules for HTML5 is generating warnings for <script> element
with type="text/javascript" attribute when the OPAC page is checked
with W3C Validator. This patch removes the cause of these warnings.

Test plan
=========

1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator
   and watch about 10+ warnings being generated by the validator.

2/ Apply patch and re-submit the page to the Validator. The warnings
   would be gone.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:12 -04:00
564e9ce1ee Bug 20829: Handle non-existent barcode when linking to host item
Since commit 2c9aeb9b0f
  Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem

$item is not defined if the barcode is invalid, we should not call
method on it in that case.

Test plan:
- Turn on EasyAnalyticalRecords
- Go to a detail page
- Edit > Link to host item
- Enter an invalid barcode
=> With the patch you get a friendly error message
=> Without this patch it explodes with
Can't call method "itemnumber" on an undefined value at
/home/vagrant/kohaclone/cataloguing/linkitem.pl line 86.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:48:11 -04:00
3f01fcae97 Bug 2426: DBRev 18.06.00.002
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 09:47:58 -04:00
Katrin Fischer
870913b3c3 Bug 2426: Remove deprecated management permission
After review of the code it turns out that the management permission
that has been marked as deprecated a long time ago, does not have
any function.

The patch removes all remaining code related to it.

To test:
- Make sure you have a patron with the management permission
- Apply patch
- Run database update
- Check everything still works as expected

Bonus:
borrowers.flags is recalculated for patrons with management
permission.

To check:
- Create some 'permission twins' with and without management
  permission
- Note the value in borrowers.flags
- Apply patch, don't run database update
- Save permissions from GUI for one of the twins
- Note the newly calculated value
- Run database update
- Now both twins should have the same borrowers.flags value

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 12:17:25 +00:00
20bd2d2bd5 Bug 20120: (QA follow-up) display correct amount in redirect
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 12:03:01 +00:00
11223294b6 Bug 20120: force scalar context for CGI->param
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 11:45:26 +00:00
Kyle M Hall
d4cf19ac04 Bug 20120: (QA follow-up) Pass on_editing parameter for Price plugin
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 11:45:25 +00:00
Kyle M Hall
515cab0c46 Bug 20120: Prevent writeoffs of more than the amount owed for a fee
In short, it is possible to 'over-writeoff' a fee such that the value of the fee is now a credit.

Test Plan:
1) Attempt to writeoff a single fee, set the amount input to more than
   the amount of the fee.
2) Note the writeoff makes the fee go negative.
3) Apply this patch
4) Attempt to repeat step 1, you should be unable to write-off an
   amount more than the amount outstanding for the fee!

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: George Williams <george@nekls.org>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 11:45:23 +00:00
f8ea20344b Bug 20875: (bug 16735 follow-up) Fix library list for OpacAddMastheadLibraryPulldown
This patch fixes a regression introduced by
  commit 2059f7d801
  Bug 16735: Migrate library search groups into the new hierarchical groups

It re-added code that was removed by bug 15758 (use of var BranchesLoop).

Test plan:
- Create library search groups
- Turn OpacAddMastheadLibraryPulldown on
- At the OPAC confirm that the search box with libraries and library
groups is displayed and works correctly.
- Remove the library search group
- The dropdown list should not have the optgroup tags

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:48:13 +00:00
421746dd63 Bug 20877: Do not consider DB user has permissions
Test plan:
0/ Do not apply the patch
1/ Confirm the new test fails
2/ Apply the patch
3/ Confirm the new test passes
4/ Test the installation process

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:43:37 +00:00
3d68ab447e Bug 18821: (QA follow-up) Last tweaks for performance
[1] passing unsafe has no use since it is a scalar, removed it to unconfuse
[2] remove caching when pref is disabled
[3] caching userid removes the need for calling Patron->find each time
[4] subsequent changes in unit test
[5] cosmetic renames to move from session to daily basis (changed dev angle)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First call going thru Koha::Patron takes about 0.0150 sec.
Subsequent calls only use caching and take about 0.0006 sec.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:30:17 +00:00
495512f6ea Bug 18821: Convert to using cache with date checking
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:30:16 +00:00
6491ba0233 Bug 18821: TrackLastPatronActivity is a performance killer
Test Plan:
1) Apply this patch
2) Start a new session ( a private browser window works well )
3) Note the lastseen column in the borrowers table is updated
4) Browse a few pages, not the lastseen column is not updated again
5) Close the browser window and repeat steps 2-4
6) prove t/db_dependent/Auth.t

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:30:16 +00:00
6049836023 Bug 20889: Prevent not for loan items to be checked out
1. Item type defined at item level (item-level_itypes=1)
2. Mark an item type not for loan (itemtypes.notforloan=1)
3. Checkout an item using this item type (items.itype="BK" for instance)
=> Checkout is not blocked!

I suspect
  commit 3953fdb921
  Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued
to be the root of this issue.
One occurrence of $item->{itemtype} has not been replaced.
In this case it refers to the biblioitem->{itemtype} value whereas we want to use
$item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype
(just in case you are not reproducing the problem).

Test plan:
Make sure not for loan items cannot be checked out

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:19:41 +00:00
326aa0667d Bug 20889: Add tests - not for loan items cannot be checked out
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:19:40 +00:00
50af8d840f Bug 20866: (QA follow-up) Use build_object and remove two tests
The unique constraint on userid is handled in TestBuilder. So let's use it.
The two tests if count==$count do not make much sense anymore when we
call ->count a few lines before. The check with search_limited is enough.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:08:07 +00:00
6123e213e6 Bug 20866: Make ArticleRequests.t pass even if table is not empty
Previous patch from Marcel removed the data from article_requests, I do
not think it is a good idea to remove existing data, it could hide bugs.

This patch moves the count inside the subtest block in order to have the
correct value when these tests are executed.
Previous code was broken: Koha::Patron->store does not generate a
userid, and ->search_limited did not work correctly
(Koha::Patron->has_permission returned early because of the non-existing
userid, 'return unless $self->userid;');

Test plan:
[1] Create an article request.
[2] Run t/db_dependent/ArticleRequests.t

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-08 10:08:07 +00:00
63673d70cd Bug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in circulation
To test:
1 - Place two holds on a bib for a single patron
2 - Check in both items, confirm the screen message and slip are correct
3 - Checkout both items to another patron, confirm the screen message
and slip are correct

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:37 -04:00
Kyle M Hall
33f4418899 Bug 17561: (QA follow-up) Update existing unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:37 -04:00
Kyle M Hall
777b24bbb4 Bug 17561: (QA follow-up) Simplify new ReserveSlip code
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:37 -04:00
Benjamin Rokseth
2c1f7d2281 Bug 17561: ReserveSlip needs itemnumber for item level holds on same biblio
This patch fixes a regression after bug 14695.
This patch adds itemnumber and barcode as optional params in ReserveSlip used
by hold-transfer-slip.pl to generate HOLD_SLIP. This is for ReserveSlip to be
able to generate correct slips when items in multi-item holds are checked in.

Test plan:

1) activate a circulation rule with multi-item holds
2) Place two holds on same biblio for patron
3) for debugging, either use browser console to observe POST request and responses
   or use info from reserves, e.g. reserve_id in the HOLD_SLIP
4) checkin two items from same biblio on pickup branch
5) note that both holds are effectuated, but reserve_id is the same on both slips
6) also note that there is no itemnumber or barcode in the requests from returns.pl
7) Apply this patch
8) repeat 2-4
9) note that reserve_id is now different on the two slips

and/or:
Run tests:
  t/db_dependent/Reserves/ReserveSlip.t

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:36 -04:00
Katrin Fischer
4f0c8e3c88 Bug 20861: Correct EDI permissions on EDI messsages
The permission for EDI is edi_manage, but 2 pages asked
for manage_edi, allowing users not to access those.

To test:
- Add edi_manage to your permissions
- Try to access the EDIFACT messages from the
  acq start page
- Verify it doesn't work
- Apply patch and try again
- You should be able to access the page now
- Try to access the other page directly (if you don't
  have EDI data):
  /cgi-bin/koha/acqui/edimsg.pl
- Verify you can access the page and don't get a
  permission error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:36 -04:00
9b3f7a0011 Bug 20838: Add 2 small tests to check ref
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:36 -04:00
de32d9d3e2 Bug 20838: Make Koha::Library::Group->all_libraries return a list of Koha::Libraries
Instead of a list of Koha::Library::Group
Ideally it should be a Koh::Libraries iterator

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:36 -04:00
e5896f5683 Bug 20838: (bug 16735 follow-up) Fix search by group of libraries
In the last patches of bug 16735, we completely broke the feature!

The limit is using library_groups.id instead of branches.branchcode.

Test plan:
Create a group of library with the search feature
Search (OPAC and staff interfaces) using this limit

=> Without this patch you will see that the generated search query does
not contain branchcodes
=> With this patch applied you will see the branchcodes

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:36 -04:00
73b0542354 Bug 3849: DBRev 18.06.00.001
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:40:24 -04:00
Katrin Fischer
b79ce63f65 Bug 3849: (follow-up) Add database update to change descriptions
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:59:45 +00:00
Katrin Fischer
819e6216e6 Bug 3849: Improve descriptions of granular acquisition permissions
The permissions for acquisitions were not very clearly described.
This patch changes the descriptions in the include file (GUI) and
in the default SQL.

To test:
- Go to any patron account in staff
- Go to more > permissions
- Verify that the meaning of each acquisition permission is clear
  from the description

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:59:44 +00:00
9bd9d28874 Bug 20831: Fix KohaTable calls after bug 9573
Test plan:
0) Do not apply the patch
1) Confirm not working datatable on patrons hold history page
2) Apply the patch
3) The table should be working now

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 13:58:04 +00:00
5530ed6b9d Bug 20763: Remove unecessary Koha::Patron fetch
If $borrowernumber is not set, there is no userenv.
So let's pick the library code set in the userenv instead of fetching
the Koha::Patron->branchcode from DB

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 12:58:53 +00:00
Kyle M Hall
7b16c9a841 Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in
Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error".

Test Plan:
1) Enable AllowPurchaseSuggestionBranchChoice
2) Enable AnonSuggestions
3) In the OPAC, perform a search that will have no results,
   click the "Make a purchase suggestion" link.
4) Note the error
5) Apply this patch
6) Reload the page
7) The page should load now!

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-06-04 12:58:52 +00:00
f9d62f1585 Bug 20840: (bug 2696 follow-up) Fix biblio info fetch
There is no accountlines.biblionumber field, if the account line is
linked to an item, accountline-details.pl will explode with:
Template process failed: undef error - The method biblionumber is not
covered by tests!

Test plan:
Create a fine for a given item
Pay the fine
View the detail of the account line

=> Without this patch you get a software error
=> With this patch applied you will see the biblio's title

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>
2018-06-04 12:55:20 +00:00
35f1fbfedb Bug 20825: (QA follow-up) set biblioitemnumber with correct value
Both biblionumber and biblioitemnumber for item were set to
biblionumber, when they don't line up tests fail

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-05-29 15:53:59 +00:00
Kyle M Hall
0895eadd67 Bug 20798: Client side validation for for fund selection prevents adding only some records to a basket
Bug 19453 "fixed" the fund validation that never actually worked. This validation should be removed altogether instead. It is overly simplistic and simply checks to see if each record in the batch has a fund selected regardless of whether that record will be imported or not.

In addition, the code completely ignores items generated by MarcItemFieldsToOrder such that even if items on that page have a fund selected, the javascript forces the librarian to make a selection from the left-hand fund pulldown even though it will not be used.

Considering this bad validation is basically 'new' as it never worked before, the most sensible course of action would be to 'undo' the change and remove the validation.

Test Plan:
1) Add records to a basket from an import batch
2) Select only some of those items in the batch
3) Note Koha will not let you import them unless you set funds for *all*
   records in the batch
4) Apply this patch
5) Note Koha no longer forces a budget to be selected in the pulldown

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

https://bugs.koha-community.org/show_bug.cgi?id=20789
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-05-29 14:20:08 +00:00