http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14504

--- Comment #11 from Barton Chittenden <bar...@bywatersolutions.com> ---
(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/

Reply via email to