<?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 - Unsuppressing works - Version 2 - Comments</title>
 <link>http://www.talis.com/tdn/node/1698</link>
 <description>Comments for &quot;Unsuppressing works - Version 2&quot;</description>
 <language>en</language>
<item>
 <title>excluding on basis of sequence</title>
 <link>http://www.talis.com/tdn/node/1698#comment-626</link>
 <description>&lt;p&gt;I&#039;m not entirely sure why the changes above would not work for you as if the work was requested through the interloan module then it would be in the ILL_REQUEST table and the item sequence wouldn&#039;t matter.&lt;/p&gt;
&lt;p&gt;However if you don&#039;t want to include items of a particular sequence in the items to be checked for a work then you can modify the check_for_items subroutine in the script.&lt;/p&gt;
&lt;p&gt;At the moment it is&lt;/p&gt;
&lt;p&gt;sub check_for_items&lt;br /&gt;
{&lt;br /&gt;
	my ($work_id) = @_;&lt;/p&gt;
&lt;p&gt;        (@item_rows) = &amp;amp;sql($d, &quot;	select	STATUS_ID&lt;br /&gt;
					from	ITEM&lt;br /&gt;
					where	WORK_ID = $work_id&quot;);&lt;/p&gt;
&lt;p&gt;	return @item_rows;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;The select statement could be changed to &lt;/p&gt;
&lt;p&gt;sub check_for_items&lt;br /&gt;
{&lt;br /&gt;
	my ($work_id) = @_;&lt;/p&gt;
&lt;p&gt;	(@item_rows) = &amp;amp;sql($d, &quot;	select	STATUS_ID&lt;br /&gt;
					from	ITEM&lt;br /&gt;
	 				where	WORK_ID = $work_id&lt;br /&gt;
					and SEQUENCE_ID != &#039;ILL&#039;&lt;br /&gt;
                                &quot;);&lt;/p&gt;
&lt;p&gt;	return @item_rows;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;I have assumed that the sequence code is ILL but change it as required.  Because a not statement is being used script performance may be affected.&lt;/p&gt;
&lt;p&gt;I think this will work but as usual test the changes fully on your MIS server until you are happy that the correct database updates are being made before running on the live server.&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Fri, 25 Jan 2008 11:50:20 +0000</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 626 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>excluding an &quot;unsupression&quot; on basis of Sequence</title>
 <link>http://www.talis.com/tdn/node/1698#comment-625</link>
 <description>&lt;p&gt;Our ILLs all have a sequence of &quot;ILL&quot; within Talis, and are manually supressed from OPAC (with the tickbox)as they are added to stock. Unfortunately these are being unsupressed each time the work_unsuppress_2.pl script is run, as it only filters things out by Status.&lt;br /&gt;
This is not a problem in the longrun, as they are all unsuppressed when they are finally returned to another authority either manually, or because they are withdrawn from stock, and the work_logdelete.pl script picks them up.&lt;br /&gt;
I would like to add some code to the work_unsuppress_2.pl script so that items with the &quot;ILL&quot; sequence are excluded from unsuppression, as the window of time before they are finally returned is typically several weeks, and we would like them to be unreservable during that period.&lt;br /&gt;
Any ideas what code I should use, and where it should be inserted?&lt;/p&gt;
</description>
 <pubDate>Fri, 25 Jan 2008 11:01:29 +0000</pubDate>
 <dc:creator>TimK</dc:creator>
 <guid isPermaLink="false">comment 625 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>work_unsuppress_2.pl script update</title>
 <link>http://www.talis.com/tdn/node/1698#comment-574</link>
 <description>&lt;p&gt;The work_unsuppress_2.pl script has been updated to correct a minor issue with the default parameter name and to ensure the changes in this thread are up-to-date.&lt;/p&gt;
&lt;p&gt;If you have previously downloaded the script please download the new version on the &lt;a href=&quot;http://www.talis.com/tdn/node/1450&quot;&gt;Talis Alto Scripts Page&lt;/a&gt; and replace any previous versions.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Thu, 12 Jul 2007 10:59:55 +0100</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 574 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Usuppressing works update</title>
 <link>http://www.talis.com/tdn/node/1698#comment-461</link>
 <description>&lt;p&gt;This bit was missing from the bottom of my previous post:&lt;br /&gt;
and WORK_ID &amp;gt;= $end_id&quot;);&lt;br /&gt;
This all seems to work.&lt;br /&gt;
Thanks for your help,&lt;br /&gt;
cheers.&lt;/p&gt;
</description>
 <pubDate>Thu, 15 Feb 2007 12:33:08 +0000</pubDate>
 <dc:creator>John Springett</dc:creator>
 <guid isPermaLink="false">comment 461 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Unsuppressing works update</title>
 <link>http://www.talis.com/tdn/node/1698#comment-445</link>
 <description>&lt;p&gt;The unsuppress script v2 has been updated to only look at already suppressed works.&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Wed,  7 Feb 2007 15:07:14 +0000</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 445 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Unsuppressing works</title>
 <link>http://www.talis.com/tdn/node/1698#comment-444</link>
 <description>&lt;p&gt;I was using the control number to filter out the interloans but I&#039;m now using -&lt;br /&gt;
my (@works_rows) = &amp;amp;sql($d,&quot;&lt;br /&gt;
select	WORK_ID, STATUS, CONTROL_NUMBER&lt;br /&gt;
from	WORKS&lt;br /&gt;
where	WORK_ID &amp;gt;= $start_id&lt;br /&gt;
and MONOGRAPH=&#039;T&#039;&lt;br /&gt;
and WORK_ID not in (select WORK_ID from ILL_REQUEST)&lt;br /&gt;
and WORK_ID &amp;lt;= $end_id&quot;);&lt;/p&gt;
&lt;p&gt;This all seems to work.&lt;br /&gt;
Thanks for your help,&lt;br /&gt;
cheers.&lt;br /&gt;
John&lt;/p&gt;
</description>
 <pubDate>Wed,  7 Feb 2007 14:17:36 +0000</pubDate>
 <dc:creator>John Springett</dc:creator>
 <guid isPermaLink="false">comment 444 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Interloans works</title>
 <link>http://www.talis.com/tdn/node/1698#comment-440</link>
 <description>&lt;p&gt;The type of control number shouldn&#039;t have an effect on the display of the a work used for an interloan only. I say shouldn&#039;t as I don&#039;t know your local configuration.&lt;/p&gt;
&lt;p&gt;If you find works are appearing that weren&#039;t before then it needs to be investigated and your local settings taken into account.&lt;/p&gt;
&lt;p&gt;Also what did you alter in the script to avoid serials and interloans?  Someone else may wish to do the same in the future.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Fri,  2 Feb 2007 08:25:27 +0000</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 440 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Unsuppressing works</title>
 <link>http://www.talis.com/tdn/node/1698#comment-439</link>
 <description>&lt;p&gt;Although I&#039;ve just noticed that ILL&#039;s now create M control number and not &#039;I&#039; as before!! So these will all be unsuppressed and display on the catalogue.&lt;/p&gt;
</description>
 <pubDate>Thu,  1 Feb 2007 16:07:29 +0000</pubDate>
 <dc:creator>John Springett</dc:creator>
 <guid isPermaLink="false">comment 439 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Unsuppressing works - Version 2</title>
 <link>http://www.talis.com/tdn/node/1698#comment-438</link>
 <description>&lt;p&gt;Thank you, this worked perfectly on our MIS. I just changed it so to not included our I&#039;lls or serials as I&#039;m sure works have been suppressed with hundreds of &#039;in stock&#039; volumes. We are waiting on a new server so when it arrives this script will be run in our cron at least once a week maybe more.&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
&lt;p&gt;John&lt;/p&gt;
</description>
 <pubDate>Thu,  1 Feb 2007 15:57:32 +0000</pubDate>
 <dc:creator>John Springett</dc:creator>
 <guid isPermaLink="false">comment 438 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Unsuppressing works</title>
 <link>http://www.talis.com/tdn/node/1698#comment-437</link>
 <description>&lt;p&gt;The script is designed is to select batches of works as defined by the -b and -e range to check if the work should be unsuppressed.  Items are not suppressed as you mention in the posting although the items attached or not attached to a work will be govern if the work is unsuppressed.&lt;/p&gt;
&lt;p&gt;For each work processed if the work is of deleted status the next work is used.  &lt;/p&gt;
&lt;p&gt;If the work is not of deleted status then the script will check if the work is unsuppressed based on whether there is a row in the WORKS_META table.  &lt;/p&gt;
&lt;p&gt;The script then checks the work to see if there are any available items now based on the various parameter settings than would mean that the work should now be unsuppressed.&lt;/p&gt;
&lt;p&gt;Currently the script checks the WORKS_META table by running the following subroutine for each work that is not of deleted status.&lt;/p&gt;
&lt;p&gt;sub already_suppressed_marc21&lt;br /&gt;
{&lt;br /&gt;
        my ($work_id) = @_;&lt;/p&gt;
&lt;p&gt;        my ($rowcount) = &amp;amp;sql($d, &quot;     select  count(*)&lt;br /&gt;
                                        from    WORKS_META&lt;br /&gt;
                                        where   WORK_ID = $work_id&lt;br /&gt;
				&quot;);&lt;/p&gt;
&lt;p&gt;        return 0 if (!$rowcount);&lt;/p&gt;
&lt;p&gt;        return 1;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;As you can see it does not check the SUPPRESS_FROM_INDEX attribute. This means that it would be processing works that are not suppressed but are in the table. Although this should only mean that more effort is done than is strictly necessary and should be corrected.  &lt;/p&gt;
&lt;p&gt;What I suggest is updating the section above in the script with this code:&lt;/p&gt;
&lt;p&gt;        my ($rowcount) = &amp;amp;sql($d, &quot;     select  count(*)&lt;br /&gt;
                                        from    WORKS_META&lt;br /&gt;
                                        where   WORK_ID = $work_id&lt;br /&gt;
			    and SUPPRESS_FROM_INDEX=&#039;T&#039;&lt;br /&gt;
				&quot;);&lt;/p&gt;
&lt;p&gt;If you can test this, initially on the MIS server and that solves the issue then I will update the download.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brian Crampton&lt;br /&gt;
Developer, Talis&lt;/p&gt;
</description>
 <pubDate>Wed, 31 Jan 2007 17:00:51 +0000</pubDate>
 <dc:creator>Brian Crampton</dc:creator>
 <guid isPermaLink="false">comment 437 at http://www.talis.com/tdn</guid>
</item>
<item>
 <title>Unsuppressing works - Version 2</title>
 <link>http://www.talis.com/tdn/node/1698</link>
 <description>&lt;p&gt;This script seems to unsuppress everything that is &#039;In Stock&#039;, even if it wasn&#039;t suppressed in the first place. Is this correct? I&#039;ve managed to tell it not to unsuppress our ILL&#039;s and serial volume entries but has anyone managed to reduce the number of items unsuppressed. I thought I&#039;d done it by telling it to only retrieve the SUPPRESS_FROM_INDEX=&#039;T&#039; items from the WORK_META table but I must be doing something wrong.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;John&lt;/p&gt;
</description>
 <comments>http://www.talis.com/tdn/node/1698#comments</comments>
 <category domain="http://www.talis.com/tdn/taxonomy/term/54">Miscellaneous</category>
 <pubDate>Wed, 31 Jan 2007 13:30:19 +0000</pubDate>
 <dc:creator>John Springett</dc:creator>
 <guid isPermaLink="false">1698 at http://www.talis.com/tdn</guid>
</item>
</channel>
</rss>
