Josh, You may not need this but here is the SQL. It is tied to a cron.
UPDATE asset.copy SET age_protect=null WHERE id IN (SELECT ac.id FROM asset.copy ac INNER JOIN config.rule_age_hold_protect p ON ac.age_protect=p.id WHERE now()>ac.active_date + cast(p.age as interval)); On Tue, Dec 15, 2015 at 12:34 PM, Josh Stompro <[email protected]> wrote: > Blake and Tim, I would appreciate being able to see your scripts. > > Thanks > > > > Josh Stompro - LARL IT Director > > > > *From:* Open-ils-general [mailto: > [email protected]] *On Behalf Of *Blake > Henderson > *Sent:* Tuesday, December 15, 2015 9:27 AM > *To:* [email protected] > *Subject:* Re: [OPEN-ILS-GENERAL] Removing Age Protection after expired > > > > Josh, > > We have a custom made perl cron job to remove the protection. I didn't > realize it was a bug! I would be happy to share the perl script (it is > fairly custom to our needs but it can be adapted easily) > > -Blake- > > Conducting Magic > > MOBIUS > > 573-234-4513 > > 877-312-3517 > > On 12/15/2015 9:24 AM, Josh Stompro wrote: > > Hello, does anyone else out there remove the age protection from copies > after it has expired. I’ve been asked to set that up, and it seems like a > shame since it was designed to just work automatically, except that items > with expired age protection still show up as age protected in the catalog. > There is a bug open about it at > https://bugs.launchpad.net/evergreen/+bug/1251761 > > > > Does anyone currently go through and remove the age protection to get > around that issue? If so do you do it directly at the DB level or do you > use the client? Are there any gotchas about directly updating asset.copy > to change the age protection and also changing the shelving location at the > same time. > > > > If anyone wants to combine resources to get that bug fixed, either with > brain power or development funding let me know also. > > Josh > > > > Lake Agassiz Regional Library - Moorhead MN larl.org > > Josh Stompro | Office 218.233.3757 EXT-139 > > LARL IT Director | Cell 218.790.2110 > > > > > -- Tim Spindler [email protected] *P** Go Green - **Save a tree! Please don't print this e-mail unless it's really necessary.*
