[Koha-bugs] [Bug 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Brendan Lawlor  changed:

   What|Removed |Added

 Status|Signed Off  |Needs Signoff

--- Comment #13 from Brendan Lawlor  ---
Thanks for looking at this Emily!

I think I should have probably changed the status back to needs sign off when I
added the last two patches.

I'm not sure how to best clean up the commits because some are from me and some
from Nick. The commit messages describe the changes they are making and make
sense to me, but I understand how they could be confusing and it would be
clearer to look at this as a whole if they were squashed.

-- 
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Emily Lamancusa (emlam)  changed:

   What|Removed |Added

 CC||emily.lamancusa@montgomeryc
   ||ountymd.gov

--- Comment #12 from Emily Lamancusa (emlam) 
 ---
Is "Signed off" still the right status for this bug? It looks like 5 follow-ups
have been added since it was signed off, some of which contain refactoring that
seems out of scope to me...

I should be able to QA this if Nick isn't planning on it, but I'd want another
signoff and ideally some commit cleanup first (or clarity on why it isn't
needed).

-- 
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #11 from Brendan Lawlor  ---
Created attachment 175209
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175209&action=edit
Bug 35654: (follow-up) Fix $holdings_count

Fix the off by one error in the holdings_count to
accurately print the number of remaining items.

-- 
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #10 from Brendan Lawlor  ---
Created attachment 175208
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175208&action=edit
Bug 35654: (follow-up) Remove unneeded code and comment

This patch removes old code that was used for direct SQL

-- 
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Andrew Fuerste-Henry  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |blaw...@clamsnet.org
   |ity.org |

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #9 from Nick Clemens (kidclamp)  ---
Created attachment 175195
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175195&action=edit
Bug 35654: Use Koha::Items instead of direct SQL

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #8 from Nick Clemens (kidclamp)  ---
Created attachment 175194
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175194&action=edit
Bug 35654: Simplify and update delete_items.pl code

Rather than defining hashes and storing our options there, we can just use
variables directly, improves
readability IMO

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-12-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #7 from Nick Clemens (kidclamp)  ---
Created attachment 175193
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175193&action=edit
Bug 35654: (follow-up) Simplify variable use and only delete when commit is set

This patch leans up some things:
 - version option does nothing, so removed
 - warn when not setting commit and show conditional messages
 - remove use of Koha::Biblios and use item object methods

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-11-14 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #174480|0   |1
is obsolete||

--- Comment #6 from Andrew Fuerste-Henry  ---
Created attachment 174529
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174529&action=edit
Bug 35654: Add option to delete_items.pl cronjob to delete empty bibs

This patch adds a new option to the delete_items cronjob

When --del_bibs is set, bib records will be deleted
if the last item is deleted.

The following plan assumes default ktd data.

To test:
1. Apply patch
2. Check the holdings for bib #115 and see 3 items
  http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=115
2. Run the cron with the following flags
  perl ./misc/cronjobs/delete_items.pl --where "biblionumber=115 and homebranch
='MPL'" --verbose --del_bibs --commit
3. Notice in the output the count of current items on the bib record:
  Where statement:  where biblionumber=115 and homebranch='MPL'
  Deleting empty bib records!
  Deleting item '237' (of 3)
  Deleting item '238' (of 2)
4. Confirm the two Midway items were deleted from bib #115, and the bib still
exists with one item
4. Run the cron again but change the the --where flag to delete all the items
from bib #115
  perl ./misc/cronjobs/delete_items.pl --where "biblionumber=115" --verbose
--del_bibs --commit
5. Notice in the output the bib is deleted after the last item is deleted
  Where statement:  where biblionumber=115
  Deleting empty bib records!
  Deleting item '239' (of 1)
  Last item deleted - deleting bib '115'
8. Confirm the bib #115 was deleted
9. Add some more items and test with some other --where parameters
10. Test with and without --commit and --del_bibs, test the --help flag

Sponsored-by: CLAMS
Signed-off-by: Andrew Fuerste Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-11-14 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-11-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #5 from Brendan Lawlor  ---
Created attachment 174480
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174480&action=edit
Bug 35654: Add option to delete_items.pl cronjob to delete empty bibs

This patch adds a new option to the delete_items cronjob

When --del_bibs is set, bib records will be deleted
if the last item is deleted.

The following plan assumes default ktd data.

To test:
1. Apply patch
2. Check the holdings for bib #115 and see 3 items
  http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=115
2. Run the cron with the following flags
  perl ./misc/cronjobs/delete_items.pl --where "biblionumber=115 and homebranch
='MPL'" --verbose --del_bibs --commit
3. Notice in the output the count of current items on the bib record:
  Where statement:  where biblionumber=115 and homebranch='MPL'
  Deleting empty bib records!
  Deleting item '237' (of 3)
  Deleting item '238' (of 2)
4. Confirm the two Midway items were deleted from bib #115, and the bib still
exists with one item
4. Run the cron again but change the the --where flag to delete all the items
from bib #115
  perl ./misc/cronjobs/delete_items.pl --where "biblionumber=115" --verbose
--del_bibs --commit
5. Notice in the output the bib is deleted after the last item is deleted
  Where statement:  where biblionumber=115
  Deleting empty bib records!
  Deleting item '239' (of 1)
  Last item deleted - deleting bib '115'
8. Confirm the bib #115 was deleted
9. Add some more items and test with some other --where parameters
10. Test with and without --commit and --del_bibs, test the --help flag

Sponsored-by: CLAMS

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-11-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Brendan Lawlor  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
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-11-12 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Michelle Spinney  changed:

   What|Removed |Added

 CC||mspin...@clamsnet.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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

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

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 CC||and...@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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-04-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

--- Comment #4 from Katrin Fischer  ---
Hi Angela, I believe that this was filed with the idea to make it an option for
the CLI script, so you'd add it or not as needed, similar to how you can check
the checkbox in the GUI or leave it off.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

2024-04-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35654

Angela Berrett  changed:

   What|Removed |Added

 CC||angela.berrett@familysearch
   ||.org

--- Comment #3 from Angela Berrett  ---
Would this be optional or be coded to always happen?  We would definitely want
to choose when to delete the record or not.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 35654] Add option to delete_items.pl to delete record if existing item getting deleted is the only one attached to the bib

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

Enica Davis  changed:

   What|Removed |Added

Summary|Add option to delete last   |Add option to
   |item to delete_items.pl |delete_items.pl to delete
   ||record if existing item
   ||getting deleted is the only
   ||one attached to the bib

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/