[Koha-bugs] [Bug 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

David Nind  changed:

   What|Removed |Added

   Keywords||release-notes-needed

--- Comment #13 from David Nind  ---
(In reply to Laura Escamilla from comment #9)
> (In reply to David Nind from comment #8)
> 
> David - did you restart the services (restart_all) after applying the patch?

For whatever reason, a restart_all didn't work for me, but a reset_all did. 

Testing notes (using KTD):

1. Output from step 1:

/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1
-sp term1 -m hold --patron 2352935676 --item 301310 --hold-mode +
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'hold'
SEND: 15+20260204210609AOCPL|AA2352935676|AB301310|ACterm1|
READ: 161N20260204   
210609AA2352935676|BR0|AB301310|AJGairm.|AOCPL|

2. Output from step 2:

/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1
-sp term1 -m hold --patron 2352935676 --item 301310 --hold-mode -
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'hold'
SEND: 15-20260204210707AOCPL|AA2352935676|AB301310|ACterm1|
READ: 160N20260204210707AA2352935676|AOCPL|AFError with transaction
drop_hold: |

3. After applying the patch a restart_all didn't work for (maybe it doesn't
restart the SIP emulator?). Instead, I did a reset_all and then repeated steps
1 and 2:

Output after patch from step 1:

/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1
-sp term1 -m hold --patron 2352935676 --item 301310 --hold-mode +
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'hold'
SEND: 15+20260204211241AOCPL|AA2352935676|AB301310|ACterm1|
READ: 161N20260204   
211241AA2352935676|BR0|AB301310|AJGairm.|AOCPL|

Output after patch from step 2:

/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1
-sp term1 -m hold --patron 2352935676 --item 301310 --hold-mode -
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'hold'
SEND: 15-20260204211250AOCPL|AA2352935676|AB301310|ACterm1|
READ: 161N20260204   
211250AA2352935676|BR0|AB301310|AJGairm.|AOCPL|AFHold Cancelled.|

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #12 from David Nind  ---
Created attachment 192505
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192505&action=edit
Bug 39204: Unit test

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #11 from David Nind  ---
Created attachment 192504
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192504&action=edit
Bug 39204: Added ability to cancel item-level holds via SIP

Test plan:

1. /kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su
term1 -sp term1 -m hold --patron 2352935676 --item 301310
--hold-mode +
2. /kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su
term1 -sp term1 -m hold --patron 2352935676 --item 301310
--hold-mode -
3. See the error:
1. AFError with transaction drop_hold:
4. Apply the patch & restart_all
5. Try step 2 again. See confirmation:
1.  AFHold Cancelled.
6. prove t/db_dependent/Koha/Hold.t
7. Sign off — have an amazing day!

Signed-off-by: Brendan Lawlor 
Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

David Nind  changed:

   What|Removed |Added

 Attachment #188009|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

David Nind  changed:

   What|Removed |Added

 Attachment #185921|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

David Nind  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
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Laura Escamilla  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

--- Comment #10 from Laura Escamilla  ---
I’ve confirmed this works on my end and the unit test is attached. I’m moving
it back to needs signoff. Happy to revisit if there’s a reproducible case where
it’s still failing.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2026-02-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #9 from Laura Escamilla  ---
(In reply to David Nind from comment #8)

David - did you restart the services (restart_all) after applying the patch?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-11-28 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA
 CC||[email protected]

--- Comment #8 from David Nind  ---
After applying the patch, I don't get the 'AFHold Cancelled' in the response:

/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1
-sp term1 -m hold --patron 2352935676 --item 301310 --hold-mode -
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'hold'
SEND: 15-20251128224811AOCPL|AA2352935676|AB301310|ACterm1|
READ: 160N20251128224811AA2352935676|AOCPL|AFError with transaction
drop_hold: |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-10-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #7 from Laura Escamilla  ---
(In reply to Martin Renvoize (ashimema) from comment #5)
> Can we have a unit test for this one please?

I've added a test!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-10-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||[email protected]
   ||o.uk

--- Comment #5 from Martin Renvoize (ashimema) 
 ---
Can we have a unit test for this one please?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-10-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #6 from Laura Escamilla  ---
Created attachment 188009
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188009&action=edit
Bug 39204: Unit test

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-10-16 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Laura Escamilla  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #4 from Brendan Lawlor  ---
This works and the tests pass:

 perl  misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1
-m hold --patron 2352935676 --item 301310 --hold-mode -
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNterm1|COterm1|CPCPL|
READ: 941

Trying 'hold'
SEND: 15-20250829133245AOCPL|AA2352935676|AB301310|ACterm1|
READ: 161N20250829   
133245AA2352935676|BR0|AB301310|AJGairm.|AOCPL|AFHold Cancelled.|

prove t/db_dependent/Koha/Hold.t
t/db_dependent/Koha/Hold.t .. ok
All tests successful.
Files=1, Tests=17,  9 wallclock secs ( 0.04 usr  0.01 sys +  6.47 cusr  1.45
csys =  7.97 CPU)
Result: PASS

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Brendan Lawlor  changed:

   What|Removed |Added

 Attachment #185913|0   |1
is obsolete||

--- Comment #3 from Brendan Lawlor  ---
Created attachment 185921
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185921&action=edit
Bug 39204: Added ability to cancel item-level holds via SIP

Test plan:

1. /kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su
term1 -sp term1 -m hold --patron 2352935676 --item 301310
--hold-mode +
2. /kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su
term1 -sp term1 -m hold --patron 2352935676 --item 301310
--hold-mode -
3. See the error:
1. AFError with transaction drop_hold:
4. Apply the patch & restart_all
5. Try step 2 again. See confirmation:
1.  AFHold Cancelled.
6. prove t/db_dependent/Koha/Hold.t
7. Sign off — have an amazing day!

Signed-off-by: Brendan Lawlor 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Brendan Lawlor  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
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Laura Escamilla  changed:

   What|Removed |Added

   Assignee|[email protected] |Laura.escamilla@bywatersolu
   |ity.org |tions.com
 CC||Laura.escamilla@bywatersolu
   ||tions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Laura Escamilla  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

--- Comment #2 from Laura Escamilla  ---
Created attachment 185913
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185913&action=edit
Bug 39204: Added ability to cancel item-level holds via SIP

Test plan:

1. /kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su
term1 -sp term1 -m hold --patron 2352935676 --item 301310
--hold-mode +
2. /kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su
term1 -sp term1 -m hold --patron 2352935676 --item 301310
--hold-mode -
3. See the error:
1. AFError with transaction drop_hold:
4. Apply the patch & restart_all
5. Try step 2 again. See confirmation:
1.  AFHold Cancelled.
6. prove t/db_dependent/Koha/Hold.t
7. Sign off — have an amazing day!

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-07-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Nick Clemens (kidclamp)  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #1 from Nick Clemens (kidclamp)  ---
This is a combined problem of do_hold and drop_hold not handling items
correctly.

After step 1 of Lucas' plan, view the patron in the staff interface, they have
a 'next available' hold in the biblio, not on the item

In C4/SIP/ILS/Transaction/Hold.pm

in do_hold:
 64 my $canReserve = CanItemBeReserved( $patron, $item, $branch );
 65 if ( $canReserve->{status} eq 'OK' ) {
 66 my $priority = C4::Reserves::CalculatePriority( $item->biblionumber
);
 67 AddReserve(
 68 {
 69 priority   => $priority,
 70 branchcode => $branch,
 71 borrowernumber => $patron->borrowernumber,
 72 biblionumber   => $item->biblionumber
 73 }
 74 );

We don't pass the itemnumber forward


Then in drop_hold - we use the itemnumber to cancel, but there is no item level
hold:
 93 my $item  = Koha::Items->find( { barcode => $self->{item}->id } );
 94 my $holds = $item->holds->search( { borrowernumber =>
$patron->borrowernumber } );
 95 
 96 return $self unless $holds->count;

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
[email protected]
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 39204] Problem with cancelling a hold via SIP without marking it as waiting returns an error

2025-04-09 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39204

Brendan Lawlor  changed:

   What|Removed |Added

 CC||[email protected]

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
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/