[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

   Keywords|rel_18_11_candidate |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

 Status|Needs Signoff   |ASSIGNED

--- Comment #176 from Katrin Fischer  ---
Agreed with Alex that this will need some more work and clean-up before going
in. Will come back to this!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #175 from Katrin Fischer  ---
3) The logic appears not correct too:
I haven't placed any hold today.
I allow one daily hold, 2 holds per record.

Record level hold: let's me select 2 from pull down. On saving I am redirected
to the patron account but no hold has been placed.

Item level hold: When switching to specific item I immediately get the error:

Maximum number of reserves allowed today reached.
(reserves has to be holds here!)

One checkbox is selected and I can save the hold -> so the warning should not
have displayed.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #174 from Katrin Fischer  ---
Some first comments here:

1) CSS
Something is off here, there is no more less directory on master:

http://git.koha-community.org/gitweb/?p=koha.git;a=tree;f=koha-tmpl/opac-tmpl/bootstrap;hb=e112c6f117d4b6fd6c6160e8be9cba4186db1279


koha-tmpl/opac-tmpl/bootstrap/less/opac.less   | 2644


Also I think generated .css files should not be included.


2) Asking Joubu to glance at the code, 2 more things (non-blocker):

foreach my $item ( $self->items()->as_list() ) {

would be better as:

while ( my $item = $items->next ) {

And tests should be in their own subtest.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #173 from Alex Buckley  ---
Hi all,

I have just added another follow-up which moves the function out of C4/Reserves
into Koha/Biblio (as Tomás suggested in comment 169)

The caller for this function is now: my $holds_allowed_on_record_today =
$biblio->allowed_holds( $patron_obj );

I have amended the t/db_dependent/Reserves/MultiplePerRecord.t unit tests. 

Can this please be tested and if you could let me know of further required
changes that would be great.

Many thanks,
Alex

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #172 from Alex Buckley  ---
Created attachment 82221
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82221=edit
Bug 15565: (follow-up) Moved function form C4/Reserves to Koha/Biblio

Also updated t/db_dependen/Reserves/MultiplePerRecord.t test to reflect
moving function.

Added the display of the JS modal box informing OPAC borrower that
they have exceeded hold limit after they click 'A specific item'
radiobutton on opac-reserve if holds per day, holds per record or
maxreserves is 1

Test plan:
1. Apply patches
2. Restart memcached and plack
3. Run t/db_dependent/Reserves/MultiplePerRecord.t
4. Set your maxreserves syspref to 3, and a circ rules holds per record
to 2 and holds per day to 1
5. In the OPAC visit the 'Place hold' interface of item. Select the 'A
specific item' radiobutton and observe a modal box loads to inform you
that you have reached the maximum holds allowed today.
6. Click 'OK' on the modal and notice the first checkbox is selected and
other unchecked checkboxes are disabled.
7. Repeat step 4 this time setting holds per day to 5
8. Now reloading the OPAC 'Place hold' page notice after clicking 'A
specific item' no modal displays and select another item checkbox (so
you have 2 selected checkboxes). Observe a modal saying you have reached
the maximum number of holds for the record is loaded
9. Click 'OK' on modal and observe all unchecked item checkboxes are
automatically disabled to prevent additional holds being placed
10. Select 'Confirm hold'
11. On your holds summary page confirm both holds are placed
12. In the staff client set the 'AllowHoldPolicyOverride' syspref to
"Don't allow"
13. Visit a biblio reservation interface in the staff client
14. Select 2 item checkboxes and observe the modal box explaining you
have reached maximum holds for the record is displayed.
15. Select 'OK' on the modal and notice all un-checked item checkboxes
are automatically disabled
16. Repeat steps 12-15 this time with the value of
'AllowHoldPolicyOverride' syspref set to 'Allow' and notice that once
you have clicked on the second item checkbox although the modal still
loads the item checkboxes do not disable - you are able to override and
continue selecting checkboxes each time with modal warning loading.

17. Observe the allow_holds() function is in the Koha/Biblio.pm file and
the GetAllowedHoldsForPatronToday() function has been removed from
C4/Reserves.pm

Sponsored-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #82220|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #171 from Alex Buckley  ---
Created attachment 82220
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82220=edit
Bug 15565: (follow-up) Moved function form C4/Reserves to Koha/Biblio

Also updated t/db_dependen/Reserves/MultiplePerRecord.t test to reflect
moving function.

Added the display of the JS modal box informing OPAC borrower that
they have exceeded hold limit after they click 'A specific item'
radiobutton on opac-reserve if holds per day, holds per record or
maxreserves is 1

Test plan:
1. Apply patches
2. Restart memcached and plack
3. Run t/db_dependent/Reserves/MultiplePerRecord.t
4. Set your maxreserves syspref to 3, and a circ rules holds per record
to 2 and holds per day to 1
5. In the OPAC visit the 'Place hold' interface of item. Select the 'A
specific item' radiobutton and observe a modal box loads to inform you
that you have reached the maximum holds allowed today.
6. Click 'OK' on the modal and notice the first checkbox is selected and
other unchecked checkboxes are disabled.
7. Repeat step 4 this time setting holds per day to 5
8. Now reloading the OPAC 'Place hold' page notice after clicking 'A
specific item' no modal displays and select another item checkbox (so
you have 2 selected checkboxes). Observe a modal saying you have reached
the maximum number of holds for the record is loaded
9. Click 'OK' on modal and observe all unchecked item checkboxes are
automatically disabled to prevent additional holds being placed
10. Select 'Confirm hold'
11. On your holds summary page confirm both holds are placed
12. In the staff client set the 'AllowHoldPolicyOverride' syspref to
"Don't allow"
13. Visit a biblio reservation interface in the staff client
14. Select 2 item checkboxes and observe the modal box explaining you
have reached maximum holds for the record is displayed.
15. Select 'OK' on the modal and notice all un-checked item checkboxes
are automatically disabled
16. Repeat steps 12-15 this time with the value of
'AllowHoldPolicyOverride' syspref set to 'Allow' and notice that once
you have clicked on the second item checkbox although the modal still
loads the item checkboxes do not disable - you are able to override and
continue selecting checkboxes each time with modal warning loading.

17. Observe the allow_holds() function is in the Koha/Biblio.pm file and
the GetAllowedHoldsForPatronToday() function has been removed from
C4/Reserves.pm

Sponsored-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #170 from Alex Buckley  ---
Thanks Tomas I will try that in a follow-up patch a bit later today when I have
some time.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

--- Comment #169 from Tomás Cohen Arazi  ---
I'm not happy with adding things to the C4:: namespace, what about adding

my $biblio = Koha::Biblios->find( $biblio_id );
my $holds_allowed_on_record_today = $biblio->allowed_holds({ patron =>
$patron_obj });

holds are usually added in context in which we already have the $patron object,
and a biblionumber.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

 Depends on||15486


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15486
[Bug 15486] Restrict number of holds placed by day
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #168 from Alex Buckley  ---
Created attachment 82216
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82216=edit
Bug 15565 (follow-up): Removed leftover JS debug

Sponsored-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

--- Comment #167 from Alex Buckley  ---
(In reply to Katrin Fischer in comment 154 and Nick Clemens in comment 152):

Hi both,

I have written a follow-up patch which does the following:

OPAC: 
The MaxReserves syspref, holds per day and holds per record circ setting values
are all respected in determining how many items can be reserved. 

* Once the lowest of these 3 values is reached all un-checked item checkboxes
on opac-reserve are disabled.

Staff client:

Similar to the OPAC in that once the lowest of the 3 values is reached all
un-checked item checkboxes on request.tt are disabled except is the
AllowHoldPolicyOverride is set to 'Allow'.

If AllowHoldPolicyOverride is enabled then additional checkboxes can be
selected with the warning modal boxes loading on each checkbox click. 

Also added function to C4::Reserves named GetAllowedHoldsForPatronToday() which
returns the holds per day value for the patron and item type combination. 

I have added unit tests for this new function in
t/db_dependent/Reserves/MultiplePerRecord.t

Can you please test this?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #166 from Alex Buckley  ---
Created attachment 82215
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82215=edit
Bug 15565: (follow-up) Added handling for holds_per_day and respecting
AllowHoldPolicyOverride

On OPAC and staff side this commit adds handling to respect
the holds per day circ rules setting.

In the OPAC once either maxreserves, holds per day or holds per record
(depending on which of the 3 values is lowest) is reached then remaining
unchecked item checkboxes are disabled.

On the staff side the same happens however if the
AllowHoldPolicyOverride is enabled then the checkboxes do not disable
but the staff member still sees warning modal boxes appear.

Also added unit test for new function GetAllowedHoldsForPatronToday in
C4::Reserves.

Sponsored-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #164 from Alex Buckley  ---
Created attachment 82213
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82213=edit
Bug 15565: (QA follow-up) Fix some last filters

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #165 from Alex Buckley  ---
Created attachment 82214
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82214=edit
Bug 15565: (follow-up) Corrected OPAC reserve interface display logic

Sponsored-By: Brimbank Library, Australia

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #163 from Alex Buckley  ---
Created attachment 82212
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82212=edit
Bug 15565: (follow-up) Removed leftover debug code and added missing filters

Sponsord-By: Brimbank Library, Australia

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #162 from Alex Buckley  ---
Created attachment 82211
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82211=edit
Bug 15565: Allow up to (and including) maxreserves number of OPAC item
levelholds

This commit implements changes to opac-reserve.tt and opac-reserve.pl.

1. The change to opac-reserve.tt JS fixes the total_requested() function which
returns an output which is always 2 digits higher than the actual number of
selected item checkboxes.

i.e. if the 'maxreserves' syspref (limit for the overall
number of reserves allowed by a user) is 4 and a user has no previous
holds and ticks 3 item checkboxes and submits the form.

The 'Maximum number of reserve exceded.' popup message is displayed,
however as they have selected 3 items for reservation this is less than
the maxreserves value of 4.

The popup is displayed because total_requested() JS function is
returning 5 (i.e. 2 on top of the actual number of requested holds).

This commit usbtracts 2 from the number of holds calculated by
total_requested() so that the accurate number of requested holds is
being used to determine whether or not to display the excess holds
popup.

2. When the 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref are the same value (e.g. 4) you can tick 4 item
checkboxes in opac-reserve.pl and submit the form.

The form will submit successfully and to the user everything looks to
have worked however the holds will not be
successfully created.

This is because after the form is submitted to opac-reserve.pl a check is
done:

If 'number of submitted hold requests' + 'number of previous existing holds'
greater than or equal to maxreserves syspref then set the variable
'$canreserve' to 0.

If the $canreserve variable is 0 the form will submit, no warning/error
message is displayed to the user but the holds are not created.

Users should be able to place 4 holds if the maxreserves syspref is 4
(just not more than 4 holds). This commit changes this check to:

If 'number of submitted hold requests' + 'number of previous existing
holds' greater than maxreserves syspref then set the variable '$canreserve' to
0..

i.e. notice we only check for greater than (not equal to).

Which solves the bug of the form submitting and no holds being created
when the maxreserves syspref and 'Holds per record (count)' (circulation
rule) are the same.

Test plan (in two parts to test fix #1 and #2 (above)):

Test plan for fix #1:
1. Apply all patches on this bug report (15565) and follow and confirm
the feature works as described in the test plan in the first commit

2. Set the 'maxreserves' syspref to 3 (and 'Holds per record (count)'
(circulation rule) to 5)

3. Ensure your logged in patron account has no existing reserves

4. In the OPAC go to a biblio page with 3 or more items

5. In the reservation page (opac-reserve.pl) for that biblio select 2
item checkboes to place 2 item level holds and notice the 'Maximum
number of reserve exceded.' popup message is displayed.

As the maxreserves syspref value is 3 you should be able to place 2
holds without exceeding that value

6. Apply this patch

7. Repeat step 5 and notice the form submits without the exceeding popup
message and the holds are successfully placed.

Test plan for fix #2:
1. Apply all patches attached to this bug report (bug 15565) and perform
the test plan in the first commit and verify it works.

2. Set your 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref to the same value 3

3. Go to a biblio in the OPAC with 3 or more items

4. In the opac-reserve.pl reservation interface for that biblio tick 3
item checkboxes to place 3 item level holds and submit the form.

5. Notice the form submits and no warning/error message is displayed

6. In the opac user summary page that is displayed after the reserve
form is submitted notice the holds are not displayed this is because
they have not been placed

7. Apply this patch

8. Repeat step 4 and 5 and notice the holds have been successfully
placed and are displayed in your opac user summary page.

Sponsored-By: Brimbank Library
Signed-off-by: Lisette Scheer 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #161 from Alex Buckley  ---
Created attachment 82210
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82210=edit
Bug 15565: Changed the retrieval of selected hold pickup branch in
opac-reserve.pl

Previously the selected branch dropdown value was not being successfully
retrieved in
opac-reserve.pl, this resulted in opac holds being placed with no pickup
branch being set.

Consequently as no branch was associated with the hold an Ajax error was
thrown when viewing the holds-table in the patron page in the staff
client.

This commit successfully retrieves the selected branch value and so
fixing the Ajax error.

Test plan:
1. Apply all patches on bug report 15565 except this commit

2. Place a hold(s) from opac-reserve.pl.

3. Go to your opac patron summary page (opac-user.pl) and notice
although the holds are successfully displayed they have no 'Pickup
location' value

4. Go to the patron page in the staff client and click on the 'Hold(s)'
tab and notice a popup explaining the datatable Ajax error is loaded

5. Apply this patch

6. Repeat step 3 noticing this time in the
opac-user.pl a 'Pickup location' is displayed for the hold you just
created.

6. Repeat step 4 and notice the hold datatable is successfully loaded
and populated without an Ajax error popup being loaded.

Sponsored-By: Brimbank Library

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #160 from Alex Buckley  ---
Created attachment 82209
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82209=edit
Bug 15565: Fixed issues preventing any item-level holds being placed in OPAC

This commit fixes two bugs:

1. C4::Reserves->CanItemBeReserved() returns an output in a hash in the format:
status => 'output'

However opac-reserve.pl is not accessing th output of this function
correctly consequently no item is ever reservable.

And so after a patron submits the reservation form on opac-reserve.pl it
looks like the item-level reservation has successfully been placed
however it has not and no error message is displayed to them.

This commit stores the output of the aforementioned function in a hash
and then checks the value of the status key. As a result opac-reserve.pl
now correctly accesses the value returned and item level holds are
successfully placed from the OPAC.

2. If a biblio has previously been reserved then the opac-reserve.pl page
shows the 'Next available item' and 'A specific item' radio buttons to be
disabled to ensure patrons cannot place a reservation of a different
type on the biblio.

With both of these radio buttons being disabled it results in item level holds
placed in the OPAC on a previously reserved item not being stored in the
database. This is very confusing for users.

I have implemented a conditional which checks what the forced_hold_type
of the previous hold was. If it was 'item' then the $reqtype =
'Specific' and if it was 'record' then $reqtype is 'Any'.

This means there will always be a value for $reqtype, and this variable
is checked if it is equal to 'Specific' and if it is then an item level
hold is placed.

Test plan:
1. Ensure in your circulation rules that 'Item level holds' is enabled

2. Apply all patches on this bug report except this commit

3. In the OPAC try placing a item level hold (and notice you can submit
the opac-reserve.pl page and no error messages are displayed. However
the hold(s) are not being placed.

4. Place an item level hold(s) on the biblio from staff client interface
and then return to the opac-reserve.pl page for the biblio in the OPAC
and notice both the 'Next available' and 'A specific item' radio buttons
are disabled.

5. Again try placing an item level hold in the OPAC and notice dispite
no error/warning message being displayed the hold is not being placed.

6. Apply this patch

7. Restart memcached, and plack

8. In the staff client remove the reservation you placed from the staff
client.

9. Repeat step 3 and notice when you go to your opac summary
(opac-user.pl) page the holds are displayed. .i.e. You can now
successfully place item level holds in the OPAC.

10. Return to the opac-reserve.pl page for the biblio and notice that
because you have already placed a hold on this biblio the 'Next
available item' and 'A specific item' radiobuttons are disabled.

11. Select several of the items checkboxes to place more item level
holds and press the 'Confirm hold' button.

12. Go to your opac summary (opac-user.pl) page again and notice the
holds you placed in step 11 are shown there.

i.e. you can place item level holds from the OPAC on biblios which have
previously had reserves placed on them.

Sponsored-By: Brimbank Library

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #159 from Alex Buckley  ---
Created attachment 82208
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82208=edit
Bug 15565: Remove use of GetBiblionumberFromItemnumber

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #158 from Alex Buckley  ---
Created attachment 82207
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82207=edit
Bug 15565: Alert librarian that maximum holds per record is reached

Signed-off-by: Dani Elder 

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #157 from Alex Buckley  ---
Created attachment 82206
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82206=edit
Bug 15565: Set 'found' parameter correctly when ReservesNeedReturns is off

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81580|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81581|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #156 from Alex Buckley  ---
Created attachment 82205
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82205=edit
Bug 15565: Use item's biblionumber only on item-level request

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81573|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81572|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81571|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81574|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81576|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81575|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81578|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81577|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #81579|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #155 from Alex Buckley  ---
Hi Katrin,

Sure thing working on fix right now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #154 from Katrin Fischer  ---
Hi Alex, 
any chance to fix this before the final freeze?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #153 from Katrin Fischer  ---
Just a note: holds per day was not in yet when I started testing this.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-11-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Nick Clemens  changed:

   What|Removed |Added

   Keywords||rel_18_11_candidate
 Status|Passed QA   |Failed QA

--- Comment #152 from Nick Clemens  ---
CSS changes do not apply - should not include the css for staff side?

Staff side:
1 - Warning box when excedding maxreserves, however, I can place holds beyond
the warning whether  AllowHoldPolicyOverride  is set or not
2 - Holds Per day setting not taken into account while placing holds (item
level or next available)

OPAC:
1 - When placing item level holds the user is warned of exceeding maxreserves,
however, if holds per day is less there is no warning, but holds are not placed
beyond the limit with no warning (maxreserves=5 holds per day = 3, check 5
boxes, only 3 holds are placed)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

   Keywords|release-notes-needed|

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Text to go in the||Allow borrowers to place
  release notes||multiple item-level holds
   ||on a record in the OPAC.
   ||
   ||Item radio buttons are
   ||replaced with checkboxes,
   ||and once a borrower has
   ||reached the circulation
   ||rules 'Holds per record
   ||(count)' value the
   ||remaining unticked
   ||checkboxes are disabled.
   ||
   ||This feature was previously
   ||only available in the staff
   ||client.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81431|0   |1
is obsolete||

--- Comment #150 from Katrin Fischer  ---
Created attachment 81580
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81580=edit
Bug 15565: (QA follow-up) Fix some last filters

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81449|0   |1
is obsolete||

--- Comment #151 from Katrin Fischer  ---
Created attachment 81581
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81581=edit
Bug 15565: (follow-up) Corrected OPAC reserve interface display logic

Sponsored-By: Brimbank Library, Australia

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81427|0   |1
is obsolete||

--- Comment #149 from Katrin Fischer  ---
Created attachment 81579
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81579=edit
Bug 15565: (follow-up) Removed leftover debug code and added missing filters

Sponsord-By: Brimbank Library, Australia

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81424|0   |1
is obsolete||

--- Comment #146 from Katrin Fischer  ---
Created attachment 81576
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81576=edit
Bug 15565: Fixed issues preventing any item-level holds being placed in OPAC

This commit fixes two bugs:

1. C4::Reserves->CanItemBeReserved() returns an output in a hash in the format:
status => 'output'

However opac-reserve.pl is not accessing th output of this function
correctly consequently no item is ever reservable.

And so after a patron submits the reservation form on opac-reserve.pl it
looks like the item-level reservation has successfully been placed
however it has not and no error message is displayed to them.

This commit stores the output of the aforementioned function in a hash
and then checks the value of the status key. As a result opac-reserve.pl
now correctly accesses the value returned and item level holds are
successfully placed from the OPAC.

2. If a biblio has previously been reserved then the opac-reserve.pl page
shows the 'Next available item' and 'A specific item' radio buttons to be
disabled to ensure patrons cannot place a reservation of a different
type on the biblio.

With both of these radio buttons being disabled it results in item level holds
placed in the OPAC on a previously reserved item not being stored in the
database. This is very confusing for users.

I have implemented a conditional which checks what the forced_hold_type
of the previous hold was. If it was 'item' then the $reqtype =
'Specific' and if it was 'record' then $reqtype is 'Any'.

This means there will always be a value for $reqtype, and this variable
is checked if it is equal to 'Specific' and if it is then an item level
hold is placed.

Test plan:
1. Ensure in your circulation rules that 'Item level holds' is enabled

2. Apply all patches on this bug report except this commit

3. In the OPAC try placing a item level hold (and notice you can submit
the opac-reserve.pl page and no error messages are displayed. However
the hold(s) are not being placed.

4. Place an item level hold(s) on the biblio from staff client interface
and then return to the opac-reserve.pl page for the biblio in the OPAC
and notice both the 'Next available' and 'A specific item' radio buttons
are disabled.

5. Again try placing an item level hold in the OPAC and notice dispite
no error/warning message being displayed the hold is not being placed.

6. Apply this patch

7. Restart memcached, and plack

8. In the staff client remove the reservation you placed from the staff
client.

9. Repeat step 3 and notice when you go to your opac summary
(opac-user.pl) page the holds are displayed. .i.e. You can now
successfully place item level holds in the OPAC.

10. Return to the opac-reserve.pl page for the biblio and notice that
because you have already placed a hold on this biblio the 'Next
available item' and 'A specific item' radiobuttons are disabled.

11. Select several of the items checkboxes to place more item level
holds and press the 'Confirm hold' button.

12. Go to your opac summary (opac-user.pl) page again and notice the
holds you placed in step 11 are shown there.

i.e. you can place item level holds from the OPAC on biblios which have
previously had reserves placed on them.

Sponsored-By: Brimbank Library

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81423|0   |1
is obsolete||

--- Comment #145 from Katrin Fischer  ---
Created attachment 81575
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81575=edit
Bug 15565: Remove use of GetBiblionumberFromItemnumber

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81421|0   |1
is obsolete||

--- Comment #143 from Katrin Fischer  ---
Created attachment 81573
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81573=edit
Bug 15565: Set 'found' parameter correctly when ReservesNeedReturns is off

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81425|0   |1
is obsolete||

--- Comment #147 from Katrin Fischer  ---
Created attachment 81577
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81577=edit
Bug 15565: Changed the retrieval of selected hold pickup branch in
opac-reserve.pl

Previously the selected branch dropdown value was not being successfully
retrieved in
opac-reserve.pl, this resulted in opac holds being placed with no pickup
branch being set.

Consequently as no branch was associated with the hold an Ajax error was
thrown when viewing the holds-table in the patron page in the staff
client.

This commit successfully retrieves the selected branch value and so
fixing the Ajax error.

Test plan:
1. Apply all patches on bug report 15565 except this commit

2. Place a hold(s) from opac-reserve.pl.

3. Go to your opac patron summary page (opac-user.pl) and notice
although the holds are successfully displayed they have no 'Pickup
location' value

4. Go to the patron page in the staff client and click on the 'Hold(s)'
tab and notice a popup explaining the datatable Ajax error is loaded

5. Apply this patch

6. Repeat step 3 noticing this time in the
opac-user.pl a 'Pickup location' is displayed for the hold you just
created.

6. Repeat step 4 and notice the hold datatable is successfully loaded
and populated without an Ajax error popup being loaded.

Sponsored-By: Brimbank Library

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81422|0   |1
is obsolete||

--- Comment #144 from Katrin Fischer  ---
Created attachment 81574
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81574=edit
Bug 15565: Alert librarian that maximum holds per record is reached

Signed-off-by: Dani Elder 

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81426|0   |1
is obsolete||

--- Comment #148 from Katrin Fischer  ---
Created attachment 81578
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81578=edit
Bug 15565: Allow up to (and including) maxreserves number of OPAC item
levelholds

This commit implements changes to opac-reserve.tt and opac-reserve.pl.

1. The change to opac-reserve.tt JS fixes the total_requested() function which
returns an output which is always 2 digits higher than the actual number of
selected item checkboxes.

i.e. if the 'maxreserves' syspref (limit for the overall
number of reserves allowed by a user) is 4 and a user has no previous
holds and ticks 3 item checkboxes and submits the form.

The 'Maximum number of reserve exceded.' popup message is displayed,
however as they have selected 3 items for reservation this is less than
the maxreserves value of 4.

The popup is displayed because total_requested() JS function is
returning 5 (i.e. 2 on top of the actual number of requested holds).

This commit usbtracts 2 from the number of holds calculated by
total_requested() so that the accurate number of requested holds is
being used to determine whether or not to display the excess holds
popup.

2. When the 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref are the same value (e.g. 4) you can tick 4 item
checkboxes in opac-reserve.pl and submit the form.

The form will submit successfully and to the user everything looks to
have worked however the holds will not be
successfully created.

This is because after the form is submitted to opac-reserve.pl a check is
done:

If 'number of submitted hold requests' + 'number of previous existing holds'
greater than or equal to maxreserves syspref then set the variable
'$canreserve' to 0.

If the $canreserve variable is 0 the form will submit, no warning/error
message is displayed to the user but the holds are not created.

Users should be able to place 4 holds if the maxreserves syspref is 4
(just not more than 4 holds). This commit changes this check to:

If 'number of submitted hold requests' + 'number of previous existing
holds' greater than maxreserves syspref then set the variable '$canreserve' to
0..

i.e. notice we only check for greater than (not equal to).

Which solves the bug of the form submitting and no holds being created
when the maxreserves syspref and 'Holds per record (count)' (circulation
rule) are the same.

Test plan (in two parts to test fix #1 and #2 (above)):

Test plan for fix #1:
1. Apply all patches on this bug report (15565) and follow and confirm
the feature works as described in the test plan in the first commit

2. Set the 'maxreserves' syspref to 3 (and 'Holds per record (count)'
(circulation rule) to 5)

3. Ensure your logged in patron account has no existing reserves

4. In the OPAC go to a biblio page with 3 or more items

5. In the reservation page (opac-reserve.pl) for that biblio select 2
item checkboes to place 2 item level holds and notice the 'Maximum
number of reserve exceded.' popup message is displayed.

As the maxreserves syspref value is 3 you should be able to place 2
holds without exceeding that value

6. Apply this patch

7. Repeat step 5 and notice the form submits without the exceeding popup
message and the holds are successfully placed.

Test plan for fix #2:
1. Apply all patches attached to this bug report (bug 15565) and perform
the test plan in the first commit and verify it works.

2. Set your 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref to the same value 3

3. Go to a biblio in the OPAC with 3 or more items

4. In the opac-reserve.pl reservation interface for that biblio tick 3
item checkboxes to place 3 item level holds and submit the form.

5. Notice the form submits and no warning/error message is displayed

6. In the opac user summary page that is displayed after the reserve
form is submitted notice the holds are not displayed this is because
they have not been placed

7. Apply this patch

8. Repeat step 4 and 5 and notice the holds have been successfully
placed and are displayed in your opac user summary page.

Sponsored-By: Brimbank Library
Signed-off-by: Lisette Scheer 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81420|0   |1
is obsolete||

--- Comment #142 from Katrin Fischer  ---
Created attachment 81572
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81572=edit
Bug 15565: Use item's biblionumber only on item-level request

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #78815|0   |1
is obsolete||

--- Comment #140 from Katrin Fischer  ---
Created attachment 81570
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81570=edit
Bug 15565: Place multiple holds at once for the same record on staff and OPAC.

Test plan:
1. Create an circulation rule to use for testing the patches on this bug
report. Ensure it has a value greater than 1 for 'Holds
allowed', 'Holds per record (count)', and 'Item level holds' is enabled.

2. Also ensure the 'RequestOnOpac' syspref is set to 'Allow'.

3. Go to the reservation page (request.pl) of a biblio in the staff client with
more
than one item.

4. Notice beside each item a radio button is displayed preventing you
from being able to select multiple items to place a hold on.

5. Go to the reservation page (opac-reserve.pl) of the same biblio in the OPAC
also notice a radio button is displayed beside every item.

6. Apply patches

7. Repeat step 3 and 5 and notice in both the staff client and OPAC
checkboxes rather than radio buttons are displayed beside each item so
you can select multiple items for reservation at a time.

8. From staff interface, place several item-level holds for the same user
on the same record at once:

  - check that you are warned if you exceed "Holds per record (count)"
(circulation rules) for this record.
  - check also maxReserves system preference.

9. From opac, place several item-level and record level holds
for the same user on the same record at once:

  - check that can't exceed "Holds per record (count)" for
  this record.
  This is enforced by all unticked item checkboxes being
  disabled after the number of ticked checkboxes equals the 'Holds per record
(count)' (circulation rules) value.

  - check also maxReserves system preference.

Do the same in OPAC and staff by selecting several
record (multi-hold).

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

  Attachment #81419|0   |1
is obsolete||

--- Comment #141 from Katrin Fischer  ---
Created attachment 81571
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81571=edit
Bug 15565: CSS changes

Note: Reworked as we have switched to CSS since this commit was first written.
This commit now contains 2 files:

* koha-tmpl/opac-tmpl/bootstrap/css/opac.css
* koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

Signed-off-by: Katrin Fischer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

   Keywords||release-notes-needed

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

--- Comment #139 from Alex Buckley  ---
(In reply to Katrin Fischer in comment 137):

Hi Katrin

I have addressed points 1 and 2 in the follow-up patch just attached. 

I have been unable to replicate issue 3; when 'Holds per record (count)'=2 and
'Item level hold'=Force I have found on opac-reserve.pl that after selecting 2
item checkboxes in the OPAC reservation interface the remaining checkboxes are
disabled by JS preventing you from placing more than set in 'Holds per record
(count)'. 

Are you able to elaborate a bit more on what you are seeing?

Cheers,
Alex

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #138 from Alex Buckley  ---
Created attachment 81449
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81449=edit
Bug 15565: (follow-up) Corrected OPAC reserve interface display logic

Sponsored-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

 Status|Failed QA   |ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #137 from Katrin Fischer  ---
QA script is green now with the latest follow-up.

There is a problem in the way that item level holds are handled:

1) Circulation condition: Item level holds not allowed

Without this patch, the radio buttons for "next available" and "item specific"
are not shown, which is the correct behavior.
With this patch, they always show.

2) Circulation condition: Enforce item level holds

It should only be showing "specific hold" here. The radio boxes are greyed out,
but it might be nicer to restore former behaviour.

3) Holds per record allowed: 2, forced item holds as above

Go to a detail page for a record with more than 2 items.
Select 3 items for hold (item level)
Save
You get redirected to the account, but no holds have been placed.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #136 from Katrin Fischer  ---
Created attachment 81431
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81431=edit
Bug 15565: (QA follow-up) Fix some last filters

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #135 from Katrin Fischer  ---
Treating last patch as a QA follow-up ;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

 Status|BLOCKED |Needs Signoff

--- Comment #134 from Alex Buckley  ---
Hi there

I have fixed the apply conflict on the second patch, and have attached a
follow-up patch which:

* Adds the missing filters to request.tt, opac-reserve.tt 
* Corrects typo in code comment
* Removes left-over debug code 

Cheers,
Alex

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #132 from Alex Buckley  ---
Created attachment 81426
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81426=edit
Bug 15565: Allow up to (and including) maxreserves number of OPAC item
levelholds

This commit implements changes to opac-reserve.tt and opac-reserve.pl.

1. The change to opac-reserve.tt JS fixes the total_requested() function which
returns an output which is always 2 digits higher than the actual number of
selected item checkboxes.

i.e. if the 'maxreserves' syspref (limit for the overall
number of reserves allowed by a user) is 4 and a user has no previous
holds and ticks 3 item checkboxes and submits the form.

The 'Maximum number of reserve exceded.' popup message is displayed,
however as they have selected 3 items for reservation this is less than
the maxreserves value of 4.

The popup is displayed because total_requested() JS function is
returning 5 (i.e. 2 on top of the actual number of requested holds).

This commit usbtracts 2 from the number of holds calculated by
total_requested() so that the accurate number of requested holds is
being used to determine whether or not to display the excess holds
popup.

2. When the 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref are the same value (e.g. 4) you can tick 4 item
checkboxes in opac-reserve.pl and submit the form.

The form will submit successfully and to the user everything looks to
have worked however the holds will not be
successfully created.

This is because after the form is submitted to opac-reserve.pl a check is
done:

If 'number of submitted hold requests' + 'number of previous existing holds'
greater than or equal to maxreserves syspref then set the variable
'$canreserve' to 0.

If the $canreserve variable is 0 the form will submit, no warning/error
message is displayed to the user but the holds are not created.

Users should be able to place 4 holds if the maxreserves syspref is 4
(just not more than 4 holds). This commit changes this check to:

If 'number of submitted hold requests' + 'number of previous existing
holds' greater than maxreserves syspref then set the variable '$canreserve' to
0..

i.e. notice we only check for greater than (not equal to).

Which solves the bug of the form submitting and no holds being created
when the maxreserves syspref and 'Holds per record (count)' (circulation
rule) are the same.

Test plan (in two parts to test fix #1 and #2 (above)):

Test plan for fix #1:
1. Apply all patches on this bug report (15565) and follow and confirm
the feature works as described in the test plan in the first commit

2. Set the 'maxreserves' syspref to 3 (and 'Holds per record (count)'
(circulation rule) to 5)

3. Ensure your logged in patron account has no existing reserves

4. In the OPAC go to a biblio page with 3 or more items

5. In the reservation page (opac-reserve.pl) for that biblio select 2
item checkboes to place 2 item level holds and notice the 'Maximum
number of reserve exceded.' popup message is displayed.

As the maxreserves syspref value is 3 you should be able to place 2
holds without exceeding that value

6. Apply this patch

7. Repeat step 5 and notice the form submits without the exceeding popup
message and the holds are successfully placed.

Test plan for fix #2:
1. Apply all patches attached to this bug report (bug 15565) and perform
the test plan in the first commit and verify it works.

2. Set your 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref to the same value 3

3. Go to a biblio in the OPAC with 3 or more items

4. In the opac-reserve.pl reservation interface for that biblio tick 3
item checkboxes to place 3 item level holds and submit the form.

5. Notice the form submits and no warning/error message is displayed

6. In the opac user summary page that is displayed after the reserve
form is submitted notice the holds are not displayed this is because
they have not been placed

7. Apply this patch

8. Repeat step 4 and 5 and notice the holds have been successfully
placed and are displayed in your opac user summary page.

Sponsored-By: Brimbank Library
Signed-off-by: Lisette Scheer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #133 from Alex Buckley  ---
Created attachment 81427
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81427=edit
Bug 15565: (follow-up) Removed leftover debug code and added missing filters

Sponsord-By: Brimbank Library, Australia

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #131 from Alex Buckley  ---
Created attachment 81425
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81425=edit
Bug 15565: Changed the retrieval of selected hold pickup branch in
opac-reserve.pl

Previously the selected branch dropdown value was not being successfully
retrieved in
opac-reserve.pl, this resulted in opac holds being placed with no pickup
branch being set.

Consequently as no branch was associated with the hold an Ajax error was
thrown when viewing the holds-table in the patron page in the staff
client.

This commit successfully retrieves the selected branch value and so
fixing the Ajax error.

Test plan:
1. Apply all patches on bug report 15565 except this commit

2. Place a hold(s) from opac-reserve.pl.

3. Go to your opac patron summary page (opac-user.pl) and notice
although the holds are successfully displayed they have no 'Pickup
location' value

4. Go to the patron page in the staff client and click on the 'Hold(s)'
tab and notice a popup explaining the datatable Ajax error is loaded

5. Apply this patch

6. Repeat step 3 noticing this time in the
opac-user.pl a 'Pickup location' is displayed for the hold you just
created.

6. Repeat step 4 and notice the hold datatable is successfully loaded
and populated without an Ajax error popup being loaded.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #130 from Alex Buckley  ---
Created attachment 81424
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81424=edit
Bug 15565: Fixed issues preventing any item-level holds being placed in OPAC

This commit fixes two bugs:

1. C4::Reserves->CanItemBeReserved() returns an output in a hash in the format:
status => 'output'

However opac-reserve.pl is not accessing th output of this function
correctly consequently no item is ever reservable.

And so after a patron submits the reservation form on opac-reserve.pl it
looks like the item-level reservation has successfully been placed
however it has not and no error message is displayed to them.

This commit stores the output of the aforementioned function in a hash
and then checks the value of the status key. As a result opac-reserve.pl
now correctly accesses the value returned and item level holds are
successfully placed from the OPAC.

2. If a biblio has previously been reserved then the opac-reserve.pl page
shows the 'Next available item' and 'A specific item' radio buttons to be
disabled to ensure patrons cannot place a reservation of a different
type on the biblio.

With both of these radio buttons being disabled it results in item level holds
placed in the OPAC on a previously reserved item not being stored in the
database. This is very confusing for users.

I have implemented a conditional which checks what the forced_hold_type
of the previous hold was. If it was 'item' then the $reqtype =
'Specific' and if it was 'record' then $reqtype is 'Any'.

This means there will always be a value for $reqtype, and this variable
is checked if it is equal to 'Specific' and if it is then an item level
hold is placed.

Test plan:
1. Ensure in your circulation rules that 'Item level holds' is enabled

2. Apply all patches on this bug report except this commit

3. In the OPAC try placing a item level hold (and notice you can submit
the opac-reserve.pl page and no error messages are displayed. However
the hold(s) are not being placed.

4. Place an item level hold(s) on the biblio from staff client interface
and then return to the opac-reserve.pl page for the biblio in the OPAC
and notice both the 'Next available' and 'A specific item' radio buttons
are disabled.

5. Again try placing an item level hold in the OPAC and notice dispite
no error/warning message being displayed the hold is not being placed.

6. Apply this patch

7. Restart memcached, and plack

8. In the staff client remove the reservation you placed from the staff
client.

9. Repeat step 3 and notice when you go to your opac summary
(opac-user.pl) page the holds are displayed. .i.e. You can now
successfully place item level holds in the OPAC.

10. Return to the opac-reserve.pl page for the biblio and notice that
because you have already placed a hold on this biblio the 'Next
available item' and 'A specific item' radiobuttons are disabled.

11. Select several of the items checkboxes to place more item level
holds and press the 'Confirm hold' button.

12. Go to your opac summary (opac-user.pl) page again and notice the
holds you placed in step 11 are shown there.

i.e. you can place item level holds from the OPAC on biblios which have
previously had reserves placed on them.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #129 from Alex Buckley  ---
Created attachment 81423
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81423=edit
Bug 15565: Remove use of GetBiblionumberFromItemnumber

Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #128 from Alex Buckley  ---
Created attachment 81422
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81422=edit
Bug 15565: Alert librarian that maximum holds per record is reached

Signed-off-by: Dani Elder 

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #126 from Alex Buckley  ---
Created attachment 81420
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81420=edit
Bug 15565: Use item's biblionumber only on item-level request

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #127 from Alex Buckley  ---
Created attachment 81421
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81421=edit
Bug 15565: Set 'found' parameter correctly when ReservesNeedReturns is off

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

--- Comment #125 from Alex Buckley  ---
Created attachment 81419
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81419=edit
Bug 15565: CSS changes

Note: Reworked as we have switched to CSS since this commit was first written.
This commit now contains 2 files:

* koha-tmpl/opac-tmpl/bootstrap/css/opac.css
* koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78820|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78816|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78818|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78817|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78819|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78821|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

   Assignee|alex.arn...@biblibre.com|alexbuck...@catalyst.net.nz

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78823|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

  Attachment #78822|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Alex Buckley  changed:

   What|Removed |Added

 Status|Failed QA   |BLOCKED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record in OPAC

2018-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Katrin Fischer  changed:

   What|Removed |Added

Summary|Place multiple holds at |Place multiple holds at
   |once for the same record|once for the same record in
   ||OPAC
 Status|Signed Off  |Failed QA

--- Comment #124 from Katrin Fischer  ---
Trying to work through this:

- I've rebased the patches (generated updated CSS file for the second patch)
- I've tested the current behaviour and am a little confused: It appears this
feature is already available for the staff side, so this is about adding it to
the OPAC side. I've adjusted the bug title. Correct? 

TOOD:

1) QA script fails:

- Tons of missing filters :(

2) Code review

Left over debug code:
use Data::Dumper;
warn $itemnumber;
warn $canreserve;
if ($canreserve) {
 warn $canreserve;
...

Little typo:
+# if we have an item selectionned,
selected :)

3) Add text for release notes (not blocker, can be done later)

Please clean up the patches quickly for testing this week! First tests are
looking good.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78719|0   |1
is obsolete||

--- Comment #122 from Lisette Scheer  ---
Created attachment 78822
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78822=edit
Bug 15565: Changed the retrieval of selected hold pickup branch in
opac-reserve.pl

Previously the selected branch dropdown value was not being successfully
retrieved in
opac-reserve.pl, this resulted in opac holds being placed with no pickup
branch being set.

Consequently as no branch was associated with the hold an Ajax error was
thrown when viewing the holds-table in the patron page in the staff
client.

This commit successfully retrieves the selected branch value and so
fixing the Ajax error.

Test plan:
1. Apply all patches on bug report 15565 except this commit

2. Place a hold(s) from opac-reserve.pl.

3. Go to your opac patron summary page (opac-user.pl) and notice
although the holds are successfully displayed they have no 'Pickup
location' value

4. Go to the patron page in the staff client and click on the 'Hold(s)'
tab and notice a popup explaining the datatable Ajax error is loaded

5. Apply this patch

6. Repeat step 3 noticing this time in the
opac-user.pl a 'Pickup location' is displayed for the hold you just
created.

6. Repeat step 4 and notice the hold datatable is successfully loaded
and populated without an Ajax error popup being loaded.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78718|0   |1
is obsolete||

--- Comment #121 from Lisette Scheer  ---
Created attachment 78821
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78821=edit
Bug 15565: Fixed issues preventing any item-level holds being placed in OPAC

This commit fixes two bugs:

1. C4::Reserves->CanItemBeReserved() returns an output in a hash in the format:
status => 'output'

However opac-reserve.pl is not accessing th output of this function
correctly consequently no item is ever reservable.

And so after a patron submits the reservation form on opac-reserve.pl it
looks like the item-level reservation has successfully been placed
however it has not and no error message is displayed to them.

This commit stores the output of the aforementioned function in a hash
and then checks the value of the status key. As a result opac-reserve.pl
now correctly accesses the value returned and item level holds are
successfully placed from the OPAC.

2. If a biblio has previously been reserved then the opac-reserve.pl page
shows the 'Next available item' and 'A specific item' radio buttons to be
disabled to ensure patrons cannot place a reservation of a different
type on the biblio.

With both of these radio buttons being disabled it results in item level holds
placed in the OPAC on a previously reserved item not being stored in the
database. This is very confusing for users.

I have implemented a conditional which checks what the forced_hold_type
of the previous hold was. If it was 'item' then the $reqtype =
'Specific' and if it was 'record' then $reqtype is 'Any'.

This means there will always be a value for $reqtype, and this variable
is checked if it is equal to 'Specific' and if it is then an item level
hold is placed.

Test plan:
1. Ensure in your circulation rules that 'Item level holds' is enabled

2. Apply all patches on this bug report except this commit

3. In the OPAC try placing a item level hold (and notice you can submit
the opac-reserve.pl page and no error messages are displayed. However
the hold(s) are not being placed.

4. Place an item level hold(s) on the biblio from staff client interface
and then return to the opac-reserve.pl page for the biblio in the OPAC
and notice both the 'Next available' and 'A specific item' radio buttons
are disabled.

5. Again try placing an item level hold in the OPAC and notice dispite
no error/warning message being displayed the hold is not being placed.

6. Apply this patch

7. Restart memcached, and plack

8. In the staff client remove the reservation you placed from the staff
client.

9. Repeat step 3 and notice when you go to your opac summary
(opac-user.pl) page the holds are displayed. .i.e. You can now
successfully place item level holds in the OPAC.

10. Return to the opac-reserve.pl page for the biblio and notice that
because you have already placed a hold on this biblio the 'Next
available item' and 'A specific item' radiobuttons are disabled.

11. Select several of the items checkboxes to place more item level
holds and press the 'Confirm hold' button.

12. Go to your opac summary (opac-user.pl) page again and notice the
holds you placed in step 11 are shown there.

i.e. you can place item level holds from the OPAC on biblios which have
previously had reserves placed on them.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78720|0   |1
is obsolete||

--- Comment #123 from Lisette Scheer  ---
Created attachment 78823
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78823=edit
Bug 15565: Allow up to (and including) maxreserves number of OPAC item
levelholds

This commit implements changes to opac-reserve.tt and opac-reserve.pl.

1. The change to opac-reserve.tt JS fixes the total_requested() function which
returns an output which is always 2 digits higher than the actual number of
selected item checkboxes.

i.e. if the 'maxreserves' syspref (limit for the overall
number of reserves allowed by a user) is 4 and a user has no previous
holds and ticks 3 item checkboxes and submits the form.

The 'Maximum number of reserve exceded.' popup message is displayed,
however as they have selected 3 items for reservation this is less than
the maxreserves value of 4.

The popup is displayed because total_requested() JS function is
returning 5 (i.e. 2 on top of the actual number of requested holds).

This commit usbtracts 2 from the number of holds calculated by
total_requested() so that the accurate number of requested holds is
being used to determine whether or not to display the excess holds
popup.

2. When the 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref are the same value (e.g. 4) you can tick 4 item
checkboxes in opac-reserve.pl and submit the form.

The form will submit successfully and to the user everything looks to
have worked however the holds will not be
successfully created.

This is because after the form is submitted to opac-reserve.pl a check is
done:

If 'number of submitted hold requests' + 'number of previous existing holds'
greater than or equal to maxreserves syspref then set the variable
'$canreserve' to 0.

If the $canreserve variable is 0 the form will submit, no warning/error
message is displayed to the user but the holds are not created.

Users should be able to place 4 holds if the maxreserves syspref is 4
(just not more than 4 holds). This commit changes this check to:

If 'number of submitted hold requests' + 'number of previous existing
holds' greater than maxreserves syspref then set the variable '$canreserve' to
0..

i.e. notice we only check for greater than (not equal to).

Which solves the bug of the form submitting and no holds being created
when the maxreserves syspref and 'Holds per record (count)' (circulation
rule) are the same.

Test plan (in two parts to test fix #1 and #2 (above)):

Test plan for fix #1:
1. Apply all patches on this bug report (15565) and follow and confirm
the feature works as described in the test plan in the first commit

2. Set the 'maxreserves' syspref to 3 (and 'Holds per record (count)'
(circulation rule) to 5)

3. Ensure your logged in patron account has no existing reserves

4. In the OPAC go to a biblio page with 3 or more items

5. In the reservation page (opac-reserve.pl) for that biblio select 2
item checkboes to place 2 item level holds and notice the 'Maximum
number of reserve exceded.' popup message is displayed.

As the maxreserves syspref value is 3 you should be able to place 2
holds without exceeding that value

6. Apply this patch

7. Repeat step 5 and notice the form submits without the exceeding popup
message and the holds are successfully placed.

Test plan for fix #2:
1. Apply all patches attached to this bug report (bug 15565) and perform
the test plan in the first commit and verify it works.

2. Set your 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref to the same value 3

3. Go to a biblio in the OPAC with 3 or more items

4. In the opac-reserve.pl reservation interface for that biblio tick 3
item checkboxes to place 3 item level holds and submit the form.

5. Notice the form submits and no warning/error message is displayed

6. In the opac user summary page that is displayed after the reserve
form is submitted notice the holds are not displayed this is because
they have not been placed

7. Apply this patch

8. Repeat step 4 and 5 and notice the holds have been successfully
placed and are displayed in your opac user summary page.

Sponsored-By: Brimbank Library
Signed-off-by: Lisette Scheer 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78716|0   |1
is obsolete||

--- Comment #119 from Lisette Scheer  ---
Created attachment 78819
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78819=edit
Bug 15565: Alert librarian that maximum holds per record is reached

Signed-off-by: Dani Elder 

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78717|0   |1
is obsolete||

--- Comment #120 from Lisette Scheer  ---
Created attachment 78820
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78820=edit
Bug 15565: Remove use of GetBiblionumberFromItemnumber

Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78713|0   |1
is obsolete||

--- Comment #116 from Lisette Scheer  ---
Created attachment 78816
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78816=edit
Bug 15565: CSS changes

Note: Reworked as we have switched to CSS since this commit was first written.
This commit now contains 2 files:

* koha-tmpl/opac-tmpl/bootstrap/css/opac.css
* koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78715|0   |1
is obsolete||

--- Comment #118 from Lisette Scheer  ---
Created attachment 78818
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78818=edit
Bug 15565: Set 'found' parameter correctly when ReservesNeedReturns is off

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78714|0   |1
is obsolete||

--- Comment #117 from Lisette Scheer  ---
Created attachment 78817
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78817=edit
Bug 15565: Use item's biblionumber only on item-level request

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

  Attachment #78712|0   |1
is obsolete||

--- Comment #115 from Lisette Scheer  ---
Created attachment 78815
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78815=edit
Bug 15565: Place multiple holds at once for the same record on staff and OPAC.

Test plan:
1. Create an circulation rule to use for testing the patches on this bug
report. Ensure it has a value greater than 1 for 'Holds
allowed', 'Holds per record (count)', and 'Item level holds' is enabled.

2. Also ensure the 'RequestOnOpac' syspref is set to 'Allow'.

3. Go to the reservation page (request.pl) of a biblio in the staff client with
more
than one item.

4. Notice beside each item a radio button is displayed preventing you
from being able to select multiple items to place a hold on.

5. Go to the reservation page (opac-reserve.pl) of the same biblio in the OPAC
also notice a radio button is displayed beside every item.

6. Apply patches

7. Repeat step 3 and 5 and notice in both the staff client and OPAC
checkboxes rather than radio buttons are displayed beside each item so
you can select multiple items for reservation at a time.

8. From staff interface, place several item-level holds for the same user
on the same record at once:

  - check that you are warned if you exceed "Holds per record (count)"
(circulation rules) for this record.
  - check also maxReserves system preference.

9. From opac, place several item-level and record level holds
for the same user on the same record at once:

  - check that can't exceed "Holds per record (count)" for
  this record.
  This is enforced by all unticked item checkboxes being
  disabled after the number of ticked checkboxes equals the 'Holds per record
(count)' (circulation rules) value.

  - check also maxReserves system preference.

Do the same in OPAC and staff by selecting several
record (multi-hold).

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Lisette Scheer  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

  Attachment #78423|0   |1
is obsolete||

--- Comment #111 from Chris Cormack  ---
Created attachment 78717
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78717=edit
Bug 15565: Remove use of GetBiblionumberFromItemnumber

Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

  Attachment #78425|0   |1
is obsolete||

--- Comment #113 from Chris Cormack  ---
Created attachment 78719
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78719=edit
Bug 15565: Changed the retrieval of selected hold pickup branch in
opac-reserve.pl

Previously the selected branch dropdown value was not being successfully
retrieved in
opac-reserve.pl, this resulted in opac holds being placed with no pickup
branch being set.

Consequently as no branch was associated with the hold an Ajax error was
thrown when viewing the holds-table in the patron page in the staff
client.

This commit successfully retrieves the selected branch value and so
fixing the Ajax error.

Test plan:
1. Apply all patches on bug report 15565 except this commit

2. Place a hold(s) from opac-reserve.pl.

3. Go to your opac patron summary page (opac-user.pl) and notice
although the holds are successfully displayed they have no 'Pickup
location' value

4. Go to the patron page in the staff client and click on the 'Hold(s)'
tab and notice a popup explaining the datatable Ajax error is loaded

5. Apply this patch

6. Repeat step 3 noticing this time in the
opac-user.pl a 'Pickup location' is displayed for the hold you just
created.

6. Repeat step 4 and notice the hold datatable is successfully loaded
and populated without an Ajax error popup being loaded.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

  Attachment #78426|0   |1
is obsolete||

--- Comment #114 from Chris Cormack  ---
Created attachment 78720
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78720=edit
Bug 15565: Allow up to (and including) maxreserves number of OPAC item
levelholds

This commit implements changes to opac-reserve.tt and opac-reserve.pl.

1. The change to opac-reserve.tt JS fixes the total_requested() function which
returns an output which is always 2 digits higher than the actual number of
selected item checkboxes.

i.e. if the 'maxreserves' syspref (limit for the overall
number of reserves allowed by a user) is 4 and a user has no previous
holds and ticks 3 item checkboxes and submits the form.

The 'Maximum number of reserve exceded.' popup message is displayed,
however as they have selected 3 items for reservation this is less than
the maxreserves value of 4.

The popup is displayed because total_requested() JS function is
returning 5 (i.e. 2 on top of the actual number of requested holds).

This commit usbtracts 2 from the number of holds calculated by
total_requested() so that the accurate number of requested holds is
being used to determine whether or not to display the excess holds
popup.

2. When the 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref are the same value (e.g. 4) you can tick 4 item
checkboxes in opac-reserve.pl and submit the form.

The form will submit successfully and to the user everything looks to
have worked however the holds will not be
successfully created.

This is because after the form is submitted to opac-reserve.pl a check is
done:

If 'number of submitted hold requests' + 'number of previous existing holds'
greater than or equal to maxreserves syspref then set the variable
'$canreserve' to 0.

If the $canreserve variable is 0 the form will submit, no warning/error
message is displayed to the user but the holds are not created.

Users should be able to place 4 holds if the maxreserves syspref is 4
(just not more than 4 holds). This commit changes this check to:

If 'number of submitted hold requests' + 'number of previous existing
holds' greater than maxreserves syspref then set the variable '$canreserve' to
0..

i.e. notice we only check for greater than (not equal to).

Which solves the bug of the form submitting and no holds being created
when the maxreserves syspref and 'Holds per record (count)' (circulation
rule) are the same.

Test plan (in two parts to test fix #1 and #2 (above)):

Test plan for fix #1:
1. Apply all patches on this bug report (15565) and follow and confirm
the feature works as described in the test plan in the first commit

2. Set the 'maxreserves' syspref to 3 (and 'Holds per record (count)'
(circulation rule) to 5)

3. Ensure your logged in patron account has no existing reserves

4. In the OPAC go to a biblio page with 3 or more items

5. In the reservation page (opac-reserve.pl) for that biblio select 2
item checkboes to place 2 item level holds and notice the 'Maximum
number of reserve exceded.' popup message is displayed.

As the maxreserves syspref value is 3 you should be able to place 2
holds without exceeding that value

6. Apply this patch

7. Repeat step 5 and notice the form submits without the exceeding popup
message and the holds are successfully placed.

Test plan for fix #2:
1. Apply all patches attached to this bug report (bug 15565) and perform
the test plan in the first commit and verify it works.

2. Set your 'Holds per record (count)' (circulation rule) and
'maxreserves' syspref to the same value 3

3. Go to a biblio in the OPAC with 3 or more items

4. In the opac-reserve.pl reservation interface for that biblio tick 3
item checkboxes to place 3 item level holds and submit the form.

5. Notice the form submits and no warning/error message is displayed

6. In the opac user summary page that is displayed after the reserve
form is submitted notice the holds are not displayed this is because
they have not been placed

7. Apply this patch

8. Repeat step 4 and 5 and notice the holds have been successfully
placed and are displayed in your opac user summary page.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

  Attachment #78424|0   |1
is obsolete||

--- Comment #112 from Chris Cormack  ---
Created attachment 78718
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78718=edit
Bug 15565: Fixed issues preventing any item-level holds being placed in OPAC

This commit fixes two bugs:

1. C4::Reserves->CanItemBeReserved() returns an output in a hash in the format:
status => 'output'

However opac-reserve.pl is not accessing th output of this function
correctly consequently no item is ever reservable.

And so after a patron submits the reservation form on opac-reserve.pl it
looks like the item-level reservation has successfully been placed
however it has not and no error message is displayed to them.

This commit stores the output of the aforementioned function in a hash
and then checks the value of the status key. As a result opac-reserve.pl
now correctly accesses the value returned and item level holds are
successfully placed from the OPAC.

2. If a biblio has previously been reserved then the opac-reserve.pl page
shows the 'Next available item' and 'A specific item' radio buttons to be
disabled to ensure patrons cannot place a reservation of a different
type on the biblio.

With both of these radio buttons being disabled it results in item level holds
placed in the OPAC on a previously reserved item not being stored in the
database. This is very confusing for users.

I have implemented a conditional which checks what the forced_hold_type
of the previous hold was. If it was 'item' then the $reqtype =
'Specific' and if it was 'record' then $reqtype is 'Any'.

This means there will always be a value for $reqtype, and this variable
is checked if it is equal to 'Specific' and if it is then an item level
hold is placed.

Test plan:
1. Ensure in your circulation rules that 'Item level holds' is enabled

2. Apply all patches on this bug report except this commit

3. In the OPAC try placing a item level hold (and notice you can submit
the opac-reserve.pl page and no error messages are displayed. However
the hold(s) are not being placed.

4. Place an item level hold(s) on the biblio from staff client interface
and then return to the opac-reserve.pl page for the biblio in the OPAC
and notice both the 'Next available' and 'A specific item' radio buttons
are disabled.

5. Again try placing an item level hold in the OPAC and notice dispite
no error/warning message being displayed the hold is not being placed.

6. Apply this patch

7. Restart memcached, and plack

8. In the staff client remove the reservation you placed from the staff
client.

9. Repeat step 3 and notice when you go to your opac summary
(opac-user.pl) page the holds are displayed. .i.e. You can now
successfully place item level holds in the OPAC.

10. Return to the opac-reserve.pl page for the biblio and notice that
because you have already placed a hold on this biblio the 'Next
available item' and 'A specific item' radiobuttons are disabled.

11. Select several of the items checkboxes to place more item level
holds and press the 'Confirm hold' button.

12. Go to your opac summary (opac-user.pl) page again and notice the
holds you placed in step 11 are shown there.

i.e. you can place item level holds from the OPAC on biblios which have
previously had reserves placed on them.

Sponsored-By: Brimbank Library

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

  Attachment #78420|0   |1
is obsolete||

--- Comment #108 from Chris Cormack  ---
Created attachment 78714
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78714=edit
Bug 15565: Use item's biblionumber only on item-level request

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15565] Place multiple holds at once for the same record

2018-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15565

Chris Cormack  changed:

   What|Removed |Added

  Attachment #78422|0   |1
is obsolete||

--- Comment #110 from Chris Cormack  ---
Created attachment 78716
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78716=edit
Bug 15565: Alert librarian that maximum holds per record is reached

Signed-off-by: Dani Elder 

Signed-off-by: Danielle Elder 

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Kyle M Hall 
Signed-off-by: Benjamin Rokseth 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

  1   2   3   >