[Koha-bugs] [Bug 31415] Script to automate converting holds to recalls

2024-02-23 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |BLOCKED

-- 
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 31415] Script to automate converting holds to recalls

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

--- Comment #15 from David Nind  ---
All looks good and now working as expected.

The documentation looks fine to me.

-- 
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 31415] Script to automate converting holds to recalls

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

David Nind  changed:

   What|Removed |Added

 Attachment #159010|0   |1
is obsolete||

--- Comment #14 from David Nind  ---
Created attachment 159017
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159017=edit
Bug 31415: Exclude found holds and fix hold ID call

Signed-off-by: David Nind 

-- 
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 31415] Script to automate converting holds to recalls

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

David Nind  changed:

   What|Removed |Added

 Attachment #157002|0   |1
is obsolete||

--- Comment #13 from David Nind  ---
Created attachment 159016
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159016=edit
Bug 31415: Script to automate converting holds to recalls

This patch adds a script which can be used to automatically convert the
oldest hold on a record to a recall, if there are a specified minimum
number of holds on the record.

To test:
1) Enable UseRecalls and configure circulation rules relevant to
recalls. Keep the 'on shelf recalls allowed' setting to 'any' for the
sake of testing ('all' would require all items to be checked out for the
hold to be converted to a recall)
2) Check out items from multiple records (at least 2 different records)
to Patron A.
3) Place multiple holds on each record (at least 2 holds).
4) Place multiple holds on another record which has no items checked
out.
5) We now have multiple records where the oldest hold is eligible for
recall, plus a record where the oldest hold is NOT eligible for
recall (because no items are checked out).
6) In your terminal, get into the shell and run the script. -v means
verbose and will print the holds that are converted into recalls.
--min 1 means there must be more than 1 hold on the record to be
considered.
  sudo koha-shell INSTANCE
  perl misc/cronjobs/recalls/convert_holds_to_recalls.pl -v --min 1
7) Confirm that, for the records where items are checked out and there
are multiple holds, the oldest hold was converted into a recall
8) Confirm that, for the record where no items are checked out, the
holds all remain and not converted into a recall.
9) Confirm documentation for the script looks good
  perldoc misc/cronjobs/recalls/convert_holds_to_recalls.pl

Sponsored-by: Auckland University of Technology
Signed-off-by: David Nind 

-- 
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 31415] Script to automate converting holds to recalls

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

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
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 31415] Script to automate converting holds to recalls

2023-11-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

--- Comment #12 from Aleisha Amohia  ---
Created attachment 159010
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159010=edit
Bug 31415: Exclude found holds and fix hold ID call

-- 
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 31415] Script to automate converting holds to recalls

2023-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

--- Comment #11 from David Nind  ---
I got this error message when testing again:

perl misc/cronjobs/recalls/convert_holds_to_recalls.pl -v --min 1
No reserves HOLD_CANCELLATION letter transported by email at
/kohadevbox/koha/C4/Letters.pm line 588.
The method Koha::Hold->hold_id is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Object.pm line 931
Koha::Object::AUTOLOAD('Koha::Hold=HASH(0x55b1c879dd50)') called at
misc/cronjobs/recalls/convert_holds_to_recalls.pl line 129

Do I need to make sure email is set up and that each of the patrons have an
email address?

The records and patrons I used were from different libraries, not sure whether
that should make a difference.

Setup:
1. Recalls:
   . Recalls allowed (total): 5
   . Recalls per record (count): 5 
   . On shelf recalls allowed: If any unavailable1
   . Recall due date interval (day): 5
   . Recall overdue fine amount: 5.00
   . Recall pickup period (day): 5
2. Checked out 3 items to Mary Burton (Effective Perl (139 - item 296), Perl
template toolkit (255 - item 564), Programming Perl (262 - item 578))
3. Placed holds on these records:
   - Effective Perl (139): Bobbie Middleton, Henry Acevedo, Lisa Charles
   - Perl template toolkit (255): Henry Acevedo, Lisa Charles, Bobbie Middleton
   - Programming Perl (262): Henry Acevedo, Lisa Charles, Bobbie Middleton
   - The complete novels / Jane Austen (19): Mary Burton, Lisa Charles
4. After running the script, got the error above. One recall was made for:
   - Effective Perl: requested by Bobbie Middleton

-- 
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 31415] Script to automate converting holds to recalls

2023-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

Aleisha Amohia  changed:

   What|Removed |Added

 Attachment #148112|0   |1
is obsolete||

--- Comment #10 from Aleisha Amohia  ---
Created attachment 157002
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157002=edit
Bug 31415: Script to automate converting holds to recalls

This patch adds a script which can be used to automatically convert the
oldest hold on a record to a recall, if there are a specified minimum
number of holds on the record.

To test:
1) Enable UseRecalls and configure circulation rules relevant to
recalls. Keep the 'on shelf recalls allowed' setting to 'any' for the
sake of testing ('all' would require all items to be checked out for the
hold to be converted to a recall)
2) Check out items from multiple records (at least 2 different records)
to Patron A.
3) Place multiple holds on each record (at least 2 holds).
4) Place multiple holds on another record which has no items checked
out.
5) We now have multiple records where the oldest hold is eligible for
recall, plus a record where the oldest hold is NOT eligible for
recall (because no items are checked out).
6) In your terminal, get into the shell and run the script. -v means
verbose and will print the holds that are converted into recalls.
--min 1 means there must be more than 1 hold on the record to be
considered.
  sudo koha-shell INSTANCE
  perl misc/cronjobs/recalls/convert_holds_to_recalls.pl -v --min 1
7) Confirm that, for the records where items are checked out and there
are multiple holds, the oldest hold was converted into a recall
8) Confirm that, for the record where no items are checked out, the
holds all remain and not converted into a recall.
9) Confirm documentation for the script looks good
  perldoc misc/cronjobs/recalls/convert_holds_to_recalls.pl

Sponsored-by: Auckland University of Technology
Signed-off-by: David Nind 

-- 
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 31415] Script to automate converting holds to recalls

2023-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

Aleisha Amohia  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
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 31415] Script to automate converting holds to recalls

2023-09-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

David Nind  changed:

   What|Removed |Added

 CC||da...@davidnind.com
 Status|Needs Signoff   |Failed QA

--- Comment #9 from David Nind  ---
I'm getting this error when running the script:

perl misc/cronjobs/recalls/convert_holds_to_recalls.pl -v --min 1

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Unknown column 'holddate' in 'order clause' at
/kohadevbox/koha/Koha/Objects.pm line 394

-- 
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 31415] Script to automate converting holds to recalls

2023-08-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

Emmi Takkinen  changed:

   What|Removed |Added

 CC||emmi.takki...@koha-suomi.fi

-- 
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 31415] Script to automate converting holds to recalls

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

Michal Denar  changed:

   What|Removed |Added

 CC||blac...@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 31415] Script to automate converting holds to recalls

2023-03-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31415

Aleisha Amohia  changed:

   What|Removed |Added

Summary|Script to automate  |Script to automate
   |converting reserves to  |converting holds to recalls
   |recalls |
  Text to go in the|This patch adds a script|This patch adds a script
  release notes|which can be used to|which can be used to
   |automatically convert the   |automatically convert the
   |oldest reserve on a record  |oldest hold on a record to
   |to a recall, if there are a |a recall, if there are a
   |specified minimum number of |specified minimum number of
   |reserves on the record. |holds on the record.

-- 
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/