[Bug 9296] New: overduerules table needs restructuring to allow future extension
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Bug ID: 9296 Summary: overduerules table needs restructuring to allow future extension Classification: Unclassified Change sponsored?: Sponsored Product: Koha Version: master Hardware: All URL: http://intranet/cgi-bin/koha/tools/overduerules.pl OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: mjr@software.coop Reporter: mjr@software.coop The overduerules table almost hard-wired to three standard notices, with fields like delay1, delay2, delay3. I want to expand it in the future, so I plan to change it to the following: CREATE TABLE `overduerules` ( -- overdue notice status and triggers `overduerules_id` mediumint NOT NULL AUTO_INCREMENT, `branchcode` varchar(10) NOT NULL default '', -- foreign key from the branches table to define which branch this rule is for (if blank it's all libraries) `categorycode` varchar(10) NOT NULL default '', -- foreign key from the categories table to define which patron category this rule is for `delay` int(4) default NULL, -- number of days after the item is overdue that this notice is sent `letter` varchar(20) default NULL, -- foreign key from the letter table to define which notice should be sent `debarred` varchar(1) default 0, -- is the patron restricted when this notice is sent (1 for yes, 0 for no) `typecode` varchar(10) NOT NULL default '1', -- 1 2 3 for first second third, may be extended later PRIMARY KEY (`overduerules_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; I think the existing user interface and cronjob can be made to work with this structure pretty easily. Patch to follow. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 --- Comment #1 from MJ Ray (software.coop) <mjr@software.coop> --- Created attachment 14161 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14161&action=edit Bug 9296 - restructure overduerules table to allow future extension The overduerules table is rather hardcoded to three notices. This patch restructures it so we could have more in future, but should not change anything noticeable yet. To test: 1) edit Tools: Overdue notices 2) cause some notices to be sent 3) notice how everything behaves the same as before -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |kyle@bywatersolutions.com --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- I attempted to fix the merge conflicts, but even after doing so I got the following errors when I ran misc/cronjobs/overdue_notices.pl Global symbol "@overdue_rules" requires explicit package name at misc/cronjobs/overdue_notices.pl line 432. Global symbol "@output_chunks" requires explicit package name at misc/cronjobs/overdue_notices.pl line 623. Global symbol "$admin_email_address" requires explicit package name at misc/cronjobs/overdue_notices.pl line 641. It also looks like some code is not treating it as an array of hashrefs, but as a hashref itself. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Ping! Any chance of a rebase for this one MJ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14161|0 |1 is obsolete| | --- Comment #4 from MJ Ray (software.coop) <mjr@software.coop> --- Created attachment 15779 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15779&action=edit Bug 9296 - restructure overduerules table to allow future extension The overduerules table is rather hardcoded to three notices. This patch restructures it so we could have more in future, but should not change anything noticeable yet. To test: 1) edit Tools: Overdue notices 2) cause some notices to be sent 3) notice how everything behaves the same as before -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #5 from MJ Ray (software.coop) <mjr@software.coop> --- rebased but I have not retested yet -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15779|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 15907 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15907&action=edit Bug 9296 - restructure overduerules table to allow future extension The overduerules table is rather hardcoded to three notices. This patch restructures it so we could have more in future, but should not change anything noticeable yet. To test: 1) edit Tools: Overdue notices 2) cause some notices to be sent 3) notice how everything behaves the same as before Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15907|0 |1 is obsolete| | --- Comment #7 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 18604 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18604&action=edit Bug 9296 - restructure overduerules table to allow future extension The overduerules table is rather hardcoded to three notices. This patch restructures it so we could have more in future, but should not change anything noticeable yet. To test: 1) edit Tools: Overdue notices 2) cause some notices to be sent 3) notice how everything behaves the same as before Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Simple rebase for updatedatabase -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Like the idea of this patch! A grep on delay1 shows me that there is still some work to do: misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl: max(overd uerules.branchcode) as rulebranch, TO_DAYS(NOW())-TO_DAYS(date_due) as daysoverd ue, delay1, delay2, delay3, misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl: AND ( (TO _DAYS(NOW())-TO_DAYS(date_due) ) = delay1 misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl: if ( $issue->{'da ysoverdue'} == $issue->{'delay1'} ) { t/db_dependent/lib/KohaTest/Overdues/GetBranchcodesWithOverdueRules.pm:delay1, letter1, debarred1, Probably same for delay2 etc. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Eric Bégin <eric.begin@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.begin@inLibro.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |francois.charbonnier@inlibr | |o.com, | |philippe.blouin@inlibro.com Assignee|mjr@software.coop |philippe.blouin@inlibro.com --- Comment #10 from Blou <philippe.blouin@inlibro.com> --- I'll continue MJ's work. We have this feature coming in http://wiki.koha-community.org/wiki/Overdue_Notice_Enhancement and this fits nicely with #12771. I see by the diff that there are still a lot of hardcoded 1s,2s and 3s, as well as 1..3. The plan is to remove those constraints. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12771 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. |http://bugs.koha-community. |org/bugzilla3/show_bug.cgi? |org/bugzilla3/show_bug.cgi? |id=12771 |id=13624 --- Comment #11 from Blou <philippe.blouin@inlibro.com> --- Note to keep this alive: The first step was to change the dependency with the mtt table. Done in #13624 We have also have an overhaul of the UI and overduenotices.pl in #12772 (submitted soon after internal tests). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9296 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12772 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org