https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17656 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #54 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Alex Arnaud from comment #51)
(In reply to Josef Moravec from comment #49)
(In reply to Alex Arnaud from comment #46)
(In reply to Josef Moravec from comment #44)
Comment on attachment 70336 [details] [review] [review] [review] [review] Bug 17656 - Update irregularities on subscription renewals
Review of attachment 70336 [details] [review] [review] [review] [review]: -----------------------------------------------------------------
Better to add new subs just to Koha namespace... but I understand it here - we do not have all the objects needed for serials management (frequencies and number patterns are missing) and calling C4 subs from Koha namespace is not good idea... If you are not willing to add needed objects, we could just fill a bug for now...
Don't understand. You mean create Koha::Subscription->GuessEnddate?
Yes, that is what I ment.
I see one obstacle. GuessEnddate is used with the subscription's data itself in subscription-renew.pl and with data coming from the html form in subscription-add.pl. So method calls will be:
$subscription_object->GuessEnddate() in the first case, and $subscription_object->GuessEnddate($firstacquidate, $periodicity, ...) in the second one
Quite tricky no?
Not that tricky I think, you should use it like this: my $subscription_object = Koha::Subscription->new( { firstacquidate => "....", periodicity => "....", ... }); my $enddate = $subscription_object->guess_end_date; the call is always the same. It doesn't matter if it is in the database or not. If you wan't to save it to db, use ->store, but it is not an obligation. Also, please consider to change ->irregularities and ->permanent_irregularities to be getter and setter. -- You are receiving this mail because: You are watching all bug changes.