<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.talis.com/tdn" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Talis Developer Network - Changing due dates for special occasions (christmas etc) - Comments</title>
 <link>http://www.talis.com/tdn/node/1131</link>
 <description>Comments for &quot;Changing due dates for special occasions (christmas etc)&quot;</description>
 <language>en</language>
<item>
 <title>due date article updated</title>
 <link>http://www.talis.com/tdn/node/1131#comment-362</link>
 <description>&lt;p&gt;The &lt;a href=&quot;/tdn2/system/files&amp;amp;file=art_lm195db01.pdf&quot;&gt;How to update due date rules via SQL&lt;/a&gt; article has been updated with details of Tim&#039;s script.&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Wed, 20 Sep 2006 12:35:52 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 362 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Thanks Tim</title>
 <link>http://www.talis.com/tdn/node/1131#comment-357</link>
 <description>&lt;p&gt;Thanks Tim,&lt;/p&gt;
&lt;p&gt;Much appreciated.&lt;/p&gt;
&lt;p&gt;my e-mail address is: markhughes @ wirral-libraries.net&lt;/p&gt;
&lt;p&gt;Cheers&lt;br /&gt;
Mark&lt;/p&gt;
&lt;p&gt;http://www.wirral-libraries.net/&lt;br /&gt;
http://www.stembystem.co.uk/&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Sep 2006 09:17:16 +0100</pubDate>
 <dc:creator>markhughes</dc:creator>
 <guid isPermaLink="false">comment 357 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Due dates script</title>
 <link>http://www.talis.com/tdn/node/1131#comment-355</link>
 <description>&lt;p&gt;OK. I&#039;ll update the article with the script.  &lt;/p&gt;
&lt;p&gt;I&#039;ll include something about the dead days script as well. &lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Sep 2006 09:03:17 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 355 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Dead days</title>
 <link>http://www.talis.com/tdn/node/1131#comment-353</link>
 <description>&lt;p&gt;By the way, our libraries have had a period of closure while moving from one premises to another, so we set the days as being dead for fines and returns, just in case anything slipped the net, and for other non standard loans.&lt;/p&gt;
&lt;p&gt;I have a &lt;a href=&quot;http://www.talis.com/forums/viewtopic.php?t=1133&amp;amp;start=0&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;highlight=dead&quot; title=&quot;find it in the forums!&quot;&gt;handy SQL statement&lt;/a&gt; that will iterate through all dates in a range and set the days as dead for individual site profiles.&lt;/p&gt;
&lt;p&gt;Tim Hodson&lt;br /&gt;
Herefordshire Libraries&lt;/p&gt;
&lt;p&gt;www.timhodson.com&lt;br /&gt;
informationtakesover.co.uk (blog)&lt;/p&gt;
</description>
 <pubDate>Mon, 18 Sep 2006 17:17:54 +0100</pubDate>
 <dc:creator>Tim Hodson</dc:creator>
 <guid isPermaLink="false">comment 353 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Due dates</title>
 <link>http://www.talis.com/tdn/node/1131#comment-352</link>
 <description>&lt;p&gt;Hi Mark,&lt;br /&gt;
The process is similar to that in the article...&lt;/p&gt;
&lt;p&gt;1/ create an &#039;emergency&#039; due date type, so where our due date type is normally named &#039;Z3W&#039; we created a new one named &#039;Z3WE&#039;&lt;/p&gt;
&lt;p&gt;2/ set the due date for &#039;Z3WE&#039; to the correct number of days or a particular date/time.  We use the spreadsheet as in the PDF brian linked, and set a number of days so that returns are staggered.&lt;/p&gt;
&lt;p&gt;3/ I then use a shell script that toggles the emergency due date on or off.  it accepts two arguments, the LOCATION_PROFILE_ID and whether to turn ON or OFF! This uses SQL as in the &#039;another approach&#039; section of the PDF.  The script is then set up in the cron for the early hours of the days on which the emergency rules will be turned ON and OFF.&lt;/p&gt;
&lt;p&gt;Mark, I will happily send you a copy of the script (I&#039;ll need your email!)&lt;/p&gt;
&lt;p&gt;Brian, perhaps it could be added to the appendix in the PDF?  I&#039;ll send you a copy tomorrow.&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;
Tim&lt;br /&gt;
---&lt;br /&gt;
Tim Hodson&lt;br /&gt;
Herefordshire Libraries&lt;/p&gt;
&lt;p&gt;www.timhodson.com&lt;br /&gt;
informationtakesover.co.uk (blog)&lt;/p&gt;
</description>
 <pubDate>Mon, 18 Sep 2006 17:10:24 +0100</pubDate>
 <dc:creator>Tim Hodson</dc:creator>
 <guid isPermaLink="false">comment 352 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Due dates</title>
 <link>http://www.talis.com/tdn/node/1131#comment-351</link>
 <description>&lt;p&gt;Brian,&lt;/p&gt;
&lt;p&gt;Thanks, I saw that, but as far as I can see that will change the due dates globally, not just for one site.  I think Tim had a script specifically for altering just one site without affecting all the others.&lt;/p&gt;
&lt;p&gt;Cheers&lt;br /&gt;
Mark&lt;/p&gt;
&lt;p&gt;http://www.wirral-libraries.net/&lt;br /&gt;
http://www.stembystem.co.uk/&lt;/p&gt;
</description>
 <pubDate>Mon, 18 Sep 2006 16:30:16 +0100</pubDate>
 <dc:creator>markhughes</dc:creator>
 <guid isPermaLink="false">comment 351 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>There is an article called</title>
 <link>http://www.talis.com/tdn/node/1131#comment-350</link>
 <description>&lt;p&gt;There is an article called &lt;a href=&quot;/tdn/system/files&amp;amp;file=art_lm195db01.pdf&quot;&gt;How to update due date rules via SQL&lt;/a&gt; on the TDN which has details about updating due dates including details and a script from Tim you might find helpful.&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Mon, 18 Sep 2006 12:41:38 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 350 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Due Dates</title>
 <link>http://www.talis.com/tdn/node/1131#comment-349</link>
 <description>&lt;p&gt;Tim,&lt;/p&gt;
&lt;p&gt;We are currently about to have a bit of refurbishment done to a few of our libraries and a script that could alter single sites due dates may be a help.  Any chance I could have a copy of the script you produced?&lt;/p&gt;
&lt;p&gt;Thanks&lt;br /&gt;
Mark&lt;/p&gt;
&lt;p&gt;http://www.wirral-libraries.net/&lt;br /&gt;
http://www.stembystem.co.uk/&lt;/p&gt;
</description>
 <pubDate>Mon, 18 Sep 2006 11:53:26 +0100</pubDate>
 <dc:creator>markhughes</dc:creator>
 <guid isPermaLink="false">comment 349 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Re:Changing due dates for special occasions (christmas etc)</title>
 <link>http://www.talis.com/tdn/node/1131#comment-150</link>
 <description>&lt;p&gt;Pretty much the same way.  Although for christmas we basically give everyone an extra week. (we are a public library so don&#039;t work to ends of term etc),  so a script which does as you described, sets the due date days to whatever we need.  I simply pass the DUE_DATE_ID and PERIOD_DAYS to the script.&lt;/p&gt;
&lt;p&gt;We give people a week, to try and spread out the returns after christmas, and to keep the due weekday to a day that is the borrowers &#039;usual&#039; day in.&lt;/p&gt;
&lt;p&gt;A cron script running in the morning of the appropraite week either giveth or taketh away that extra week.&lt;/p&gt;
&lt;p&gt;I also have a script that will toggle a single site&#039;s due dates from the defaults that every site uses, to a set of &#039;emergency&#039; due dates (and back again).  (due date types pre defined in talis) which can then have duedates changed at will.  I use these for times when a library is closed for an extended period and we don&#039;t want lots of books coming back.&lt;/p&gt;
</description>
 <pubDate>Fri, 23 Dec 2005 10:34:15 +0000</pubDate>
 <dc:creator>Tim Hodson</dc:creator>
 <guid isPermaLink="false">comment 150 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Re:Changing due dates for special occasions (christmas etc)</title>
 <link>http://www.talis.com/tdn/node/1131#comment-148</link>
 <description>&lt;p&gt;Tim,&lt;/p&gt;
&lt;p&gt;For holiday closures, we at Wirral work out which date for a particular loan period we need to stamp the books to, then we work out the number of days for that loan period. Then we run a script via the cron to set the due days.&lt;/p&gt;
&lt;p&gt;e.g. &lt;/p&gt;
&lt;p&gt;for a 4 week loan period we&#039;d use a script like:&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
case $# in&lt;br /&gt;
    2) break;&lt;br /&gt;
        ;;&lt;br /&gt;
    *)  echo &#039;\nUsage: script-name database period_days\n&#039; 1&amp;gt;&amp;amp;2; exit 1&lt;br /&gt;
esac&lt;/p&gt;
&lt;p&gt;date&lt;br /&gt;
isql -Usa -P &amp;lt;&amp;lt;- END &amp;gt; /scratch/set_due_4week.out&lt;/p&gt;
&lt;p&gt;use $1&lt;br /&gt;
go&lt;/p&gt;
&lt;p&gt;update DUE_DATE&lt;br /&gt;
set PERIOD_DAYS = $2&lt;br /&gt;
where DUE_DATE_ID = 6&lt;br /&gt;
go&lt;/p&gt;
&lt;p&gt;END&lt;br /&gt;
------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Then we&#039;d pass the script &#039;prod_talis&#039; as the database and for example, &#039;30&#039; as the new loan period.  We&#039;d run this script over a few days via the cron, passing the new loan period parameters each day, until on the last day it would get passed the normal &#039;28&#039; to reset the correct value.&lt;/p&gt;
&lt;p&gt;e.g. the cron line would be:&lt;br /&gt;
/bin/su - talis -c &quot;/users/talis/set_due_4week prod_talis 30&quot;&lt;/p&gt;
&lt;p&gt;then&lt;br /&gt;
/bin/su - talis -c &quot;/users/talis/set_due_4week prod_talis 29&quot;&lt;/p&gt;
&lt;p&gt;then&lt;br /&gt;
/bin/su - talis -c &quot;/users/talis/set_due_4week prod_talis 28&quot;&lt;/p&gt;
&lt;p&gt;Clear as mud eh?&lt;/p&gt;
&lt;p&gt;I&#039;d be interested in seeing how you go about it though.&lt;/p&gt;
&lt;p&gt;Cheers&lt;br /&gt;
Mark&lt;/p&gt;
</description>
 <pubDate>Thu, 22 Dec 2005 09:29:00 +0000</pubDate>
 <dc:creator>markhughes</dc:creator>
 <guid isPermaLink="false">comment 148 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Changing due dates for special occasions (christmas etc)</title>
 <link>http://www.talis.com/tdn/node/1131</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://www.talis.com/tdn/node/1131&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.talis.com/tdn/node/1131#comments</comments>
 <category domain="http://www.talis.com/tdn/taxonomy/term/54">Miscellaneous</category>
 <pubDate>Tue, 20 Dec 2005 09:22:07 +0000</pubDate>
 <dc:creator>Tim Hodson</dc:creator>
 <guid isPermaLink="false">1131 at http://www.talis.com/tdn</guid>
</item>
</channel>
</rss>
