[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54514|0 |1 is obsolete|| --- Comment #56 from Tomás Cohen Arazi --- Created attachment 54691 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54691=edit Bug 14504: Add delete_items.pl: a command line batch deletion tool http://bugs.koha-community.org/show_bug.cgi?id=14504 Signed-off-by: Heather Braum Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54525|0 |1 is obsolete|| --- Comment #65 from Tomás Cohen Arazi --- Created attachment 54700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54700=edit Bug 14504: Changes missed while fixing patches Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54531|0 |1 is obsolete|| --- Comment #67 from Tomás Cohen Arazi --- Created attachment 54702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54702=edit Bug 14504: (QA followup) Change argument --criteria to --where Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54521|0 |1 is obsolete|| --- Comment #63 from Tomás Cohen Arazi --- Created attachment 54698 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54698=edit Bug 14504: (QA followup) Tidy tests This patch re-introduces the transaction into t/db_dependent/Items_DelItemCheck.t and does some cleaning on the touched tests so they raise less warnings. Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54516|0 |1 is obsolete|| --- Comment #58 from Tomás Cohen Arazi --- Created attachment 54693 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54693=edit bug 14504: split logic from DelItemCheck() into ItemSafeToDelete() Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54520|0 |1 is obsolete|| --- Comment #62 from Tomás Cohen Arazi --- Created attachment 54697 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54697=edit Bug 14504: (QA followup) fix test transaction, book_on_loan Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #68 from Tomás Cohen Arazi--- Created attachment 54703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54703=edit Bug 14504: (followup) Make deletion conditional on --commit Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54530|0 |1 is obsolete|| --- Comment #66 from Tomás Cohen Arazi --- Created attachment 54701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54701=edit Bug 14504: (QA followup) Fix error causing item not to be deleted Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54522|0 |1 is obsolete|| --- Comment #64 from Tomás Cohen Arazi --- Created attachment 54699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54699=edit Bug 14504: (QA followup) Fix delete_records_via_leader.pl call to DelItemCheck Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54519|0 |1 is obsolete|| --- Comment #61 from Tomás Cohen Arazi --- Created attachment 54696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54696=edit bug 14504: (QA followup) fixing DelItemCheck arguments Remove $dbh as argument to C4::Items::DelItemCheck and C4::Items::ItemSafeToDelete, also change all calls to these functions throughout the codebase. Also remove remaining reference to 'do_not_commit' in t/db_dependent/Items_DelItemCheck.t Fixed doubled "$$" in C4/ImportBatch.pm Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54518|0 |1 is obsolete|| --- Comment #60 from Tomás Cohen Arazi --- Created attachment 54695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54695=edit Bug 14504: (QA followup) use TestBuilder, remove do_not_commit Use t::lib::TestBuilder in t/db_dependent/Items_DelItemCheck.t Remove the option 'do_not_commit' from C4::Items::DelItemCheck. Whitespace cleanup. Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54517|0 |1 is obsolete|| --- Comment #59 from Tomás Cohen Arazi --- Created attachment 54694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54694=edit bug 14504: use C4::Items::DelItemCheck in delete_items.pl Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Attachment #54515|0 |1 is obsolete|| --- Comment #57 from Tomás Cohen Arazi --- Created attachment 54692 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54692=edit Bug 14504: (QA followup) * Fix POD warning. * Remove redundant 'use stric' and 'use warnings' * Remove $VERSION and --version option. * Remove --dry-run option * Split test for --help and check for @criteria into two separate pod2usage calls, enabling -msg on the latter. * Fix 'target_tiems' typo. * Test for holds on items to be deleted. * Fix whitespace * Fix test for holds. Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #55 from Barton Chittenden--- Created attachment 54531 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54531=edit Bug 14504: (QA followup) Change argument --criteria to --where -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #54 from Barton Chittenden--- Created attachment 54530 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54530=edit Bug 14504: (QA followup) Fix error causing item not to be deleted -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #53 from Kyle M Hall--- Created attachment 54525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54525=edit Bug 14504 - Changes missed while fixing patches -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #47 from Kyle M Hall--- Created attachment 54517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54517=edit bug 14504: use C4::Items::DelItemCheck in delete_items.pl -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #52 from Kyle M Hall--- Created attachment 54522 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54522=edit Bug 14504: (QA followup) Fix delete_records_via_leader.pl call to DelItemCheck Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #51 from Kyle M Hall--- Created attachment 54521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54521=edit Bug 14504: (QA followup) Tidy tests This patch re-introduces the transaction into t/db_dependent/Items_DelItemCheck.t and does some cleaning on the touched tests so they raise less warnings. Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #50 from Kyle M Hall--- Created attachment 54520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54520=edit Bug 14504: (QA followup) fix test transaction, book_on_loan -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #49 from Kyle M Hall--- Created attachment 54519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54519=edit bug 14504: (QA followup) fixing DelItemCheck arguments Remove $dbh as argument to C4::Items::DelItemCheck and C4::Items::ItemSafeToDelete, also change all calls to these functions throughout the codebase. Also remove remaining reference to 'do_not_commit' in t/db_dependent/Items_DelItemCheck.t Fixed doubled "$$" in C4/ImportBatch.pm -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #48 from Kyle M Hall--- Created attachment 54518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54518=edit Bug 14504: (QA followup) use TestBuilder, remove do_not_commit Use t::lib::TestBuilder in t/db_dependent/Items_DelItemCheck.t Remove the option 'do_not_commit' from C4::Items::DelItemCheck. Whitespace cleanup. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #46 from Kyle M Hall--- Created attachment 54516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54516=edit bug 14504: split logic from DelItemCheck() into ItemSafeToDelete() -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #45 from Kyle M Hall--- Created attachment 54515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54515=edit Bug 14504: (QA followup) * Fix POD warning. * Remove redundant 'use stric' and 'use warnings' * Remove $VERSION and --version option. * Remove --dry-run option * Split test for --help and check for @criteria into two separate pod2usage calls, enabling -msg on the latter. * Fix 'target_tiems' typo. * Test for holds on items to be deleted. * Fix whitespace * Fix test for holds. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Kyle M Hallchanged: What|Removed |Added Attachment #49648|0 |1 is obsolete|| Attachment #49649|0 |1 is obsolete|| Attachment #49650|0 |1 is obsolete|| Attachment #49651|0 |1 is obsolete|| Attachment #49652|0 |1 is obsolete|| Attachment #49653|0 |1 is obsolete|| Attachment #52425|0 |1 is obsolete|| Attachment #53224|0 |1 is obsolete|| Attachment #53225|0 |1 is obsolete|| --- Comment #44 from Kyle M Hall --- Created attachment 54514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54514=edit Bug 14504: Add delete_items.pl: a command line batch deletion tool http://bugs.koha-community.org/show_bug.cgi?id=14504 Signed-off-by: Heather Braum -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Nicole C. Engardchanged: What|Removed |Added CC||a...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tomás Cohen Arazichanged: What|Removed |Added Status|Needs Signoff |Failed QA CC||tomasco...@gmail.com --- Comment #43 from Tomás Cohen Arazi --- I've tested this patches and found some issues: * Somehow, it is not deleting items: I ran this: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ misc/cronjobs/delete_items.pl --verbose --criteria 'holdingbranch="MPL"' --commit Where statement: where holdingbranch="MPL" Deleting '41' But the item is still there. I'm not sure why :-D MariaDB [koha_kohadev]> SELECT itemnumber,holdingbranch,homebranch FROM items WHERE itemnumber=41; ++---++ | itemnumber | holdingbranch | homebranch | ++---++ | 41 | MPL | CPL| ++---++ 1 row in set (0.00 sec) * t/db_dependent/Items_DelItemCheck.t was missing the transaction, thus leaving cruft on the db (FIXED WITH A FOLLOWUP). This happened at some point when refactoring. * This is an opinionated item, and could be discussed, but I'd rather stick with --where instead of --criteria. I'd sign it if it was left as-is anyway. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #42 from Tomás Cohen Arazi--- Created attachment 53225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53225=edit Bug 14504: (QA followup) Fix delete_records_via_leader.pl call to DelItemCheck Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/ withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #41 from Tomás Cohen Arazi--- Created attachment 53224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53224=edit Bug 14504: (QA followup) Tidy tests This patch re-introduces the transaction into t/db_dependent/Items_DelItemCheck.t and does some cleaning on the touched tests so they raise less warnings. Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #40 from Barton Chittenden--- Created attachment 52425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52425=edit Bug 14504: (QA followup) fix test transaction, book_on_loan -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: 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 http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #39 from Jonathan Druart--- QA comments: 1/ The tests are not executed in a transaction 2/ I get the following warning: Argument "book_on_loan" isn't numeric in numeric eq (==) at misc/cronjobs/delete_items.pl line 62. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #38 from Jesse Weaver--- Patches rebased. Just noticed that "bug" isn't capitalized in some of the commit messages, whoever commits/pushes should probably fix that. :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Attachment #44013|0 |1 is obsolete|| --- Comment #36 from Jesse Weaver --- Created attachment 49652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49652=edit Bug 14504: (QA followup) use TestBuilder, remove do_not_commit Use t::lib::TestBuilder in t/db_dependent/Items_DelItemCheck.t Remove the option 'do_not_commit' from C4::Items::DelItemCheck. Whitespace cleanup. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Attachment #43789|0 |1 is obsolete|| --- Comment #35 from Jesse Weaver --- Created attachment 49651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49651=edit bug 14504: use C4::Items::DelItemCheck in delete_items.pl -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Attachment #45789|0 |1 is obsolete|| --- Comment #37 from Jesse Weaver --- Created attachment 49653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49653=edit bug 14504: (QA followup) fixing DelItemCheck arguments Remove $dbh as argument to C4::Items::DelItemCheck and C4::Items::ItemSafeToDelete, also change all calls to these functions throughout the codebase. Also remove remaining reference to 'do_not_commit' in t/db_dependent/Items_DelItemCheck.t Fixed doubled "$$" in C4/ImportBatch.pm -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Attachment #43788|0 |1 is obsolete|| --- Comment #34 from Jesse Weaver --- Created attachment 49650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49650=edit bug 14504: split logic from DelItemCheck() into ItemSafeToDelete() -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Attachment #43533|0 |1 is obsolete|| --- Comment #33 from Jesse Weaver --- Created attachment 49649 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49649=edit Bug 14504: (QA followup) * Fix POD warning. * Remove redundant 'use stric' and 'use warnings' * Remove $VERSION and --version option. * Remove --dry-run option * Split test for --help and check for @criteria into two separate pod2usage calls, enabling -msg on the latter. * Fix 'target_tiems' typo. * Test for holds on items to be deleted. * Fix whitespace * Fix test for holds. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Attachment #42978|0 |1 is obsolete|| --- Comment #32 from Jesse Weaver --- Created attachment 49648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49648=edit Bug 14504: Add delete_items.pl: a command line batch deletion tool http://bugs.koha-community.org/show_bug.cgi?id=14504 Signed-off-by: Heather Braum -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jesse Weaverchanged: What|Removed |Added CC||jwea...@bywatersolutions.co ||m --- Comment #31 from Jesse Weaver --- To add my own 2 cents: The primary reason that these patches modify 10 different files is that it was asked, as part of the QA process, that the $dbh parameter be removed from DelItemCheck. (Which requires that all of the connecting files be modified.) While the alternate solution is reasonable, it is not an existing coding pattern in Koha, and is none of this is in the coding guidelines. Barton and I will be working on rebasing the patches, but please keep the above in mind. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |Patch doesn't apply --- Comment #30 from Jonathan Druart --- These patches don't apply anymore. There are too much changes and too many patches, I have suggested a very simple solution months ago, now we have patches modifying 10 different files... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Attachment #44149|0 |1 is obsolete|| --- Comment #29 from Barton Chittenden --- Created attachment 45789 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45789=edit bug 14504: QA Followup -- fixing DelItemCheck arguments Remove $dbh as argument to C4::Items::DelItemCheck and C4::Items::ItemSafeToDelete, also change all calls to these functions throughout the codebase. Also remove remaining reference to 'do_not_commit' in t/db_dependent/Items_DelItemCheck.t Fixed doubled "$$" in C4/ImportBatch.pm -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Kyle M Hallchanged: What|Removed |Added CC||k...@bywatersolutions.com --- Comment #28 from Kyle M Hall --- (In reply to Martin Renvoize from comment #26) I think I must disagree on this one. I think the logic to determine if an item is safe to delete should definitely be divorced from the actual deletion. I think these changes along with the provided unit tests are a good improvement! I guess I don't see how using transactions in this situation is anything but a band-aid so to speak. If you think I've missed your point, please let me know! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #27 from Martin Renvoize--- s/your poor foundations/our poor foundations/ s/that becoming/that are becoming/ -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #26 from Martin Renvoize--- I'm in agreement with Jonathan that adding subs needlessly is a bad thing and therefore I do tend towards the transaction idea. More and more I'm of the opinion that data integrity lies firmly within the remit of the database. We really aught to get the constraints correct there first and not rely on lots of additional code logic all over the place doing it instead :| It's a hard thing to say, but I would prefer to have some of the foundations cleaned up rather than just adding yet more code to koha to compensate for your poor foundations. Sorry if this sounds really negative, but it's something I've felt for a while and I totally understand the want to get new and exciting features in quicker and quicker but I feel this is really leading to obfuscation and code bloat that becoming unmanageable.. where do we drawer the line? I won't complain if this is pushed.. but I don't think it's the most forward thinking solution I'm afraid. Also, as we've missed feature slush now it may be worth mentioning a few other queries: 1) Why use a dbh over using the dbic objects? (By using C4::Context to get your handle, you are already going through the pain of instantiating all the dbic class objects I believe anyway, so I don't see that using the handle directly here is of any benefit - Jonathan let me know if this is wrong?) 2) Line 928 in the final patch.. appears to have a double $$ (C4/ImportBatch.pm) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added CC||martin.renvoize@ptfs-europe ||.com --- Comment #25 from Jonathan Druart --- I have asked Martin to give his opinion. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Katrin Fischerchanged: What|Removed |Added CC||katrin.fisc...@bsz-bw.de --- Comment #24 from Katrin Fischer --- Hi Tom, this patch has missed the feature slush, which means it was not 'passed QA' by a certain date. It won't be included in 3.22. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #23 from Tom Misilo--- Is there any chance of this getting into the next version? Just curious as this would be very beneficial with automating our weeding procedures base on being missing for a set time period. Thanks! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #22 from Barton Chittenden--- Created attachment 44149 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44149=edit bug 14504: QA Followup -- fixing DelItemCheck arguments Remove $dbh as argument to C4::Items::DelItemCheck and C4::Items::ItemSafeToDelete, also change all calls to these functions throughout the codebase. Also remove remaining reference to 'do_not_commit' in t/db_dependent/Items_DelItemCheck.t -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #20 from Jonathan Druart--- Comment on attachment 44013 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44013 Bug 14504 QA Fixes -- use TestBuilder, remove do_not_commit Review of attachment 44013: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=14504=44013) - ::: C4/Items.pm @@ +2378,2 @@ > > +DelItemCheck( $dbh, $biblionumber, $itemnumber ); $dbh shouldn't pass as a parameter. @@ +2381,4 @@ > =cut > > sub DelItemCheck { > +my ( $dbh, $biblionumber, $itemnumber ) = @_; $dbh shouldn't pass as a parameter. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |Failed QA --- Comment #21 from Jonathan Druart --- 140 "DelItemCheck should delete item if 'do_not_commit' not set" => 'do_not_commit' occurrence. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #18 from Jonathan Druart--- (In reply to Kyle M Hall from comment #17) > (In reply to Jonathan Druart from comment #16) > > Barton, have you seen my suggestion on comment 12? > > I think it will be really easy to implement what you want using it (no > > change in pm and no additional tests). > > While your suggestions would definitely work, I think what Barton's changes > are a good and worthwhile improvement. The logic to for deciding if an item > is deletable should definitely be separate from the actual deleting of > items, and now we've got more through unit tests as well! Yes maybe you are right but we are adding 1 new subroutine and lot of code when the 2 start_transaction/rollback lines would make the job. Anyway, if you really want this way, I have still some concerns: 1/ Tests should create their own data (branchcode/categorycode), it is easier to use TestBuilder for that. 2/ I don't think a subroutine should take a do_not_commit parameter, this should not do it in the subroutine but from the scripts. Keeping the signed off status to get feedback from other QAers. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #19 from Barton Chittenden--- Created attachment 44013 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44013=edit Bug 14504 QA Fixes -- use TestBuilder, remove do_not_commit Use t::lib::TestBuilder in t/db_dependent/Items_DelItemCheck.t Remove the option 'do_not_commit' from C4::Items::DelItemCheck. Whitespace cleanup. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Kyle M Hallchanged: What|Removed |Added CC||kyle.m.h...@gmail.com --- Comment #17 from Kyle M Hall --- (In reply to Jonathan Druart from comment #16) > Barton, have you seen my suggestion on comment 12? > I think it will be really easy to implement what you want using it (no > change in pm and no additional tests). While your suggestions would definitely work, I think what Barton's changes are a good and worthwhile improvement. The logic to for deciding if an item is deletable should definitely be separate from the actual deleting of items, and now we've got more through unit tests as well! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #16 from Jonathan Druart--- Barton, have you seen my suggestion on comment 12? I think it will be really easy to implement what you want using it (no change in pm and no additional tests). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #13 from Barton Chittenden--- Created attachment 43788 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43788=edit bug 14504: split logic from DelItemCheck() into ItemSafeToDelete() -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #14 from Barton Chittenden--- Created attachment 43789 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43789=edit bug 14504: use C4::Items::DelItemCheck in delete_items.pl -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #15 from Barton Chittenden--- Jonathan, The call to C4::Context->IsSuperLibrarian() in C4::Items::ItemSafeToDelete (formerly in C4::Items::DelItemCheck) is throwing the following warning: C4::Context->userenv not defined! at /var/lib/koha/nekls2/kohaclone/C4/Items.pm line 2336. I've gone ahead and attached the patches, because everything else works, but thoughts about how to fix the "not_same_branch" code would be appreciated. --Barton -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #12 from Jonathan Druart--- I think an even better solution would be to do the job in a transaction and rollback if the commit flag is not there. So it would be something like: start transaction foreach items: is_deleted = DelItemCheck display error unless is_deleted if commit flag: commit else: rollback What do you think about that? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #9 from Jonathan Druart--- Barton, Actually I think you should reuse the C4::Items::DelItemCheck subroutine, which does exactly what you are doing. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #10 from Barton Chittenden--- (In reply to Jonathan Druart from comment #9) > Barton, > Actually I think you should reuse the C4::Items::DelItemCheck subroutine, > which does exactly what you are doing. Jonathan, C4::Items::DelItemCheck doesn't have any kind of 'commit' check... I'm torn, because I would *like* to use it to avoid duplication of code (plus there are a number of cases that it covers that I don't), but I don't want to sacrifice the ability to accurately report what's going to happen if I run the script in verbose mode without '--commit'. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #11 from Barton Chittenden--- (In reply to Barton Chittenden from comment #10) > (In reply to Jonathan Druart from comment #9) > > Barton, > > Actually I think you should reuse the C4::Items::DelItemCheck subroutine, > > which does exactly what you are doing. > > Jonathan, > > C4::Items::DelItemCheck doesn't have any kind of 'commit' check... I'm torn, > because I would *like* to use it to avoid duplication of code (plus there > are a number of cases that it covers that I don't), but I don't want to > sacrifice the ability to accurately report what's going to happen if I run > the script in verbose mode without '--commit'. Jonathan, Jesse Weaver (pianohacker) and I discussed this: 18:15 <@pianohacker> barton: I'd suggest to Joubu to either add a 'check_only' kind of parameter to DelItemCheck or move the check logic into a completely different function like ItemSafeToDelete (with a slight personal preference for the latter) 18:18 < barton> cleanest would probably be both -- write ItemSafeToDelete, then have DelItemCheck be a wrapper around DelItem which uses ItemSafeToDelete as its test. 18:18 <@pianohacker> yeah, definitely So I'd like to open a separate bug to * add C4::Items::ItemSafeToDelete() * add a 'do-not-commit' option to DelItemCheck (omitting the flag would make it work as usual) * Use C4::Items::ItemSafeToDelete to do the internal checking for DelItemCheck. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |Failed QA --- Comment #7 from Jonathan Druart --- Barton, it does not work: the items are never deleted. You should also launch the qa script every time you submit a patch, it will catch warnings/errors for you (here 2 trailing white-spaces). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Attachment #43445|0 |1 is obsolete|| --- Comment #8 from Barton Chittenden --- Created attachment 43533 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43533=edit Bug 14504 [QA Follow-up] * Fix POD warning. * Remove redundant 'use stric' and 'use warnings' * Remove $VERSION and --version option. * Remove --dry-run option * Split test for --help and check for @criteria into two separate pod2usage calls, enabling -msg on the latter. * Fix 'target_tiems' typo. * Test for holds on items to be deleted. * Fix whitespace * Fix test for holds. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #6 from Barton Chittenden--- Created attachment 43445 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43445=edit Bug 14504 [QA Follow-up] * Fix POD warning. * Remove redundant 'use stric' and 'use warnings' * Remove $VERSION and --version option. * Remove --dry-run option * Split test for --help and check for @criteria into two separate pod2usage calls, enabling -msg on the latter. * Fix 'target_tiems' typo. * Test for holds on items to be deleted. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #5 from Jonathan Druart--- Comment on attachment 42978 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42978 [SIGNED-OFF] Bug 14504: Add delete_items.pl: a command line batch deletion tool Review of attachment 42978: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=14504=42978) - FAIL misc/cronjobs/delete_items.pl FAIL pod *** WARNING: Verbatim paragraph in NAME section in file misc/cronjobs/delete_items.pl ::: misc/cronjobs/delete_items.pl @@ +1,4 @@ > +#! /usr/bin/perl > + > +use warnings; > +use strict; warnings and strict are useless when Modern::Perl is already used. @@ +8,5 @@ > +use C4::Circulation; > +use Modern::Perl; > +use Pod::Usage; > + > +my $VERSION='1.0'; How this is useful? We usually don't use it in scripts. @@ +30,5 @@ > + , help => '' > + , manual=> '' > + , version => '' > + } > +}; I am not really in favor of these 2 variables. IMO it is preferable to stick to the structure of the already existing scripts in misc/* @@ +39,5 @@ > +, 'V|version' => sub { $OPTIONS->{flags}->{version} = 1 } > +, 'h|help' => sub { $OPTIONS->{flags}->{help} = 1 } > +, 'm|manual' => sub { $OPTIONS->{flags}->{manual}= 1 } > +, 'c|commit' => sub { $OPTIONS->{flags}->{commit}= 1 } # aka > DO-EET! > +, 'dry-run'=> sub { $OPTIONS->{flags}->{commit}= 0; I don't think dry-run is useful, it's in dry-run mode if commit is not given. @@ +51,5 @@ > +exit; > +} > + > +pod2usage( -verbose => 2 ) if $OPTIONS->{flags}->{manual}; > +pod2usage(1) if ( $OPTIONS->{flags}->{help} || scalar @criteria == 0 ); The script should not return 1 if help is specified. It would be good to display on error for the @criteria==0 case (see msg option of pod2usage). @@ +65,5 @@ > +my $where_clause = ' where ' . join ( " and ", @criteria ); > + > +verbose "Where statement: $where_clause"; > + > +$GLOBAL->{sth}->{target_tiems} = $dbh->prepare( $query->{target_items} . > $where_clause ); typo tiems vs items, I suppose. @@ +71,5 @@ > + > +DELITEM: while ( my $item = > $GLOBAL->{sth}->{target_tiems}->fetchrow_hashref() ) { > +my $issue = GetOpenIssue( $item->{itemnumber} ); > +if( defined $issue ) { > +verbose "Cannot delete '$item->{itemnumber}' -- item is checked out." Shouldn't we also search for holds? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |Failed QA CC||jonathan.dru...@bugs.koha-c ||ommunity.org -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittendenchanged: What|Removed |Added Attachment #40830|0 |1 is obsolete|| --- Comment #4 from Barton Chittenden --- Created attachment 42978 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42978=edit [SIGNED-OFF] Bug 14504: Add delete_items.pl: a command line batch deletion tool http://bugs.koha-community.org/show_bug.cgi?id=14504 Signed-off-by: Heather Braum -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Heather Braumchanged: What|Removed |Added CC||hbr...@nekls.org -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Zeno Tajolichanged: What|Removed |Added CC|z.taj...@cineca.it | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Zeno Tajolichanged: What|Removed |Added CC||z.taj...@cineca.it Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Nicole Engard (ByWater) nic...@bywatersolutions.com changed: What|Removed |Added CC||nic...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Tom Misilo misi...@fit.edu changed: What|Removed |Added CC||misi...@fit.edu -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #1 from Barton Chittenden bar...@bywatersolutions.com --- NAME delete_items.pl - A batch item deletion tool, which generates a query against the items database and deletes the items matching the criteria specified in the command line arguments. SYNOPSIS delete_items.pl [--help|--manual|--version] delete_items.pl [--verbose] [--dry-run] --criteria *SQL CONDITIONAL EXPRESSION* ... [--commit] OPTIONS --help Show the brief help information. --manual Read the manual, with examples. --version Show the version number and exit. --verbose Send the WHERE clause generated by the collected --criteria arguments, as well as items affected to Standard Out. --criteria The --criteria option may called multiple times. The following argument must be a syntactically valid SQL statement which is part of the WHERE clause querying the items table. These are joined by AND. --commit No items will be deleted unless the --commit flag is present. --dry-run Disables --commit flag and enables --verbose flag. EXAMPLES The following is an example of this script: delete_items.pl --criteria items.withdrawn ! 0 --criteria items.withdrawn_on $(date --date=13 month ago --rfc-3339=date) --commit delete_items.pl --criteria itemlost = '1' --criteria itemlost ='4' --criteria itemlost_on '2014-04-28' --commit DESCRIPTION This is a lightweight batch deletion tool for items, suitable for running in a cron job. AUTHOR Barton Chittenden bar...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittenden bar...@bywatersolutions.com changed: What|Removed |Added Assignee|gmcha...@gmail.com |bar...@bywatersolutions.com Status|NEW |ASSIGNED Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #3 from Barton Chittenden bar...@bywatersolutions.com --- Test plan: TESTING THE MAIN FUNCTIONALITY OF THE SCRIPT: = Create items with various values of itemlost and, withdrawn. Back-date the respective timestamps (itemlost_on, timestamp). Check out one or two of these items (this will exercise the safeguards against deleting checked out items). run delete_items.pl --criteria items.itemlost = your lost value here --criteria itemlost_on one day after items was lost --dry-run do the same using items.withdrawn and items.timestamp. The results of the queries will be written to STDOUT. If you are working in an instance that has lost or withdrawn items that you want to keep, you may want to adjust the itemlost_on or timestamp values of your test items accordingly. Once satisfied with the output using the '--dry-run' option, use '--commit' instead, then verifiy that the items have been deleted. run delete_items.pl on checked-out items. If you are running '--verbose' or '--dry-run', you should receive a message to stdout showing that the item was not deleted. OTHER THINGS TO TEST: = Run the script with the following options. Check the spelling and accuracy on --help and --manual, and make sure that the output from --version contains a version number. --help Show the brief help information. --manual Read the manual, with examples. --version Show the version number and exit. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 Barton Chittenden bar...@bywatersolutions.com 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 http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 14504] Add command-line script to batch delete items based on lost/withdrawn statuses
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504 --- Comment #2 from Barton Chittenden bar...@bywatersolutions.com --- Created attachment 40830 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40830action=edit add delete_items.pl: a command line batch deletion tool -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/