[Koha-bugs] [Bug 30847] Cleanup opac-reserve.pl

2022-10-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com
 Resolution|--- |FIXED
 Status|Pushed to master|RESOLVED

--- Comment #56 from Lucas Gass  ---
Missing dependency for 22.05.x, no backport

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #55 from Tomás Cohen Arazi  ---
Pushed to master for 22.11.

Nice work everyone, thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Version(s)||22.11.00
released in||
 Status|Passed QA   |Pushed to master

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #54 from Joonas Kylmälä  ---
Passing QA. Added one more patch, the last one, to remove an unused variable in
the opac-reserve.pl file.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #53 from Joonas Kylmälä  ---
Created attachment 139923
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139923=edit
Bug 30847: Remove unused variable

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #52 from Joonas Kylmälä  ---
Created attachment 139922
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139922=edit
Bug 30847: Consolidate code to check if patron can place holds and exit if they
cannot

This will save us fetching more info if we are denying the holds

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #51 from Joonas Kylmälä  ---
Created attachment 139921
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139921=edit
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can simply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #50 from Joonas Kylmälä  ---
Created attachment 139920
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139920=edit
Bug 30847: Don't declare undef variable for assignment

New holds have found set to undef - we can do this directly

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #49 from Joonas Kylmälä  ---
Created attachment 139919
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139919=edit
Bug 30847: Avoid fetching biblio object

Here the items biblionumber is either equal to the biblionumber passed
in or it is not and should be - we can just assign directly from the
item in all cases

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #48 from Joonas Kylmälä  ---
Created attachment 139918
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139918=edit
Bug 30847: Don't fetch patron twice

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #47 from Joonas Kylmälä  ---
Created attachment 139917
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139917=edit
Bug 30847: Remove unused OPACShowHoldQueueDetails

Search for the variables, they aren't used!

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #46 from Joonas Kylmälä  ---
Created attachment 139916
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139916=edit
Bug 30847: Remove unused noreserve parameter

This is defined but never used

To test:
1 - git grep noreserve
2 - only one ocurrence
3 - Apply patch
4 - repeat, no ocurrence
5 - Note the plural has a few uses

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Joonas Kylmälä  changed:

   What|Removed |Added

 Attachment #139628|0   |1
is obsolete||
 Attachment #139629|0   |1
is obsolete||
 Attachment #139630|0   |1
is obsolete||
 Attachment #139631|0   |1
is obsolete||
 Attachment #139632|0   |1
is obsolete||
 Attachment #139633|0   |1
is obsolete||
 Attachment #139634|0   |1
is obsolete||
 Attachment #139635|0   |1
is obsolete||

--- Comment #45 from Joonas Kylmälä  ---
Created attachment 139915
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139915=edit
Bug 30847: Cleanup calculation of holds and rank

Currently we loop over all the holds on the record to get a count of the
reserves not
waiting and a rank for the upcoming hold

We can simply count the number of nont waiting holds and add 1

Note: Before this patch the count of holds included the new hold we were going
to place
which meant rank and count were the same. I believe countaing existing holds
and our
upcoming rank is the correct behavior

To test:
 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their
priorty level'
 2 - Place a few holds on a bib on the staff side
 3 - Mark 1 waiting
 4 - Attempt to place hold on the bib on the opac
 5 - Note 'Your priority' and 'Number of holds' are the same number
 6 - Place another hold, confirm both increase
 7 - Set another hold waiting, confirm both decrease
 8 - Apply patch
 9 - Confirm 'Your priority' is now 1 greater than Number of holds
10 - Place a hold, set a hold waiting, confirm numbers adjust as appropriate

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Joonas Kylmälä  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
https://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 30847] Cleanup opac-reserve.pl

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Joonas Kylmälä  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |joonas.kylm...@iki.fi
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Signed Off

--- Comment #44 from Victor Grousset/tuxayo  ---
Here is a rebase.

Placing hold from staff and OPAC still works. Changing priorities and marking
as waiting still works.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138941|0   |1
is obsolete||

--- Comment #43 from Victor Grousset/tuxayo  ---
Created attachment 139635
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139635=edit
Bug 30847: Consolidate code to check if patron can place holds and exit if they
cannot

This will save us fetching more info if we are denying the holds

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138940|0   |1
is obsolete||

--- Comment #42 from Victor Grousset/tuxayo  ---
Created attachment 139634
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139634=edit
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can simply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138939|0   |1
is obsolete||

--- Comment #41 from Victor Grousset/tuxayo  ---
Created attachment 139633
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139633=edit
Bug 30847: Don't declare undef variable for assignment

New holds have found set to undef - we can do this directly

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138938|0   |1
is obsolete||

--- Comment #40 from Victor Grousset/tuxayo  ---
Created attachment 139632
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139632=edit
Bug 30847: Avoid fetching biblio object

Here the items biblionumber is either equal to the biblionumber passed
in or it is not and should be - we can just assign directly from the
item in all cases

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138937|0   |1
is obsolete||

--- Comment #39 from Victor Grousset/tuxayo  ---
Created attachment 139631
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139631=edit
Bug 30847: Don't fetch patron twice

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138936|0   |1
is obsolete||

--- Comment #38 from Victor Grousset/tuxayo  ---
Created attachment 139630
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139630=edit
Bug 30847: Remove unused OPACShowHoldQueueDetails

Search for the variables, they aren't used!

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138935|0   |1
is obsolete||

--- Comment #37 from Victor Grousset/tuxayo  ---
Created attachment 139629
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139629=edit
Bug 30847: Remove unused noreserve parameter

This is defined but never used

To test:
1 - git grep noreserve
2 - only one ocurrence
3 - Apply patch
4 - repeat, no ocurrence
5 - Note the plural has a few uses

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #138934|0   |1
is obsolete||

--- Comment #36 from Victor Grousset/tuxayo  ---
Created attachment 139628
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139628=edit
Bug 30847: Cleanup calculation of holds and rank

Currently we loop over all the holds on the record to get a count of the
reserves not
waiting and a rank for the upcoming hold

We can simply count the number of nont waiting holds and add 1

Note: Before this patch the count of holds included the new hold we were going
to place
which meant rank and count were the same. I believe countaing existing holds
and our
upcoming rank is the correct behavior

To test:
 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their
priorty level'
 2 - Place a few holds on a bib on the staff side
 3 - Mark 1 waiting
 4 - Attempt to place hold on the bib on the opac
 5 - Note 'Your priority' and 'Number of holds' are the same number
 6 - Place another hold, confirm both increase
 7 - Set another hold waiting, confirm both decrease
 8 - Apply patch
 9 - Confirm 'Your priority' is now 1 greater than Number of holds
10 - Place a hold, set a hold waiting, confirm numbers adjust as appropriate

Signed-off-by: Owen Leonard 
Rebased-by: Victor Grousset/tuxayo 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Joonas Kylmälä  changed:

   What|Removed |Added

 CC||joonas.kylm...@iki.fi
 Status|Signed Off  |Patch doesn't apply

--- Comment #35 from Joonas Kylmälä  ---
Needs a rebase due to the changes introduced in the dependency bug 31314 after
these patches were made.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #34 from Owen Leonard  ---
Created attachment 138941
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138941=edit
Bug 30847: Consolidate code to check if patron can place holds and exit if they
cannot

This will save us fetching more info if we are denying the holds

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #33 from Owen Leonard  ---
Created attachment 138940
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138940=edit
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can simply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #32 from Owen Leonard  ---
Created attachment 138939
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138939=edit
Bug 30847: Don't declare undef variable for assignment

New holds have found set to undef - we can do this directly

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #31 from Owen Leonard  ---
Created attachment 138938
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138938=edit
Bug 30847: Avoid fetching biblio object

Here the items biblionumber is either equal to the biblionumber passed
in or it is not and should be - we can just assign directly from the
item in all cases

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #30 from Owen Leonard  ---
Created attachment 138937
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138937=edit
Bug 30847: Don't fetch patron twice

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #29 from Owen Leonard  ---
Created attachment 138936
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138936=edit
Bug 30847: Remove unused OPACShowHoldQueueDetails

Search for the variables, they aren't used!

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #28 from Owen Leonard  ---
Created attachment 138935
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138935=edit
Bug 30847: Remove unused noreserve parameter

This is defined but never used

To test:
1 - git grep noreserve
2 - only one ocurrence
3 - Apply patch
4 - repeat, no ocurrence
5 - Note the plural has a few uses

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Owen Leonard  changed:

   What|Removed |Added

 Attachment #137668|0   |1
is obsolete||
 Attachment #137669|0   |1
is obsolete||
 Attachment #137670|0   |1
is obsolete||
 Attachment #137671|0   |1
is obsolete||
 Attachment #137672|0   |1
is obsolete||
 Attachment #137673|0   |1
is obsolete||
 Attachment #138654|0   |1
is obsolete||
 Attachment #138655|0   |1
is obsolete||

--- Comment #27 from Owen Leonard  ---
Created attachment 138934
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138934=edit
Bug 30847: Cleanup calculation of holds and rank

Currently we loop over all the holds on the record to get a count of the
reserves not
waiting and a rank for the upcoming hold

We can simply count the number of nont waiting holds and add 1

Note: Before this patch the count of holds included the new hold we were going
to place
which meant rank and count were the same. I believe countaing existing holds
and our
upcoming rank is the correct behavior

To test:
 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their
priorty level'
 2 - Place a few holds on a bib on the staff side
 3 - Mark 1 waiting
 4 - Attempt to place hold on the bib on the opac
 5 - Note 'Your priority' and 'Number of holds' are the same number
 6 - Place another hold, confirm both increase
 7 - Set another hold waiting, confirm both decrease
 8 - Apply patch
 9 - Confirm 'Your priority' is now 1 greater than Number of holds
10 - Place a hold, set a hold waiting, confirm numbers adjust as appropriate

Signed-off-by: Owen Leonard 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Owen Leonard  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
   Patch complexity|--- |Medium patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Depends on|31307   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31307
[Bug 31307] already_reserved never used in opac/opac-reserve.pl
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Depends on||31314


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31314
[Bug 31314] Remove GetItemsInfo from opac-reserve.pl
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Depends on|27272   |31307
 Status|Needs Signoff   |ASSIGNED


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27272
[Bug 27272] Move C4::Items::GetItemsInfo to Koha namespace
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31307
[Bug 31307] already_reserved never used in opac/opac-reserve.pl
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  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
https://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 30847] Cleanup opac-reserve.pl

2022-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137675|0   |1
is obsolete||

--- Comment #26 from Jonathan Druart  ---
Created attachment 138655
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138655=edit
Bug 30847: Consolidate code to check if patron can place holds and exit if they
cannot

This wil save us fetching more info if we are denying the holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137674|0   |1
is obsolete||

--- Comment #25 from Jonathan Druart  ---
Created attachment 138654
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138654=edit
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can si9mply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-08-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 CC||vic...@tuxayo.net
 Status|Needs Signoff   |Patch doesn't apply

--- Comment #24 from Victor Grousset/tuxayo  ---
Patch doesn't apply and doesn't even make conflicts, just fails. Why does
applying patches regularly does this?

Applying: Bug 30847: Don't get biblio/item info when placing holds
error: sha1 information is lacking or useless (opac/opac-reserve.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 30847: Don't get biblio/item info when placing holds

note: dependency bug 27272 is applied


patch -p1 <
/tmp/Bug-30847-Dont-get-biblioitem-info-when-placing-ho-giEvEm.patch 
patching file opac/opac-reserve.pl
Hunk #1 FAILED at 130.
1 out of 5 hunks FAILED -- saving rejects to file opac/opac-reserve.pl.rej

I never did this but it seems theoretically possible to manually apply(copy
paste lines!!!) the failed hunk but it would be quite tedious and unreliable.

Jonathan: if you don't have time to rebase I can do it, just push your local
version to a branch so I can use that and get conflict instead of this terrible
error.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

   Assignee|n...@bywatersolutions.com   |jonathan.druart+koha@gmail.
   ||com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #23 from Nick Clemens  ---
(In reply to Jonathan Druart from comment #22)
> Hi Nick, I have rebased your patches on top of bug 27272, hope you don't
> mind!
> I can also mark myself as assignee of the patches and continue their
> integration if you like.

Thanks! I do not mind at all ;-)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Depends on||27272

--- Comment #22 from Jonathan Druart  ---
Hi Nick, I have rebased your patches on top of bug 27272, hope you don't mind!
I can also mark myself as assignee of the patches and continue their
integration if you like.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27272
[Bug 27272] Move C4::Items::GetItemsInfo to Koha namespace
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #21 from Jonathan Druart  ---
Created attachment 137675
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137675=edit
Bug 30847: Consolidate code to check if patron can place holds and exit if they
cannot

This wil save us fetching more info if we are denying the holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #20 from Jonathan Druart  ---
Created attachment 137674
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137674=edit
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can si9mply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #19 from Jonathan Druart  ---
Created attachment 137673
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137673=edit
Bug 30847: Don't declrae undef variable for assignment

New holds have found set to undef - we can do this directly

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #18 from Jonathan Druart  ---
Created attachment 137672
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137672=edit
Bug 30847: Avoid fetching biblio object

Here the items biblionumber is either equal to the biblionumber passed in
or it is not and should be - we can just assign directly from the item in all
cases

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #17 from Jonathan Druart  ---
Created attachment 137671
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137671=edit
Bug 30847: Don't fetch patron twice

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #16 from Jonathan Druart  ---
Created attachment 137670
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137670=edit
Bug 30847: Remove unused OPACShowHoldQueueDetails

Search for the variables, they aren't used!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #15 from Jonathan Druart  ---
Created attachment 137669
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137669=edit
Bug 30847: Remove unused noreserve parameter

This is defined but never used

To test:
1 - git grep noreserve
2 - only one ocurrence
3 - Apply patch
4 - repeat, no ocurrence
5 - Note the plural has a few uses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-07-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #135340|0   |1
is obsolete||
 Attachment #135341|0   |1
is obsolete||
 Attachment #135342|0   |1
is obsolete||
 Attachment #135343|0   |1
is obsolete||
 Attachment #135344|0   |1
is obsolete||
 Attachment #135345|0   |1
is obsolete||
 Attachment #135346|0   |1
is obsolete||
 Attachment #135347|0   |1
is obsolete||
 Attachment #135348|0   |1
is obsolete||

--- Comment #14 from Jonathan Druart  ---
Created attachment 137668
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137668=edit
Bug 30847: Cleanup calculation of holds and rank

Currently we loop over all the holds on the record to get a count of the
reserves not
waiting and a rank for the upcoming hold

We can simply count the number of nont waiting holds and add 1

Note: Before this patch the count of holds included the new hold we were going
to place
which meant rank and count were the same. I believe countaing existing holds
and our
upcoming rank is the correct behavior

To test:
 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their
priorty level'
 2 - Place a few holds on a bib on the staff side
 3 - Mark 1 waiting
 4 - Attempt to place hold on the bib on the opac
 5 - Note 'Your priority' and 'Number of holds' are the same number
 6 - Place another hold, confirm both increase
 7 - Set another hold waiting, confirm both decrease
 8 - Apply patch
 9 - Confirm 'Your priority' is now 1 greater than Number of holds
10 - Place a hold, set a hold waiting, confirm numbers adjust as appropriate

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #13 from Caroline Cyr La Rose  ---
(In reply to Caroline Cyr La Rose from comment #12)
> Is this still to be tested or is it a duplicate or bug 27272?

*of

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Caroline Cyr La Rose  changed:

   What|Removed |Added

 CC||caroline.cyr-la-rose@inlibr
   ||o.com

--- Comment #12 from Caroline Cyr La Rose  ---
Is this still to be tested or is it a duplicate or bug 27272?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.druart+koha@gmail.
   ||com

--- Comment #11 from Jonathan Druart  ---
Nick, I am cleaning a lot on bug 27272 already!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Nick Clemens  changed:

   What|Removed |Added

   Assignee|oleon...@myacpl.org |n...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #10 from Nick Clemens  ---
Largely these changes should be small enough to read code for approval

To test:
1 - Apply patch
2 - Confirm placing holds on OPAC works
3 - Confirm patron blocked when:
marked 'gone no address'
marked 'lost'
has a restriction
is expired and expired patrons are blocked
has outstanding fines above maxoutstanding
has too many holds (more than maxreserves)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #9 from Nick Clemens  ---
Created attachment 135348
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135348=edit
Bug 30847: Consolidate code to check if patron can place holds and exit if they
cannot

This wil save us fetching more info if we are denying the holds

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #8 from Nick Clemens  ---
Created attachment 135347
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135347=edit
Bug 30847: Don't get biblio/item info when placing holds

The only bit we get form the hash is the rank and title
We can si9mply fetch the biblio once to calculate
no need to fetch all the info as we don't display or use it

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #7 from Nick Clemens  ---
Created attachment 135346
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135346=edit
Bug 30847: Don't declrae undef variable for assignment

New holds have found set to undef - we can do this directly

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #6 from Nick Clemens  ---
Created attachment 135345
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135345=edit
Bug 30847: Avoid fetching biblio object

Here the items biblionumber is either equal to the biblionumber passed in
or it is not and should be - we can just assign directly from the item in all
cases

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #5 from Nick Clemens  ---
Created attachment 135344
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135344=edit
Bug 30847: Remove %itemInfoHash

This is not used

git grep itemInfoHash
only 2 occurences - definition and population - never used

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #4 from Nick Clemens  ---
Created attachment 135343
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135343=edit
Bug 30847: Don't fetch patron twice

We already have a patron objetc, no need to fetch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #3 from Nick Clemens  ---
Created attachment 135342
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135342=edit
Bug 30847: Remove unused OPACShowHoldQueueDetails

Search for the variables, they aren't used!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #2 from Nick Clemens  ---
Created attachment 135341
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135341=edit
Bug 30847: Remove unused noreserve parameter

This is defined but never used

To test:
1 - git grep noreserve
2 - only one ocurrence
3 - Apply patch
4 - repeat, no ocurrence
5 - Note the plural has a few uses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

--- Comment #1 from Nick Clemens  ---
Created attachment 135340
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135340=edit
Bug 30847: Cleanup calculation of holds and rank

Currently we loop over all the holds on the record to get a count of the
reserves not
waiting and a rank for the upcoming hold

We can simply count the number of nont waiting holds and add 1

Note: Before this patch the count of holds included the new hold we were going
to place
which meant rank and count were the same. I believe countaing existing holds
and our
upcoming rank is the correct behavior

To test:
 1 - Set OPACShowHoldQueueDetails system preference to 'Show holds and their
priorty level'
 2 - Place a few holds on a bib on the staff side
 3 - Mark 1 waiting
 4 - Attempt to place hold on the bib on the opac
 5 - Note 'Your priority' and 'Number of holds' are the same number
 6 - Place another hold, confirm both increase
 7 - Set another hold waiting, confirm both decrease
 8 - Apply patch
 9 - Confirm 'Your priority' is now 1 greater than Number of holds
10 - Place a hold, set a hold waiting, confirm numbers adjust as appropriate

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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 30847] Cleanup opac-reserve.pl

2022-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30847

Nick Clemens  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/