Re: [OPEN-ILS-DEV] Duplicate authtokens

2017-02-08 Thread Bill Ott
Unfortunately, at the time I caught this in the logs, we were only 
logging warn, so I don't see the init call.  The method we were using to 
call init was not using nonce.


I've located a nice example in SIP.pm and will make a code change to use 
it in our init call going forward!




On 02/08/2017 01:15 PM, Mike Rylander wrote:

Bill,

Can you find the log entries for the offending sessions (should all be
around 6am, obv) for calls to open-ils.auth.authenticate.init?  The
first parameter is the username and the second is the nonce
(http://stackoverflow.com/questions/5050932/nonce-usage-in-authentication)
used to disambiguate session requests coming in at the same time.  The
nonce is based on the return value of rand($$) in the client (a random
number between 0 and the client pid minus 1), and if they're the same
then the same auth token could be generated.  They should not be the
same, of course, but if they are ... we may need to upgrade our PRNG
to something stronger from CPAN, like
http://search.cpan.org/~frew/Math-Random-Secure-0.08/lib/Math/Random/Secure.pm

Thanks,

--
Mike Rylander
  | President
  | Equinox Open Library Initiative
  | phone:  1-877-OPEN-ILS (673-6457)
  | email:  mi...@equinoxinitiative.org
  | web:  http://equinoxinitiative.org


On Wed, Feb 8, 2017 at 12:30 PM, Bill Ott <b...@grpl.org> wrote:

I'm not sure this if this is a bug, as I haven't totally wrapped my mind
around it, but we've had some bizarre behavior that I wanted to put on the
radar.

Ever since we upgraded to 2.11 in Dec., we've had occasional situations
where our automated book drops would start reporting the wrong OU on
checkin.  The WS name would be correct, but not the OU.  A restart of the
book drop service would correct it.  I hadn't reported it because I thought
it may have something to do with our custom services.

Today I found the smoking gun in the logs.  Drops restart every morning at
06:00.  They are using the same user, but different WS values.  The logs
showed 4 drops all with the same authtoken. When retrieving the ws_ou by
authtoken, you'd get the OU based on the first WS value.

I'm not sure if this is something with the new auth code, and we can't
reproduce it manually, but it seems that there's something about requesting
multiple logins using the same user at the same moment that causes
authtokens to be reused, even though the WS is different.

We've now created new distinct users for each drop and I suspect that will
prevent us from seeing this, but it seemed worth mentioning.




[OPEN-ILS-DEV] Duplicate authtokens

2017-02-08 Thread Bill Ott
I'm not sure this if this is a bug, as I haven't totally wrapped my mind 
around it, but we've had some bizarre behavior that I wanted to put on 
the radar.


Ever since we upgraded to 2.11 in Dec., we've had occasional situations 
where our automated book drops would start reporting the wrong OU on 
checkin.  The WS name would be correct, but not the OU.  A restart of 
the book drop service would correct it.  I hadn't reported it because I 
thought it may have something to do with our custom services.


Today I found the smoking gun in the logs.  Drops restart every morning 
at 06:00.  They are using the same user, but different WS values.  The 
logs showed 4 drops all with the same authtoken. When retrieving the 
ws_ou by authtoken, you'd get the OU based on the first WS value.


I'm not sure if this is something with the new auth code, and we can't 
reproduce it manually, but it seems that there's something about 
requesting multiple logins using the same user at the same moment that 
causes authtokens to be reused, even though the WS is different.


We've now created new distinct users for each drop and I suspect that 
will prevent us from seeing this, but it seemed worth mentioning.


[OPEN-ILS-DEV] Job Posting: Library System Admin/Developer

2015-11-23 Thread Bill Ott

Please excuse the cross posting.

I'll be brief here, please see the link for more information.

The Grand Rapids Public Library is seeking a Systems 
Administrator/Developer to join our team.


   http://www.grpl.org/work-at-grpl-library-systems-administrator/

--


Re: [OPEN-ILS-DEV] Action/Trigger print-on-demand

2012-01-27 Thread Bill Ott

On 1/26/12 9:36 PM, David Busby wrote:

Bill,
   You're running them with the action-trigger-runner.pl correct?


The beauty of 'circ.missing_pieces.letter.print', is that it happens 
immediately, regardless whether action_trigger_runner.pl is being run.  
In fact, the start_time happens even before the run_time.  That's what 
I'm trying to produce, and why I'm wondering if there's something 
special here that I'm not understanding.



A 'circ.missing_pieces.letter.print' event.


id  | 16522
target  | 15060456
event_def   | 34
add_time| 2012-01-25 11:03:44-05
run_time| 2012-01-25 11:08:44-05
start_time  | 2012-01-25 11:03:45-05
update_time | 2012-01-25 11:03:45.745413-05
complete_time   |
update_process  | 27015
state   | complete
template_output | 2358
error_output|
async_output|
user_data   |





If
you up the logging to level 3 there will be spew about the events and
loads of other details - was very helpful for me when debugging some
A/T stuffs.

/openils/bin/action_trigger_runner.pl \
   --debug-stdout \
   --verbose \
   --osrf-config=/openils/etc/opensrf_core.xml \
   --run-pending \
   --hooks=checkout.damaged


--
David Busby
Edoceo, Inc.
http://edoceo.com/
206.282.6500



On Thu, Jan 26, 2012 at 4:58 PM, Bill Ottb...@grpl.org  wrote:

I'm trying to create an action/trigger event, nearly identical to
'circ.missing_pieces.letter.print', in fact I've started by cloning that.  I
have everything setup the same as that event_definition, but am using the
hook for 'checkout.damaged'.  The event is created, but it's never
processed.

For the life of me, I can't figure out what's different.  Is there anything
special about 'circ.missing_pieces.letter.print', that I'm overlooking?



[OPEN-ILS-DEV] Action/Trigger print-on-demand

2012-01-26 Thread Bill Ott
I'm trying to create an action/trigger event, nearly identical to 
'circ.missing_pieces.letter.print', in fact I've started by cloning 
that.  I have everything setup the same as that event_definition, but am 
using the hook for 'checkout.damaged'.  The event is created, but it's 
never processed.


For the life of me, I can't figure out what's different.  Is there 
anything special about 'circ.missing_pieces.letter.print', that I'm 
overlooking?




Re: [OPEN-ILS-DEV] 2.1 RC2 upgrade script testing

2011-08-18 Thread Bill Ott

On 8/18/11 10:31 AM, Ben Shum wrote:

Short follow-up, just tested our script on a freshly restored test copy
of our DB and hit this error twice now:

psql:Evergreen-ILS-2.1-RC2/Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql:6003:
ERROR:  function force_unicode_normal_form(text, unknown) does not exist
LINE 1: SELECT force_unicode_normal_form(NEW.value,'NFC')
^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.
QUERY:  SELECT force_unicode_normal_form(NEW.value,'NFC')
CONTEXT:  PL/pgSQL function facet_force_nfc line 2 at assignment

No solution yet, still tinkering with what it means...



I believe that's what I stumbled upon and confused myself.  In short, 
add the schema.


https://bugs.launchpad.net/evergreen/+bug/825881


Re: [OPEN-ILS-DEV] Evergreen Woes

2011-05-12 Thread Bill Ott

On 5/12/11 4:18 AM, John H wrote:

Hello again Anoop

Thanks for all your time yesterday. I'm afraid I had to spend another
hour this morning fixing OpenSRF back to the stage we were at
yesterday - the Server returned no data error was back when I tried
the math.add test, although I was able to fix it by shutting things
down, deleting logs and pid files and restarting the services.

There must be some strict shutdown procedure that I'm missing - can
you point me to it?

I created the database schema with your command line and the software
went through a fairly lengthy creation with no errors on screen that I
noticed. However, afterwards I'm still getting the message TypeError:
g.my_libs_tree is null when logging on with the staff client. Any
more ideas?


I think step #3 in this section will help.
http://open-ils.org/dokuwiki/doku.php?id=server:2.0:install#starting_evergreen

autogen.sh generates some files based on table data that should, among 
other things, populate that libs_tree.


Re: [OPEN-ILS-DEV] actor.card creator and create_time

2010-12-06 Thread Bill Ott

Bill Erickson said the following on 12/06/2010 11:03 AM:


On Wed, Dec 1, 2010 at 10:03 AM, Bill Ott b...@grpl.org 
mailto:b...@grpl.org wrote:


We sometimes encounter disputes over when exactly a new library
card was issued.  Particularly when it comes to lost cards and
checkouts on reportedly lost cards.  While we can gleen much of
the information from the auditor tables, it's still not an exact
science.

Long ago I mentioned the possibility of adding a timestamp to the
card.  While it involves a dreaded schema change, the code to
store the data is very basic.  I also added a creator, as it's
another piece of information that is sometimes hard to track down.

For your review.  The attached, is against trunk.



Hi Bill.  Thanks for the patch!  I have a couple of comments:

1. For the date display in the registration UI, you can use something 
like this to get a nice locale-friendly date:


getByName(row, 'create_date').innerHTML =

openils.Util.timeStamp( card.create_date(), {formatLength: 
short} );



In en-US, this would be dd/mm/

2. create_date should also be added to CDBI/actor.pm http://actor.pm.

3. As of 2.0, there is a user purging database function that scrubs 
away the existence of a user.  The staff version of this call requires 
that any object linked to a staff user be handed over to another staff 
account during purge.  As such, any new fields added to the DB that 
link to (what in practice would have to be) a staff account, need to 
be accounted for in the purge routine.  The code lives 
in 999.functions.global.sql and it's called actor.usr_purge_data.  In 
here, there are a series of update commands grouped by schema for 
convenience.  Something like this should do it:


UPDATE actor.card SET creator = dest_usr WHERE creator = src_usr;

-b

--
Bill Erickson
| VP, Software Development  Integration
| Equinox Software, Inc. / Your Library's Guide to Open Source
| phone: 877-OPEN-ILS (673-6457)
| email: erick...@esilibrary.com mailto:erick...@esilibrary.com
| web: http://esilibrary.com



Thanks for the feedback Bill.  I've attached another patch with the 
noted changes, and included the SQL changes in the appropriate create 
scripts.



Index: Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===
--- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	(revision 18872)
+++ Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	(working copy)
@@ -775,6 +775,7 @@
 	my $session = shift;
 	my $patron = shift;
 	my $new_patron = shift;
+	my $user = shift;
 
 	my $evt;
 
@@ -786,7 +787,7 @@
 		if(ref($card) and $card-isnew()) {
 
 			$virtual_id = $card-id();
-			( $card, $evt ) = _add_card($session,$card);
+			( $card, $evt ) = _add_card($session,$card,$user);
 			return (undef, $evt) if $evt;
 
 			#if(ref($patron-card)) { $patron-card($patron-card-id); }
@@ -807,8 +808,9 @@
 
 # adds an card to the db and returns the card with new id
 sub _add_card {
-	my( $session, $card ) = @_;
+	my( $session, $card, $user ) = @_;
 	$card-clear_id();
+	$card-creator($user-id);
 
 	$logger-info(Adding new patron card .$card-barcode);
 
Index: Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm
===
--- Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm	(revision 18872)
+++ Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm	(working copy)
@@ -141,7 +141,7 @@
 
 __PACKAGE__-table( 'actor_card' );
 __PACKAGE__-columns( Primary = qw/id/ );
-__PACKAGE__-columns( Essential = qw/usr barcode active/ );
+__PACKAGE__-columns( Essential = qw/usr barcode active creator create_date/ );
 
 #---
 package actor::user_access_entry;
Index: Open-ILS/src/sql/Pg/005.schema.actors.sql
===
--- Open-ILS/src/sql/Pg/005.schema.actors.sql	(revision 18872)
+++ Open-ILS/src/sql/Pg/005.schema.actors.sql	(working copy)
@@ -286,7 +286,10 @@
 	id	SERIAL	PRIMARY KEY,
 	usr	INT	NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
 	barcode	TEXT	NOT NULL UNIQUE,
-	active	BOOL	NOT NULL DEFAULT TRUE
+	active	BOOL	NOT NULL DEFAULT TRUE,
+	creator INT	NOT NULL DEFAULT 1,
+	create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
+	CONSTRAINT actor_card_creator_fkey FOREIGN KEY (creator) REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
 );
 COMMENT ON TABLE actor.card IS $$
 /*
@@ -318,6 +321,7 @@
 CREATE INDEX actor_card_usr_idx ON actor.card (usr);
 CREATE INDEX actor_card_barcode_lower_idx ON actor.card (lower(barcode));
 
+
 CREATE TABLE actor.org_unit_type (
 	id		SERIAL	PRIMARY KEY,
 	name		TEXT	NOT NULL,
Index: Open-ILS/src/sql/Pg/999.functions.global.sql
===
--- Open-ILS/src/sql/Pg/999.functions.global.sql

[OPEN-ILS-DEV] actor.card creator and create_time

2010-12-01 Thread Bill Ott
We sometimes encounter disputes over when exactly a new library card was 
issued.  Particularly when it comes to lost cards and checkouts on 
reportedly lost cards.  While we can gleen much of the information from 
the auditor tables, it's still not an exact science.


Long ago I mentioned the possibility of adding a timestamp to the card. 
 While it involves a dreaded schema change, the code to store the data 
is very basic.  I also added a creator, as it's another piece of 
information that is sometimes hard to track down.


For your review.  The attached, is against trunk.


Index: Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===
--- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	(revision 18872)
+++ Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	(working copy)
@@ -775,6 +775,7 @@
 	my $session = shift;
 	my $patron = shift;
 	my $new_patron = shift;
+	my $user = shift;
 
 	my $evt;
 
@@ -786,7 +787,7 @@
 		if(ref($card) and $card-isnew()) {
 
 			$virtual_id = $card-id();
-			( $card, $evt ) = _add_card($session,$card);
+			( $card, $evt ) = _add_card($session,$card,$user);
 			return (undef, $evt) if $evt;
 
 			#if(ref($patron-card)) { $patron-card($patron-card-id); }
@@ -807,8 +808,9 @@
 
 # adds an card to the db and returns the card with new id
 sub _add_card {
-	my( $session, $card ) = @_;
+	my( $session, $card, $user ) = @_;
 	$card-clear_id();
+	$card-creator($user-id);
 
 	$logger-info(Adding new patron card .$card-barcode);
 
Index: Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm
===
--- Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm	(revision 18872)
+++ Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm	(working copy)
@@ -141,7 +141,7 @@
 
 __PACKAGE__-table( 'actor_card' );
 __PACKAGE__-columns( Primary = qw/id/ );
-__PACKAGE__-columns( Essential = qw/usr barcode active/ );
+__PACKAGE__-columns( Essential = qw/usr barcode active creator/ );
 
 #---
 package actor::user_access_entry;
Index: Open-ILS/web/js/ui/default/actor/user/register.js
===
--- Open-ILS/web/js/ui/default/actor/user/register.js	(revision 18872)
+++ Open-ILS/web/js/ui/default/actor/user/register.js	(working copy)
@@ -174,6 +174,7 @@
 dojo.byId('true').cloneNode(true) :
 dojo.byId('false').cloneNode(true)
 ); 
+	getByName(row, 'create_date').innerHTML = card.create_date();
 
 tbody.appendChild(row);
 first = false;
Index: Open-ILS/web/templates/default/actor/user/register.tt2
===
--- Open-ILS/web/templates/default/actor/user/register.tt2	(revision 18872)
+++ Open-ILS/web/templates/default/actor/user/register.tt2	(working copy)
@@ -48,17 +48,19 @@
 tr
 thBarcode/th
 thActive/th
+		thCreated/th
 /tr
 /thead
 tbody id='uedit-all-cards-tbody'
 tr id='uedit-all-cards-tr-template'
 tddiv name='barcode'/div/td
 tddiv name='active'/div/td
+		tddiv name='create_date'/div/td
 /tr
 /tbody
 tbody
 tr
-td colspan='2' style='text-align:center;'
+td colspan='3' style='text-align:right;'
 button dojoType='dijit.form.Button' onClick='allCardsDialog.hide()' scrollOnFocus='false'Close/button
 /td
 /tr
Index: Open-ILS/examples/fm_IDL.xml
===
--- Open-ILS/examples/fm_IDL.xml	(revision 18872)
+++ Open-ILS/examples/fm_IDL.xml	(working copy)
@@ -4020,9 +4020,12 @@
 			field reporter:label=Barcode name=barcode reporter:datatype=text/
 			field reporter:label=Card ID name=id reporter:datatype=id /
 			field reporter:label=User name=usr reporter:datatype=link/
+			field reporter:label=Creator name=creator reporter:datatype=link/
+			field reporter:label=Create Date name=create_date reporter:datatype=timestamp/
 		/fields
 		links
 			link field=usr reltype=has_a key=id map= class=au/
+			link field=creator reltype=has_a key=id map= class=au/
 		/links
 	/class
 	class id=actsc controller=open-ils.cstore open-ils.pcrud oils_obj:fieldmapper=actor::stat_cat oils_persist:tablename=actor.stat_cat reporter:label=User Statistical Category
ALTER TABLE actor.card 
	ADD creator INT NOT NULL default 1;

ALTER TABLE actor.card
	ADD create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now();

ALTER TABLE actor.card ADD CONSTRAINT actor_card_creator_fkey FOREIGN KEY (creator)
	REFERENCES actor.usr (id) DEFERRABLE INITIALLY 

Re: [OPEN-ILS-DEV] Restrict circulation quantity by type

2010-09-10 Thread Bill Ott

 Grant Johnson said the following on 09/10/2010 01:42 PM:

Hey,

We have just opened up out DVD's and Video's to allow them to
circulate.

Is there anyway to tell the system to restrict the total number of
items checked out by typ



Are you using in DB circ rules?  If not, there is a Javascript function, 
checkoutsByCircModifier, available in circ_lib.js.  We use this to total 
the circulation of videos, adding together a handful of circ mods.


[OPEN-ILS-DEV] ***SPAM*** typo in rdetail.js

2010-05-25 Thread Bill Ott
Attached is a very minor patch replacing a missing apostrophe in 
rdetail.js.  This is against rel_1_6_0



Index: Open-ILS/web/opac/skin/default/js/rdetail.js
===
--- Open-ILS/web/opac/skin/default/js/rdetail.js	(revision 16493)
+++ Open-ILS/web/opac/skin/default/js/rdetail.js	(working copy)
@@ -133,7 +133,7 @@
 		req.send();
 		if (isXUL()) {
 			var here = findOrgUnit(getLocation());
-			dojo.place(div id='mfhd_ad_menu/div, rdetail_details_table, after);
+			dojo.place(div id='mfhd_ad_menu'/div, rdetail_details_table, after);
 			var mfhd_add = new dijit.Menu({style:float: right;});
 			new dijit.MenuItem({onClick:function(){
 var req = new Request(CREATE_MFHD_RECORD, G.user.session, 1, here.id(), getRid());


[OPEN-ILS-DEV] Adding 856 tags in batch

2010-05-25 Thread Bill Ott
With the 856 URI display options in 1.6, we're having issues when a 
library system purchases a batch of new online resources.  If a record 
already exists for a title, we'd like to simply bring in the required 
856 tag(s) and add them to the record, keeping the existing tag(s) 
unchanged.  For a few it wouldn't be an issue, but when it comes down to 
thousands of titles, it's more difficult to just update manually.


Anyone have any suggestions about how to do this cleanly?  Am I 
overlooking something that I should know about or should have thought of?




Re: [OPEN-ILS-DEV] On BibTemplate and other stuff

2010-05-05 Thread Bill Ott


Mike Rylander said the following on 05/05/2010 12:34 PM:

Thanks to Dan Scott's great presentation on BibTemplate at the
Evergreen conference,



If anyone missed it, the video is now available:
   http://evergreen-ils.org/dokuwiki/doku.php?id=eg10


More session videos coming soon...



Re: [OPEN-ILS-DEV] use of z39.50 servers

2010-03-31 Thread Bill Ott

Luca Iacono said the following on 03/31/2010 08:11 AM:

How do I set up user and password for accessing z39.50 servers ? thanks



While OCLC requires an account, there are many free servers you can 
utillize.  The following describes the setup to add additional targets, 
as well as a link to an index of hosts.  I believe the Library of 
Congress should be installed by default, and does not require 
authentication.


http://open-ils.org/dokuwiki/doku.php?id=z39.50_targets


Re: [OPEN-ILS-DEV] Self-serve password reset thoughts

2010-03-28 Thread Bill Ott

On 3/28/10 6:36 PM, Dan Scott wrote:

I had a few minutes to pull together some thoughts on what we might want
from a self-serve password reset service and how it would be implemented
relatively securely at
http://evergreen-ils.org/dokuwiki/doku.php?id=dev:proposal:self_serve_password_reset
 This feature is something that is highly desired in our consortium, and I 
think it is something that should be supported out of the box. Our circ staff 
are tired of resetting passwords!

One thing I noted is that actor.usr.email does not have a unique
constraint on it - presumably because a given set of users might share a
single email account (spouses or a family are the likely cases that
spring to mind).

This complicates things considerably on the self-serve end, as my
current thoughts didn't account for this. I'm tempted to initially
disable self-serve password resets for accounts that don't have a unique
email address, because of the possible hilarity that could ensue if
account #1 issued a reset request for account #2, knowing that they
would be able to intercept the email with the password reset link.

I'm certainly interested in feedback on these initial thoughts about a
self-serve password reset service. I'm hoping to have the time to
implement this over the next few weeks, if I can carve out the time from
other duties :)
   



Ours is not quite as complex, but has been serving us well since we put 
it into production 18 months ago.


We simply accept a barcode and email address.  If they match a given 
account, the password is reset to a random 5-digit integer, which is 
emailed to the address.  The email of course does not contain a barcode 
or username, nor a link or any indication of where the password is to be 
used, so the receiving party would need to already have that information 
for it to be of use.  Because the value does not meet our complexity 
requirements, it must then be reset by the user following the first login.


The most common complaint comes from individuals that do not have a 
current email address in their account, and therefore cannot get the 
form to reset their password.




Re: [OPEN-ILS-DEV] Mac Staff Client

2010-03-10 Thread Bill Ott

Benjamin Shum said the following on 03/10/2010 04:11 PM:

Hey Grant,

We've seen that error pop up on our Mac staff clients (and Linux ones) as well 
since 1.6.0.0.  Our current Mac client users are using a 1.6.0.2 that I 
packaged together using a fresh source from our production server before we 
went live.

I asked once about it awhile back and it was mentioned in this IRC log:  
http://www.openevergreen.net/irc_logs/evergreen/2009-12/%23evergreen.04-Fri-2009.log
  It looked like there were some conflicting id collisions among the xul 
elements according to phasefx.
   



I've seen these as well.  Looking into it deeper is on my to-do list, 
but a quick kludge is to comment out line 316 (?) server/util/widgets.js


It looks pretty benign.


Re: [OPEN-ILS-DEV] Mac Staff Client

2010-03-10 Thread Bill Ott

Bill Ott said the following on 03/10/2010 04:15 PM:

Benjamin Shum said the following on 03/10/2010 04:11 PM:

Hey Grant,

We've seen that error pop up on our Mac staff clients (and Linux 
ones) as well since 1.6.0.0.  Our current Mac client users are using 
a 1.6.0.2 that I packaged together using a fresh source from our 
production server before we went live.


I asked once about it awhile back and it was mentioned in this IRC 
log:  
http://www.openevergreen.net/irc_logs/evergreen/2009-12/%23evergreen.04-Fri-2009.log  
It looked like there were some conflicting id collisions among the 
xul elements according to phasefx.



I've seen these as well.  Looking into it deeper is on my to-do list, 
but a quick kludge is to comment out line 316 (?) server/util/widgets.js


It looks pretty benign.



I'm feeling a little dirty for suggesting just commenting out error 
reporting.  The following would just quiet the noted error.




Index: widgets.js
===
--- widgets.js(revision 15779)
+++ widgets.js(working copy)
@@ -312,6 +312,9 @@
 case 'textbox' :
 n.value = t; n.setAttribute('value',t);
 break;
+case 'treecol' :
+// do something?
+break;
 default:
 alert(FIXME: util.widgets.set_text doesn't know how to 
handle  + n.nodeName);

 break;




Re: [OPEN-ILS-DEV] Problems getting client to run

2010-03-05 Thread Bill Ott

Sue Hopkins said the following on 03/05/2010 11:46 AM:


Is there a default username and password that I can seem to find? 
Since I cannot run the client, I can't find a way to add users and/or 
user groups.





The default user/password for a clean install is:   admin / open-ils





Re: [OPEN-ILS-DEV] new /openils/etc directory in 1.6.0.3 - questions

2010-03-02 Thread Bill Ott

On 3/2/10 6:38 PM, Sharp, Chris wrote:

Hey all,

I just upgraded my VirtualBox instance of Evergreen 1.6.0.2 to 1.6.0.3 and 
noticed the new /openils/etc directory, which *seems* to mirror the contents of 
/openils/conf... Could someone please explain the difference and maybe some 
thinking behind the change?
   


Sounds like you didn't specify --sysconfdir=/openils/conf   to the   
./configure




Re: [OPEN-ILS-DEV] new /openils/etc directory in 1.6.0.3 - questions

2010-03-02 Thread Bill Ott

On 3/2/10 6:55 PM, Sharp, Chris wrote:

Heh.  Yep - that's what happened :-).  I got rolling and didn't follow the 
upgrade instructions to the letter...

So, the follow-up question, then... I've synced the /openils/conf and 
/openils/etc directories so their contents are identical.  Will that cause 
problems?


I believe I did the same thing once and just fixed it with a quick symlink.


[OPEN-ILS-DEV] Shadow unavailable copies

2010-02-03 Thread Bill Ott
Attached is a minor patch to address the style display of unavailable 
copies in the staff client.  Thanks to Dan Wells for verifying the 
problem and fix.


see:
   https://bugs.launchpad.net/evergreen/+bug/516578


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Signed-off-by: Bill Ott  b...@grpl.org



Index: result_common.js
===
--- result_common.js	(revision 15437)
+++ result_common.js	(working copy)
@@ -739,7 +739,7 @@
 			/* here we style opac-invisible records for xul */
 
 			if( cts.depth == 0 ) {
-if(!cts.transcendant  !cts.unshadow) {
+if(cts.transcendant == null  cts.unshadow == 0) {
 	_debug(found an opac-shadowed record:  + rec.doc_id());
 	var row = cell.parentNode.parentNode.parentNode.parentNode.parentNode; 
 	if( cts.count == 0 ) 



Re: [OPEN-ILS-DEV] So close I can TASTE it

2010-02-01 Thread Bill Ott


Mike Rylander said the following on 02/01/2010 10:57 AM:

I've gone back through my pending-patch list, and I believe I've
applied all that are safe to apply.  There are 3 or 4 remaining, but I
don't feel safe applying them without a chance to test, and we're
already past critical mass on bug fixes for 1.6.0.1.  Dan Scott got a
whole pile of new and updated translations in last night, which was
the last big part (AFAICT) we needed.

So, this is a final call for fixes or backporting before we cut
1.6.0.1.  Speak now or hold your piece for a little while.
   



The complete_reshelving patch that Doug submitted in Nov., that takes 
transit time into account, would be handy, but it's easy enough to drop 
in ourselves if need be.  We've been using it in production under 1.4.x 
for a couple months now and it seems to do the trick.


Re: [OPEN-ILS-DEV] Evergreen SQL Help

2010-01-20 Thread Bill Ott
This seems like the perfect place to mention that Mike will be 
presenting Evergreen SQL 101 at the 2010 Evergreen Conference 
(http://www.evergreen2010.org).  Look for a full schedule of 
presentations coming out in the very near future!





Dan Wells said the following on 01/19/2010 09:45 PM:

That seems to do it.  Thanks Mike!  You are the best.

Sure looks simple, but I honestly wasn't even close.  I'll definitely commit 
this concept to memory for next time.

Dan

   

Mike Rylandermrylan...@gmail.com  01/19/10 9:09 PM
 

On Tue, Jan 19, 2010 at 6:32 PM, Dan Wellsd...@calvin.edu  wrote:
   

Hello,

Let me start by saying SQL is not my strong suit, and Postgres makes it even 
weaker.  What I am trying to do is write a single Postgres query/function which 
returns all of a user's work_ous and their ancestors without duplicates.  I see 
that actor.org_unit_ancestors() is there, and selecting the work_ous is simple 
enough, but how can one combine them into a single result set?  It seems 
relatively simple, but I just can't get it right.

 

How about:

select distinct (actor.org_unit_ancestors(work_ou)).id from
permission.usr_work_ou_map where usr = XXX;

   


Re: [OPEN-ILS-DEV] Small Bug in Automatic Lost Fee Void - Circulate.pm - Patch

2010-01-14 Thread Bill Ott

On 1/14/10 4:46 PM, Dan Wells wrote:

Hello all,

We have noticed a small bug in the optional automatic voiding of Lost Fees.  
The transaction is not marked as finished, as I believe it should be if there 
are no other billings (it still shows in the LOST area on the user's account).  
I am wondering if more logic will be needed for cases where the fee has been 
paid and a refund is generated, but we haven't run into that yet :)

This patch is against trunk.  For bug fixes, does it makes sense (would it be 
helpful) to provide a patch for the current branch as well?


Good catch Dan.  I think this was my miss when I submitted some changes 
to lost item handling some time ago.  I've massaged your patch into our 
1.4.? code and it works as expected.  In my original testing I 
apparently hadn't taken into account items left with no charges at all.




Re: [OPEN-ILS-DEV] Asterisk scheduling controls

2009-12-15 Thread Bill Ott

Josh Stompro said the following on 12/15/2009 03:06 PM:

Joe Atzberger wrote:
In the course of integrating Asterisk telephony with Evergreen's 
action/trigger notice structure, we have encountered a problem that 
you may have already come across, or possibly even solved.  The 
question is basically how to schedule call times (on the asterisk 
side), i.e. start at 9AM, stop at 9PM.
We are generating callfiles that are queued by moving them into the 
Asterisk spool directory.  We can tell Asterisk not to call before a 
certain time by setting the file's date modified time in the future. 
 So we have a mechanism for the begin time.  What we don't have is 
a mechanism to tell asterisk *not* to call after a given end time. 
 Anything that is in the dialplan logic itself does not appear 
suitable because that still processes the callfile and either 
succeeds or fails.  What we want is to *not* process the callfile, 
deferring it until the next start time.
The reason there has to be a cutoff is that EG might spool up several 
thousand calls to fire at the begin time, and it is conceivable 
that not all calls would be completed by the intended end.

Things we've ruled out:

* just turning off/on asterisk -- can't do that since local
  voicemail, incoming calls and desktop phones might depend on
  asterisk
* trying to adjust callfile date modified time inside dialplan --
  doesn't work, because the file is still processed, i.e. moved to
  the done dir at the end

So are there any solutions you guys have encountered?  This problem 
is very similar to print queue management on unix, so there may be 
products/packages in that problem-space that would work for us.

--Joe
I'm not at all familiar with the call files, so this is probably not 
an option, but would it be possible to move all spooled calls out of 
the call dir at a certain time, except the ones that are currently in 
use, and move them back in the next start time... Or modify the  date 
modified time of all the files not currently in use at 9pm every night 
to be for 9am the next morning. That would cause the system to skip 
them all until the next morning, right?


As well as set stop and start times, would it be possible to 
optionally not have the system call a customer while their home 
library is not open.  That way there would always be staff available 
at a customers library if they had questions and wanted to call back.  
Assuming that EG takes into account holidays, it would also keep calls 
from being placed on holidays also.  This wouldn't work for every 
location though, so it should probably be a per OU setting.



This is precisely what we do.  We call 
'open-ils.actor.org_unit.closed.retrieve.all' and* 
*'open-ils.actor.org_unit.hours_of_operation.retrieve' to see if the 
library is open on a given day before we queue up the call.


We use an external notification server to place calls for both overdue 
and hold notifications.  see: 
http://svn.open-ils.org/trac/ILS-Contrib/browser/grpl/trunk/patron_notifications


Back to the original question which Doug already commented on.  When we 
first started using this method we tried dumping all of our call files 
into the spool directory at once.  This worked fine in testing with a 
handful of calls, but with hundreds of files, Asterisk choked on them 
and started locking up outgoing lines.





Re: [OPEN-ILS-DEV] Asterisk scheduling controls

2009-12-15 Thread Bill Ott




On Tue, Dec 15, 2009 at 3:34 PM, Bill Ott b...@grpl.org 
mailto:b...@grpl.org wrote:


Josh Stompro said the following on 12/15/2009 03:06 PM:

Joe Atzberger wrote:

In the course of integrating Asterisk telephony with Evergreen's
action/trigger notice structure, we have encountered a problem
that you may have already come across, or possibly even solved. 
The question is basically how to schedule call times (on the

asterisk side), i.e. start at 9AM, stop at 9PM.
We are generating callfiles that are queued by moving them into
the Asterisk spool directory.  We can tell Asterisk not to call
before a certain time by setting the file's date modified time
in the future.  So we have a mechanism for the begin time. 
What we don't have is a mechanism to tell asterisk *not* to call

after a given end time.  Anything that is in the dialplan
logic itself does not appear suitable because that still
processes the callfile and either succeeds or fails.  What we
want is to *not* process the callfile, deferring it until the
next start time.
The reason there has to be a cutoff is that EG might spool up
several thousand calls to fire at the begin time, and it is
conceivable that not all calls would be completed by the
intended end.
Things we've ruled out:

* just turning off/on asterisk -- can't do that since local
  voicemail, incoming calls and desktop phones might depend on
  asterisk
* trying to adjust callfile date modified time inside
dialplan --
  doesn't work, because the file is still processed, i.e.
moved to
  the done dir at the end

So are there any solutions you guys have encountered?  This
problem is very similar to print queue management on unix, so
there may be products/packages in that problem-space that would
work for us.
--Joe

I'm not at all familiar with the call files, so this is probably
not an option, but would it be possible to move all spooled calls
out of the call dir at a certain time, except the ones that are
currently in use, and move them back in the next start time... Or
modify the  date modified time of all the files not currently in
use at 9pm every night to be for 9am the next morning. That would
cause the system to skip them all until the next morning, right?

As well as set stop and start times, would it be possible to
optionally not have the system call a customer while their home
library is not open.  That way there would always be staff
available at a customers library if they had questions and wanted
to call back.  Assuming that EG takes into account holidays, it
would also keep calls from being placed on holidays also.  This
wouldn't work for every location though, so it should probably be
a per OU setting. 

This is precisely what we do.  We call
'open-ils.actor.org_unit.closed.retrieve.all' and*
*'open-ils.actor.org_unit.hours_of_operation.retrieve' to see if
the library is open on a given day before we queue up the call.

We use an external notification server to place calls for both
overdue and hold notifications.  see:

http://svn.open-ils.org/trac/ILS-Contrib/browser/grpl/trunk/patron_notifications

Back to the original question which Doug already commented on. 
When we first started using this method we tried dumping all of

our call files into the spool directory at once.  This worked fine
in testing with a handful of calls, but with hundreds of files,
Asterisk choked on them and started locking up outgoing lines.


Thanks for the responses.  There are some viable options in here.  Our 
problem isn't knowing when to schedule the call (i.e. open hours), 
it's knowing how to un/reschedule it when we get to closing time. 
 Options seem to be:


   1. shutdown asterisk (instance)
  2.
  maybe unload just the spool module part of asterisk (pbx_spool iirc)
   3. mv callfiles outside spool directory, mv back at open time
   4. update date modified to next open time
   5. never queue more than one round of calls per channel, so there
  *shouldn't* be much backlog

The first is dead certain, but also overkill.  If we wanted to go that 
route, I would push for a proxy layer that EG can treat like one 
Asterisk instance, rather than needing a bunch of different instance 
configs.


The latter (#5) doesn't work w/ future-dated callfiles, since they 
*should* accumulate in spool.  But maybe accumulation in spool is to 
be avoided, as Bill suggests.  That would seem counter to the entire 
purpose of a spool, but it wouldn't really surprise me either.


I intend to avoid requiring that asterisk query back to the EG server 
to figure out when an OU is open/closed.  For one thing, Asterisk has 
no idea what OU is relevant.  It's hard enough for EG to know, and the 
rules for that could be arbitrarily complex

Re: [OPEN-ILS-DEV] Telephone notification: Twilio

2009-11-01 Thread Bill Ott

Josh Stompro wrote:
Hello,  Back in Feb 2008 there were a couple messages by Bill Ott and 
Niles Ingalls about telephone notification.

http://markmail.org/message/ja22gm3tvgvqxk5t
http://markmail.org/message/cm45uy2g2waxxvo7

I'm curious if any progress has been made in this area.


We've been using telephone notifications since we went live in Oct. 
2008.  We began providing renewals by phone in May 2009.  The code is 
available here:


http://svn.open-ils.org/trac/ILS-Contrib/browser/grpl/trunk



Re: [OPEN-ILS-DEV] Add feature - OPAC - display Call number next to brief record on first page

2009-10-28 Thread Bill Ott

Melissa Belvadi said the following on 10/28/2009 11:43 AM:
This is also high on our dev list. We would like not just the call 
number but also location and status, so patrons don't waste time 
looking on the wrong set of shelves, or for a book that's checked out.


I've done some work in this area.  This is what ours currently looks like:

http://grpl.michiganevergreen.org/opac/en-US/skin/default/xml/rdetail.xml?r=46040486ol=9t=star%20warstp=keywordl=9d=1hc=519rt=keyword


If you'd like to dig into the gory details, see our hacked up 
rdetails.js and copy_details.js with the addition of functions 
oneLineDrawCopy and oneLineDrawCopies.




 Anne Andres anne.and...@columbiabc.edu 10/27/2009 12:34 AM 
It would be nice if the Call number in the OPAC could be displayed 
with the brief record rather then having to click again on the title 
to get it in the full record display.
 
Some of our users have commented on this.





Re: [OPEN-ILS-DEV] edited the Organizational Types and Units not picked up by staff client

2009-10-02 Thread Bill Ott

Wills,Steve said the following on 10/02/2009 12:41 PM:

I am having trouble getting my staff client to see new Org Types and
Unit I have setup.  I am disappointed but understanding of bib records
that appear orphaned by my change, but how can I get my staff client to
accept the new world order?


If I'm understanding your question correctly.
After making org unit changes, you'll need to re-run autogen.sh to 
populate files with the changes.


Re: [OPEN-ILS-DEV] Evergreen Keyboard Shortcuts on Mac

2009-09-23 Thread Bill Ott

Karen Collier said the following on 09/23/2009 11:52 AM:

We're running the Evergreen (1.4) staff client mostly on PCs, but we're also 
running it on a few Macs, and we've noticed that neither the Alt or F-key 
keyboard shortcuts work on the Macs.  Does anyone know of any add-ons or 
workarounds that might let us use the staff client keyboard shortcuts on Mac?
  


On my MacBook, I do not have the function keys set to operate as 
standard function keys (see: System Prefs - Keyboard  Mouse), and the 
fn + F-key works fine for F1 - F6 functions, F8 however shows me all 
windows (under Panther).


Re: [OPEN-ILS-DEV] Reshelving Complete

2009-09-23 Thread Bill Ott

Continuing to look for our anomalous reshelving times...

Should the AND circ.id IS NULL, in the second portion of the query, be 
part of the WHERE instead?  Isolating and running only this portion, the 
JOIN seems to add a null circ row to every item.



   SELECT  cp.id
  FROM $cp cp
   LEFT JOIN $setting setting
   ON (cp.circ_lib = setting.org_unit AND 
setting.name = 'circ.reshelving_complete.interval')
   LEFT JOIN $circ circ ON (circ.target_copy = cp.id 
AND circ.id IS NULL)

 WHERE cp.status = 7
   AND cp.create_date  NOW() - CAST( COALESCE( BTRIM( 
setting.value,'' ), ? )  AS INTERVAL)




Re: [OPEN-ILS-DEV] Reshelving Complete

2009-09-18 Thread Bill Ott

snip


I also just located 37 copies that have never circulated (i.e. no 
action.circulation record), but have a status of reshelving.  I would 
think that these should have been caught as newly created items.  
Those that I've looked at seem to be reference items that were 
apparently checked in for some reason.


  id| status |   edit_date  
-++---

 635989 |  7 | 2008-11-05 20:12:29.392036-05
 325796 |  7 | 2008-11-13 14:51:47.993696-05
 263712 |  7 | 2008-11-13 15:01:34.121305-05


Figured out this portion.  They were migrated items that had null 
create_dates, so they were not caught in the latter portion of the query.




[OPEN-ILS-DEV] Reshelving Complete

2009-09-17 Thread Bill Ott
We've found some oddities in the times at which items would go from 
reshelving to available.  I've located a couple issues, and am wondering 
what others think about the process.


I've found some items selected by the query that I can't explain.  It's 
a pretty complex query, but I believe the later portion, designed to 
make newly processed items that have never circulated available, is 
selecting more than expected, but I can't identify a reason.


A separate issue exists with transited items.  The current query looks 
at the circ.checkin_time and the copy status, but not the copy 
edit_date.  This means that a transited item will not consider the 
circ.reshelving_complete.interval, as the checkin may have occurred long 
before the status is changed from in transit to reshelving.



My question is:  Is it important to look at the circulation at all?  
Would it be bad to have all items to go from reshelving to available on 
the same timeline, regardless of how they got there?


Would the following accomplish this?  I'll also attach a patch for 
action.pm with this included.


UPDATE  $cp
  SET   status = 0
  WHERE id IN (
SELECT  cp.id
 FROM $cp cp
LEFT JOIN $setting setting
   ON (cp.circ_lib = setting.org_unit AND 
setting.name = 'circ.reshelving_complete.interval')

WHERE cp.status = 7
GROUP BY 1,cp.edit_date
HAVING cp.edit_date  NOW() - CAST( COALESCE( 
BTRIM( FIRST(setting.value),'' ), ? )  AS INTERVAL)

 )
Index: action.pm
===
--- action.pm	(revision 14045)
+++ action.pm	(working copy)
@@ -130,33 +130,21 @@
 	my $cp = asset::copy-table;
 
 	my $sql = 	SQL;
-		UPDATE	$cp
-		  SET	status = 0
-		  WHERE	id IN (
-SELECT  id
-  FROM  (SELECT cp.id, MAX(circ.checkin_time)
-  FROM  $cp cp
-JOIN $circ circ ON (circ.target_copy = cp.id)
-LEFT JOIN $setting setting
+UPDATE  $cp
+  SET   status = 0
+  WHERE id IN (
+SELECT  cp.id
+FROM $cp cp
+LEFT JOIN $setting setting
 ON (cp.circ_lib = setting.org_unit AND setting.name = 'circ.reshelving_complete.interval')
-  WHERE circ.checkin_time IS NOT NULL
-AND cp.status = 7
-  GROUP BY 1
-  HAVING MAX(circ.checkin_time)  NOW() - CAST( COALESCE( BTRIM( FIRST(setting.value),'' ), ? )  AS INTERVAL)
-) AS foo
-UNION ALL
-SELECT  cp.id
-			   FROM $cp cp 
-LEFT JOIN $setting setting
-ON (cp.circ_lib = setting.org_unit AND setting.name = 'circ.reshelving_complete.interval')
-LEFT JOIN $circ circ ON (circ.target_copy = cp.id AND circ.id IS NULL)
-  WHERE cp.status = 7
-AND cp.create_date  NOW() - CAST( COALESCE( BTRIM( setting.value,'' ), ? )  AS INTERVAL)
-  )
+WHERE cp.status = 7
+GROUP BY 1,cp.edit_date
+HAVING cp.edit_date  NOW() - CAST( COALESCE( BTRIM( FIRST(setting.value),'' ), ? )  AS INTERVAL)
+  )
 	SQL
 
 	my $sth = action::circulation-db_Main-prepare_cached($sql);
-	$sth-execute($window, $window);
+	$sth-execute($window);
 
 	return $sth-rows;
 


Re: [OPEN-ILS-DEV] Reshelving Complete

2009-09-17 Thread Bill Ott



Mike Rylander wrote:

On Thu, Sep 17, 2009 at 7:33 PM, Bill Ott b...@grpl.org wrote:
  

We've found some oddities in the times at which items would go from
reshelving to available.  I've located a couple issues, and am wondering
what others think about the process.

I've found some items selected by the query that I can't explain.  It's a
pretty complex query, but I believe the later portion, designed to make
newly processed items that have never circulated available, is selecting
more than expected, but I can't identify a reason.



As it stands, with the UNION ALL, it will select some copies twice,
which is not as efficient as it could be but shouldn't be selecting
more than, well, it should.  Do you have some examples?
  


Here's some auditor data for an item that was in circulation for a few 
days, it was checked in and went from reshelving to available in about 
36 minutes.  (current status is available, audit_times are desc)


  id   | status |  audit_time  
++---

381832 |  7 | 2009-09-17 13:00:01.43433-04
381832 |  1 | 2009-09-17 12:24:28.221189-04
381832 |  0 | 2009-09-11 13:13:07.690483-04


I also just located 37 copies that have never circulated (i.e. no 
action.circulation record), but have a status of reshelving.  I would 
think that these should have been caught as newly created items.  Those 
that I've looked at seem to be reference items that were apparently 
checked in for some reason.


  id| status |   edit_date  
-++---

 635989 |  7 | 2008-11-05 20:12:29.392036-05
 325796 |  7 | 2008-11-13 14:51:47.993696-05
 263712 |  7 | 2008-11-13 15:01:34.121305-05

If you or someone with access has time to investigate further, please 
feel free.




A separate issue exists with transited items.  The current query looks at
the circ.checkin_time and the copy status, but not the copy edit_date.  This
means that a transited item will not consider the
circ.reshelving_complete.interval, as the checkin may have occurred long
before the status is changed from in transit to reshelving.


My question is:  Is it important to look at the circulation at all?  Would
it be bad to have all items to go from reshelving to available on the same
timeline, regardless of how they got there?



I think that goal is a good one, but we need to be clear on what that
timeline, whatever it ends up being, means in workflow terms.

The current definition centers on circulation completion.  It has the
two caveats you mention (transited items probably won't get the full
reshelving delay, and uncirculated item reshelving is based on
edit_date), but the central tenant seems correct.
  


Just to stay on track, it currently looks at create_date.



The first implication that comes to mind if we move to all-edit_date
is that we make it easy to extend the reshelving delay by making
changes to the copy unrelated to circulation or the concept of the
reshelving delay.  Today, those are all manual processes, but by
pinning what is currently meant to be time since checkin to a
generic last time we touched the copy, we are opening ourselves up
to unintended consequences with automated processes down the road.  In
essence, any automated or batch process that deals with copies could
end up causing this unintended extension.
  


True...


Now, IMO, it's a question we should put to circulation managers, but
my vote is currently no on the option of moving to edit_date-based
reshelving.

That said, I would be in favor of two alternate additions:  first,
adding another branch to the current query to take the most recent
transit of an item into account, if that transit ended /after/ the
most recent circulation; and, moving to UNION instead of UNION ALL to
improve the UPDATE performance.

Thoughts on that counter-proposal?
  


Transits are certainly our largest issue.  Our volume and work flow puts 
items back to available much to soon in many cases.


Performance of this query hasn't been an issue for us, but the examples 
above do confuse me.


Re: [OPEN-ILS-DEV] Problems with Backup

2009-09-03 Thread Bill Ott

Dan Scott wrote:

2009/9/2 John van Rassel jvanras...@innisfil.ca:
  

I have tried running this, and it still doesn't find anything.  The search just 
sits and spins.
I also did do the autogen.



Hmm. Any errors being reported in the PostgresSQL server log or in the
Evergreen logs? It's possible that, if this is a new database server,
some of the required database server dependencies (such as the Perl
module JSON::XS) haven't been installed and the creation of some of
the required functions during the database restore failed.
  


Excellent thought.  I think I've fallen victim to forgetting to add the 
tsearch functions and having to be alerted of such through the postgres log.




Re: [OPEN-ILS-DEV] Back button creates double search rows

2009-07-20 Thread Bill Ott

Mike Rylander said the following on 07/15/2009 08:21 PM:

The advanced search form, being (partly) static, gets populated by the
browser when you hit back (that's the first set).  However, the code
also parses the URL to populate the search form when coming from a
basic search result.  Thus, double- (or triple-) population.  As for a
fix, there are a couple ways I can think of, but none are what I'd
call Good(tm).  We could conditionally clear the search form if we're
using url data, or built the form dynamically ...
  



This is a bit of a Kludge(tm), but this seems to do the trick.


Index: Open-ILS/web/opac/skin/default/js/adv_global.js
===
--- Open-ILS/web/opac/skin/default/js/adv_global.js(revision 13632)
+++ Open-ILS/web/opac/skin/default/js/adv_global.js(working copy)
@@ -121,6 +121,10 @@
 
 var types = getObjectKeys(search.searches);
 
+// if we have browser cached data, clear it before populating from cookie
+if (search.searches[types[0]].term)
+clearSearchBoxes();
+
 /* pre-add the needed rows */
 while($('adv_global_tbody').getElementsByTagName('tr').length - 1  types.length)
 advAddGblRow();


[OPEN-ILS-DEV] Back button creates double search rows

2009-07-15 Thread Bill Ott
In both the staff client and Firefox (I'm sure that's not a coincidence) 
using the back button (or Go Back) from an Advanced search, results in 
the search rows being double populated.  I've been able to replicate 
this in pretty much every skin, from PINES, to Conifer, to UPEI, to 
TADL.  The only exception I've found is GRPL's skin.


It's a minor issue, but it's driving me a bit nutty trying to track it 
down, especially since I've apparently already done something to cure it 
and can't figure out what.


Does anyone have any suggestions as to what might be causing this?


Re: [OPEN-ILS-DEV] AUTO-GENERATED

2009-05-27 Thread Bill Ott

Grant Johnson said the following on 05/27/2009 08:42 AM:

Where might I find the AUTO-GENERATED string for auto-generated TCN's during 
Z39-50 import.
Can't find it with a grep...

Is it in the database?

  


Indeed it is, assuming you're looking for the following.

Found in:
Open-ILS/src/sql/Pg/1.2.2.3-1.2.3.0-upgrade.sql


CREATE OR REPLACE FUNCTION biblio.next_autogen_tcn_value () RETURNS TEXT 
AS $$
   BEGIN RETURN 'AUTOGENERATED-' || 
nextval('biblio.autogen_tcn_value_seq'::TEXT); END;





Re: [OPEN-ILS-DEV] OPAC Hold link ver 1.2.3

2009-03-17 Thread Bill Ott

Grant Johnson said the following on 03/17/2009 01:01 PM:

Simple question,

Can I hide the Place Hold link for items that are not checked out in search 
results screen?
Or just remove it completely?
  


Nothing comes to mind to remove the link from titles based on copy 
attributes, but you can certainly hide it completely. 


Locate the following at or around line 470 of result_common.js

   unHideMe($n(r,'place_hold_span'));

Just comment it out by changing that to:
  //unHideMe($n(r,'place_hold_span'));




Re: [OPEN-ILS-DEV] Lost item handling

2009-03-15 Thread Bill Ott

Bill Erickson wrote:

Bill,

I'd like to look at incorporating this code into the repository.  Are the
various attachments to the previous emails still accurate?  Better yet,
would it be possible to get a unified diff of your changes (against 1.2 is
fine)? :)
  


Attached is the diff against the 1.4.0 branch.


What are the remaining UI pieces?  We'll need to add the settings to the
org settings interface.  We'll need some messages in the staff client to
alert the staff to what is happening when items are voided/unvoided.  What
else?


I've never even looked into the org settings interface, but to aid in 
that, of the 5 new settings noted in Const.pm, 4 are simple flags 
considered true on a defined non-zero value, the fifth 
(max_accept_return_of_lost) a date interval from the original due date 
(e.g. 1 year, 180 days, etc.).


Because the item status Lost message is already coming up, I hadn't 
considered additional messages, as I expected staff to be familiar with 
their policies and what should be happening at that point.  Maybe I'm 
optimistic.  The bill value does populate at checkin, but again, with no 
details as to what was happening behind the scenes.




Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
   have the right to submit it under the open source license
   indicated in the file; or

(b) The contribution is based upon previous work that, to the best
   of my knowledge, is covered under an appropriate open source
   license and I have the right under that license to submit that
   work with modifications, whether created in whole or in part
   by me, under the same open source license (unless I am
   permitted to submit under a different license), as indicated
   in the file; or

(c) The contribution was provided directly to me by some other
   person who certified (a), (b) or (c) and I have not modified
   it.

(d) I understand and agree that this project and the contribution
   are public and that a record of the contribution (including all
   personal information I submit with it, including my sign-off) is
   maintained indefinitely and may be redistributed consistent with
   this project or the open source license(s) involved.



Index: Open-ILS/src/perlmods/OpenILS/Const.pm
===
--- Open-ILS/src/perlmods/OpenILS/Const.pm  (revision 12529)
+++ Open-ILS/src/perlmods/OpenILS/Const.pm  (working copy)
@@ -82,9 +82,15 @@
 econst OILS_SETTING_HOLD_SOFT_BOUNDARY = 'circ.hold_boundary.soft';
 econst OILS_SETTING_HOLD_HARD_BOUNDARY = 'circ.hold_boundary.hard';
 econst OILS_SETTING_HOLD_EXPIRE = 'circ.hold_expire_interval';
+econst OILS_SETTING_VOID_LOST_ON_CHECKIN= 
'circ.void_lost_on_checkin';
+econst OILS_SETTING_MAX_ACCEPT_RETURN_OF_LOST   = 
'circ.max_accept_return_of_lost';
+econst OILS_SETTING_VOID_LOST_PROCESS_FEE_ON_CHECKIN= 
'circ.void_lost_proc_fee_on_checkin';
+econst OILS_SETTING_RESTORE_OVERDUE_ON_LOST_RETURN  = 
'circ.restore_overdue_on_lost_return';
+econst OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE  = 
'circ.lost_immediately_available';
 
 
 
+
 econst OILS_HOLD_TYPE_COPY= 'C';
 econst OILS_HOLD_TYPE_VOLUME  = 'V';
 econst OILS_HOLD_TYPE_TITLE   = 'T';
Index: Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===
--- Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm (revision 12529)
+++ Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm (working copy)
@@ -314,6 +314,7 @@
 use OpenILS::Utils::CStoreEditor qw/:funcs/;
 use OpenILS::Application::Circ::ScriptBuilder;
 use OpenILS::Const qw/:const/;
+use Time::Local;
 
 my $holdcode= OpenILS::Application::Circ::Holds;
 my $transcode   = OpenILS::Application::Circ::Transit;
@@ -2163,15 +2164,63 @@
 $self-copy-circ_lib-id : $self-copy-circ_lib;
 my $stat = $U-copy_status($self-copy-status)-id;
 
-# If the item is lost/missing and it needs to be sent home, don't 
-# reshelve the copy, leave it lost/missing so the recipient will know
-if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING)
-and ($circ_lib != $self-editor-requestor-ws_ou) ) {
-$logger-info(circulator: not updating copy status on checkin because 
copy is lost/missing);
+# immediately available keeps items lost or missing items from going home 
before being handled
+my $lost_immediately_available = $U-ou_ancestor_setting_value(
+$circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self-editor) || 
0;
 
-} else {
-$self-copy-status($U-copy_status(OILS_COPY_STATUS_RESHELVING));
-$self-update_copy;
+if ( (!$lost_immediately_available)  ($circ_lib != 
$self-editor-requestor-ws_ou) ) {
+if( ($stat == OILS_COPY_STATUS_LOST or $stat == 

Re: [OPEN-ILS-DEV] [OPEN-ILS-GENERAL] Thanks UPEI! Google Book Preview patch integrated into trunk

2009-03-08 Thread Bill Ott

Dan Scott wrote:

I think it'll need more than just I18n, unfortunately.  It's currently
 set up to blow away the excerpt added content that other AC modules
 provide,



I don't remember seeing any excerpts provided by Syndetics so far - if
they do provide excerpts, perhaps they are few and far between for
academic content at least - which is why I wasn't worried about the
blowing away behaviour. 


I knew I'd seen at least one.  Had to dig a bit to find one, but yes, 
Syndetics certainly has at least some excerpts.


http://grpl.michiganevergreen.org/opac/en-US/skin/default/xml/rdetail.xml?r=4224479ol=9t=perltp=keywordl=9d=1hc=94rt=keyword



Re: [OPEN-ILS-DEV] Lost item handling

2009-01-27 Thread Bill Ott


Bill Ott said the following on 01/22/2009 08:35 PM:


Oh, and a final note.  I don't have it worked in here yet, but 
originally I
mentioned the voided charge by date.  For us, we only accept the 
item back
for 1 year post due-date.  After that, you can give it back, but we 
still

charge for it.  So, while anything but a zero will trigger these now, a
duration is what's really needed (e.g. 1 year).




Right.  That would be another (optional) org setting, I think.  There
are functions for turning dates and intervals into integers (see:
interval_to_seconds in OpenSRF::Utils) to facilitate age comparisons.

  


I'm back to plugging away at this, and I have it cleaned up a bit and 
tested.  All seems to be working except for this call:

 OpenSRF::Utils-noo_es_time($circ-due_date)

I can reproduce the code elsewhere and it works as expected, but for 
some reason calling the method always returns the 2002 from here:
 return timelocal(int($tm[1]), int($tm[2]), int($tm[3]), int($tm[4]) 
|| 1, int($tm[5]), int($tm[6]) || 2002 );


The due_date is: 2009-02-12T16:37:26-0500, so I would expect something 
like: 1234480779, but instead get: 1009861200


I don't see where this method is used elsewhere, is there something 
obvious I'm missing?



I worked around this by simply putting a timelocal() call right where I 
needed it.


Attached is my latest incarnation.  I believe it does everything I set 
out to do, and I think I've tested all possible combinations, but you 
can only checkout and lose an item so many times before you lose track ;-)






*** /tmp/Circulate.pm	2009-01-27 12:29:26.0 -0500
--- Circulate.pm	2009-01-27 12:34:46.0 -0500
***
*** 287,292 
--- 287,293 
  use OpenILS::Utils::CStoreEditor qw/:funcs/;
  use OpenILS::Application::Circ::ScriptBuilder;
  use OpenILS::Const qw/:const/;
+ use Time::Local;
  
  my $holdcode= OpenILS::Application::Circ::Holds;
  my $transcode   = OpenILS::Application::Circ::Transit;
***
*** 1917,1931 
  $self-copy-circ_lib-id : $self-copy-circ_lib;
  my $stat = $U-copy_status($self-copy-status)-id;
  
! # If the item is lost/missing and it needs to be sent home, don't 
! # reshelve the copy, leave it lost/missing so the recipient will know
! if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING)
! and ($circ_lib != $self-editor-requestor-ws_ou) ) {
! $logger-info(circulator: not updating copy status on checkin because copy is lost/missing);
! 
! } else {
! $self-copy-status($U-copy_status(OILS_COPY_STATUS_RESHELVING));
! $self-update_copy;
  }
  
  return $self-bail_on_events($self-editor-event)
--- 1922,1984 
  $self-copy-circ_lib-id : $self-copy-circ_lib;
  my $stat = $U-copy_status($self-copy-status)-id;
  
! # immediately available keeps items lost or missing items from going home before being handled
! my $lost_immediately_available = $U-ou_ancestor_setting_value(
! 	$circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self-editor) || 0;
! 
! if ( (!$lost_immediately_available)  ($circ_lib != $self-editor-requestor-ws_ou) ) {
! 	if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING) ) {
! 	$logger-info(circulator: not updating copy status on checkin because copy is lost/missing);
! }else{
! 		$self-copy-status($U-copy_status(OILS_COPY_STATUS_RESHELVING));
! $self-update_copy;
! 	}
!  }elsif ($stat == OILS_COPY_STATUS_LOST) {
! 
! 		my $max_return = $U-ou_ancestor_setting_value(
! $circ_lib, OILS_SETTING_MAX_ACCEPT_RETURN_OF_LOST, $self-editor) || 0;
! 
! 		if ($max_return){
! 			my $today = time();
! 			my @tm = reverse($circ-due_date =~ /([\d\.]+)/og);
! 		if ($tm[5]  0) {
! 		$tm[5] -= 1;
! 		}
! 			my $due = timelocal(int($tm[1]), int($tm[2]), int($tm[3]), int($tm[4]), int($tm[5]), int($tm[6]));
! 
! 			my $last_chance = OpenSRF::Utils-interval_to_seconds($max_return) + int($due);
! 			$logger-info(MAX OD: .$max_return.  DUEDATE: .$circ-due_date.  TODAY: .$today.  DUE: .$due.  LAST: .$last_chance);
! 			if ($today  $last_chance ){
! $max_return = 0;
! 			}
! 		}
! 
! 		if (!$max_return){  # there's either no max time to accept returns defined or we're within that time
! 
! 			my $void_lost = $U-ou_ancestor_setting_value(
!			$circ_lib, OILS_SETTING_VOID_LOST_ON_CHECKIN, $self-editor) || 0;
! 	my $void_lost_fee = $U-ou_ancestor_setting_value(
! 	$circ_lib, OILS_SETTING_VOID_LOST_PROCESS_FEE_ON_CHECKIN, $self-editor) || 0;
! 			my $restore_od = $U-ou_ancestor_setting_value(
!		$circ_lib, OILS_SETTING_RESTORE_OVERDUE_ON_LOST_RETURN, $self-editor) || 0;
! 
! 			if ($void_lost){
! $self-checkin_handle_lost_now_found('Lost Materials');
! 			}
! 			if ($void_lost_fee){
! 	$self

Re: [OPEN-ILS-DEV] Lost item handling

2009-01-27 Thread Bill Ott

Jason Etheridge wrote:

I'm back to plugging away at this, and I have it cleaned up a bit and
tested.  All seems to be working except for this call:
 OpenSRF::Utils-noo_es_time($circ-due_date)



Hey Bill, where is that?  I see no reference to it at all in trunk.
  


Line 195.
http://svn.open-ils.org/trac/OpenSRF/browser/trunk/src/perl/lib/OpenSRF/Utils.pm

If you saw my follow up, I worked around my issue, but I am curious 
what's special about 2002...





Re: [OPEN-ILS-DEV] Lost item handling

2009-01-27 Thread Bill Ott



Jason Etheridge wrote:

I'm back to plugging away at this, and I have it cleaned up a bit and
tested.  All seems to be working except for this call:
 OpenSRF::Utils-noo_es_time($circ-due_date)



Hey Bill, where is that?  I see no reference to it at all in trunk.
  


Oh, maybe I just confused you.  That statement wasn't in your code, it 
was one I was trying to use.





Re: [OPEN-ILS-DEV] 'Now searching' after 1.4 install

2009-01-14 Thread Bill Ott


Mike Rylander said the following on 01/14/2009 10:06 AM:

On Tue, Jan 13, 2009 at 5:02 PM, Brandon W. Uhlman
brandon.uhl...@bclibrary.ca wrote:
  

Hi, all.

When I load my shiny new 1.4 OPAC, the 'Now searching' display won't display
the name of the org unit I'm searching. However, the orgtree selector can be
chosen and the orgunit names are visible, so it appears that autogen is
working. I thought it might be an i18n where the translated strings were not
added, so I added a couple to test, re-ran autogen, but it didn't appear to
make a difference.

The added wrinkle is that I'm running a fresh 1.4 install, but I pointed it
at a copy of a 1.2.3.1 dataset [after running 1.2.3-1.4 updates], not a
freshly built 1.4 database.

There's nothing screaming for attention in the logs, but I'm not sure what I
should be looking for either.

Does anybody have some ideas?



Are you seeing any errors in the JavaScript console when selecting an
org from the tree widget? (Assuming firefox, obviously.)
  


I should have reported this earlier, as I'm seeing the same.  Thought it 
might be in our data, but now I'm guessing not.


Nothing interesting in the JavaScript console, but an alert tells me 
that loc.name() is  undefined at line 54 of web/opac/common/js/init.js, 
when it tries to:

G.ui.common.now_searching.appendChild(text(loc.name()));

loc comes from:
var loc = findOrgLasso(getLasso());

In looking at my brand spankin' new actor.org_lasso table, I see it's empty.

I'm chasing this backwards to see if PARAM_LASSO and PARAM_LOCATION ever 
meet, but if this rings a bell to anyone before I get there...











Re: [OPEN-ILS-DEV] Lost item handling

2008-12-19 Thread Bill Ott
Before we're completely buried in snow, I thought I'd show my work and 
get some initial comments. 


Short story:
1)  void lost on checkin is in the works (but see below)
2) maybe? ;)  depends on what you're looking for
3) they generally are, however, I have an opinion about the
circ.lost_immediately_available setting
  


I'm actually surprised there is a short story. ;-)


Less-short story:
Void lost on checkin can mean a few different things.  There are
normally two different generated charges, lost processing fee and lost
replacement charge, and either one or both might need to stick around
depending on circumstances.  So, that's part of what is being taken
into account with the in the works support, based on a (relatively
speaking) wide range of input from production sites (including, in
fact, one of your MLC compatriots ;) ).
  


I realized that.  In the code I've been playing with, I added pieces for 
both.  Actually a 3rd, as we (GRPL) go as far as removing the lost 
charge, but reinstate the original overdue fines.  So I've got a piece 
that reinstates the original overdue charges, un-voids them essentially.




More generally, dealing with the design of this class of setting
(automatic money stuff) is complicated by the fact that the
circulating location (where the LOST circ is attached to) is not
necessarily the correct context org unit for the setting -- you want
these settings attached to the owner of the item, not the transaction,
because it's the owner that needs to recoup the cost of a lost item.
In some consortia (those with a higher policy-barrier to sharing) this
won't matter in practice, but for others (low or no policy-barrier to
sharing) it will be very important.  The issue is that this presents a
(seemingly arbitrary) staff workflow change -- for instance, some
items will be immediately available or have processing fees removed
(or not, on either or both).  It's something that can smoothed over
with policy, but I would like to see what we can come up with
technologically to help.
  


I am using copy-circ_lib for each, although that certainly isn't 
obvious from the setting name.




In any case, please send patches early and often, and we will review
and give feedback as quickly as possible.  Since this is touching some
of the most complicated biz logic that's directly embedded in the
middle layer code we'll want to increase the communication loop
significantly, to make sure that you're code gets in as quickly and
smoothly as possible.
  


Again, showing what I've done quick-n-dirty.  It's also only against 
1.2.4, as I don't have all my other goodies merged into 1.4 yet, but for 
what it's worth...




*** /usr/src/Evergreen-ILS-1.2.4.0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2008-11-03 22:42:43.0 -0500
--- /tmp/Circulate.pm	2008-12-19 10:05:35.0 -0500
***
*** 1917,1931 
  $self-copy-circ_lib-id : $self-copy-circ_lib;
  my $stat = $U-copy_status($self-copy-status)-id;
  
  # If the item is lost/missing and it needs to be sent home, don't 
  # reshelve the copy, leave it lost/missing so the recipient will know
! if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING)
! and ($circ_lib != $self-editor-requestor-ws_ou) ) {
! $logger-info(circulator: not updating copy status on checkin because copy is lost/missing);
! 
! } else {
! $self-copy-status($U-copy_status(OILS_COPY_STATUS_RESHELVING));
! $self-update_copy;
  }
  
  return $self-bail_on_events($self-editor-event)
--- 1917,1948 
  $self-copy-circ_lib-id : $self-copy-circ_lib;
  my $stat = $U-copy_status($self-copy-status)-id;
  
+ my $lost_immediately_available = $U-ou_ancestor_setting_value(
+ 	$circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self-editor) || 0;
+ 
  # If the item is lost/missing and it needs to be sent home, don't 
  # reshelve the copy, leave it lost/missing so the recipient will know
! unless ( ($lost_immediately_available) || ($circ_lib == $self-editor-requestor-ws_ou) ) {
! 	if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING) ) {
! 	$logger-info(circulator: not updating copy status on checkin because copy is lost/missing);
! }
!  }elsif ($stat == OILS_COPY_STATUS_LOST) {
! 
! 		my $void_lost = $U-ou_ancestor_setting_value(
!		$circ_lib, OILS_SETTING_VOID_LOST_ON_CHECKIN, $self-editor) || 0;
! my $void_lost_fee = $U-ou_ancestor_setting_value(
! $circ_lib, OILS_SETTING_VOID_LOST_PROCESS_FEE_ON_CHECKIN, $self-editor) || 0;
! 
! 		if ($void_lost){
! 			$self-checkin_handle_lost_now_found('Lost Materials');
! 		}
! 		if ($void_lost_fee){
! $self-checkin_handle_lost_now_found('Lost Materials Processing Fee');
! }
! 
! 
! 	$self-copy-status($U-copy_status(OILS_COPY_STATUS_RESHELVING));
!	 

Re: [OPEN-ILS-DEV] Lost item handling

2008-12-19 Thread Bill Ott



Less-short story:
Void lost on checkin can mean a few different things.  There are
normally two different generated charges, lost processing fee and lost
replacement charge, and either one or both might need to stick around
depending on circumstances.  So, that's part of what is being taken
into account with the in the works support, based on a (relatively
speaking) wide range of input from production sites (including, in
fact, one of your MLC compatriots ;) ).
  


I realized that.  In the code I've been playing with, I added pieces 
for both.  Actually a 3rd, as we (GRPL) go as far as removing the lost 
charge, but reinstate the original overdue fines.  So I've got a piece 
that reinstates the original overdue charges, un-voids them essentially.


Oh, and a final note.  I don't have it worked in here yet, but 
originally I mentioned the voided charge by date.  For us, we only 
accept the item back for 1 year post due-date.  After that, you can give 
it back, but we still charge for it.  So, while anything but a zero will 
trigger these now, a duration is what's really needed (e.g. 1 year).






[OPEN-ILS-DEV] Lost item handling

2008-12-17 Thread Bill Ott
In researching some options for handling our billing of lost items, I 
was delighted to find the 'circ.void_overdue_on_lost' setting.


I was going to develop a couple similar options, such as:
 'circ.void_lost_on_checkin', to remove lost charges if an item was 
subsequently returned (perhaps based on date)
 'circ.restore_overdue_on_lost_return', to restore the overdue charges 
that are voided by 'circ.void_overdue_on_lost'
 'circ.lost_immediately_available', to avoid having lost items travel 
to their owning location before being circulated again


Somewhat thinking out loud there, but I 1.) wanted to see if I was 
duplicating anyone's efforts, 2.) find out if there were other settings 
I just hadn't discovered yet, and 3.) make sure that the 
org_unit_settings were the preferred method to implement these sort of 
features.





[OPEN-ILS-DEV] Cached barcode - staff placed holds

2008-12-08 Thread Bill Ott
For training I used a 1.2.2 install that seems to cache the barcode if 
placing consecutive holds in the staff client.  In production, under 
1.2.4.0, this doesn't happen.  Staff would like me to put this back, but 
I can't seem to figure out what's different or why it's happening in the 
first place.


Anyone have any suggestions?



Re: [OPEN-ILS-DEV] Procedure for exporting data from Millennium to Evergreen?

2008-11-18 Thread Bill Ott

David Kane wrote:

Has anyone done this?

I see that there is a thread 
here: http://list.georgialibraries.org/pipermail/open-ils-dev/2007-April/000617.html


I am going to give it a shot now, but has anyone got any further? - we 
could confer.


Yes, although we pulled the bib records through the provided export 
tools and used Create List to pull all other data, including holdings.  
Much of the latter was do to our participation in a consortium and the 
selective amounts of data we needed.


Let me know if you have specific questions.

-Bill



[OPEN-ILS-DEV] action.pm - reshelving.complete

2008-09-17 Thread Bill Ott

Has anyone run reshelving_complete.srfsh from trunk?

I was playing with the circ.reshelving_complete.interval value within 
actor.org_unit_setting, under a 1.2.x release, when I received the 
following, which doesn't seem version related, but just SQL syntax...(?)



Status:  *** Call to 
[open-ils.storage.action.circulation.reshelving.complete] failed for 
session [1221675859.851948.122167585930291], thread trace [1]:
DBD::Pg::st execute failed: ERROR:  column setting.value must appear 
in the GROUP BY clause or be used in an aggregate function

[for StatementUPDATE  asset.copy
 SET   status = 0
 WHERE id IN (
   SELECT  id
 FROM  (SELECT cp.id, MAX(circ.checkin_time)
 FROM  asset.copy cp
   JOIN action.circulation circ ON 
(circ.target_copy = cp.id)

   LEFT JOIN actor.org_unit_setting setting
   ON (cp.circ_lib = 
setting.org_unit AND setting.name = 'circ.reshelving_complete.interval')

 WHERE circ.checkin_time IS NOT NULL
   AND cp.status = 7
 GROUP BY 1
 HAVING MAX(circ.checkin_time)  NOW() - 
CAST( COALESCE( BTRIM( setting.value,'' ), ? )  AS INTERVAL)

   ) AS foo
   UNION ALL
   SELECT  cp.id
  FROM asset.copy cp
   LEFT JOIN actor.org_unit_setting setting
   ON (cp.circ_lib = setting.org_unit AND 
setting.name = 'circ.reshelving_complete.interval')
   LEFT JOIN action.circulation circ ON 
(circ.target_copy = cp.id AND circ.id IS NULL)

 WHERE cp.status = 7
   AND cp.create_date  NOW() - CAST( COALESCE( 
BTRIM( setting.value,'' ), ? )  AS INTERVAL)

 )
 with ParamValues: 1='24h', 2='24h'] at 
/usr/share/perl5/DBIx/ContextualFetch.pm line 52.






Re: [OPEN-ILS-DEV] Arg to reshelving.complete ?

2008-07-21 Thread Bill Ott

Mike Rylander said the following on 07/18/2008 09:00 PM:

On Fri, Jul 18, 2008 at 12:07 PM, Karen Foster [EMAIL PROTECTED] wrote:
  

I didn't see anything more about this on the list. So, was wondering if
anything more happened with it  if there was a version number to look
for this type of change in?

If you want any votes - I like Mike's counter-proposal.



Thanks for bringing this back up.  I've just committed a change to svn
trunk that implements this, so now we just need an interface to set an
org_unit-specific version of the circ.reshelving_complete.interval
setting.  I'll create a trac ticket against 1.4 for this, but it may
get bumped to a slightly later version in the 1.4 stream, depending on
priorities.
  


After a quick peek at the change, is there any reason this code wouldn't 
work in 1.2.2.x ?

With manual table entries of course.




Re: [OPEN-ILS-DEV] OPAC on Safari 1.x

2008-07-17 Thread Bill Ott

Brandon W. Uhlman said the following on 07/17/2008 05:53 PM:

Hi, all.

We have a user who is unable to access the Evergreen OPAC on her older 
Mac, running OS X 10.3, Safari 1.3.2 on dialup. Has anyone tried using 
Safari 1.3 with Evergreen, and experienced either positive or negative 
results?


I happen to have an old iMac running just that software!  ...luckily, no 
dialup though.


I can verify that at least in my tests, to a local server and to 
gapines, I received no search results.


On my server, I see the initial connection in the Apache log, the OPAC 
page loads normally, then I see the GET for the search, the OPAC screen 
updates to the Title Results page, then nothing...  No opensrf log 
activity, no Apache logging, nothing.


I took a quick poke at looking for a Javascript console, but early 
versions of Safari didn't offer much, and even following example 
wouldn't open up a console for me.  
http://developer.apple.com/internet/safari/faq.html#anchor14





Re: [OPEN-ILS-DEV] direct_ingest error

2008-06-21 Thread Bill Ott



The namespaces in your BRE appear to match the various samples of BRE
that I have on my system, so I don't think it's a problem with
marc2bre.pl. I think that's pretty stock output for yaz-marcdump.
  

Yep, took them to another server and direct_ingest.pl handles them fine :-(
Too bad.  I'm using a hacked up marc2bre.pl, checking for isbn and tcn 
matches before adding them to the mix, so I was hoping I broke it myself.



Perhaps it's a problem with the level of libxml2 / libxslt /
XML::LibXML / XML::LibXSLT that you have installed on your system? For
what it's worth, settings-tester.pl tells me I have:

XML::LibXML version 1.63
XML::LibXML::XPathContext version 1.63
XML::LibXSLT version 1.62

I have libxml2.so.2.6.31 and libxslt.so.1.1.22 installed in /usr/lib.
  

Been round and round with different versions, still no love.


Another possibility is that your stylesheets in /openils/var/xsl are
corrupted (or perhaps opensrf.xml isn't pointing to them)? The
OpenILS::Application::Ingest module pulls in the MARC21slim2MODS and
MARC21slim2MODS3 stylesheets as part of the ingest process.
  

Re-copied them, ...nada.


I also wondered whether it might be a problem in the database
configuration (e.g. a lack of pgxml support) but that seems quite
unlikely.
Sorry for not having a definitive answer for you :( but perhaps this
will help you poke around.

  


The kicker to all this is, that I previously imported over 360,000 bibs 
on this machine without error.  I can't figure out what's changed since 
then.  The server is up and running and all other functions seem fine.  
I did my development on another server where I had it working well, 
moved it to this box and hit a wall.




[OPEN-ILS-DEV] re-reading config files

2008-06-20 Thread Bill Ott
Is there a good description somewhere of what needs to be restarted 
following config file changes, specifically opensrf.xml?  For instance 
when adding a MARC template or a Z39.50 source.


I generally just do a full stop_all/start_all then bounce apache, but 
with more client connections and getting closer to a production 
environment, that's getting harder to do without causing users grief...





[OPEN-ILS-DEV] very slow ISBN search

2008-06-20 Thread Bill Ott

Any thoughts on why searching by ISBN would be painfully slow?

In the following srfsh tests, you'll see that it took over 40 seconds to 
return a result.  I can use other methods, such as 
open-ils.search.biblio.tcn, and get results within a second.




srfsh# request open-ils.search open-ils.search.biblio.isbn 1400061946

Received Data: {
  count:1,
  ids:[
 126360
  ]

}



Request Completed Successfully
Request Time in seconds: 43.756154






Re: [OPEN-ILS-DEV] very slow ISBN search

2008-06-20 Thread Bill Ott



The second one will take a while, and it is possible for it to fail if
there are records with fields greater than 2.7k and Postgres was not
adjusted at compile time to increase the page size.

  

Doh!

ERROR:  index row size 4232 exceeds btree maximum, 2713
HINT:  Values larger than 1/3 of a buffer page cannot be indexed.
Consider a function index of an MD5 hash of the value, or use full text 
indexing.



I believe you noted to me previously that this requires an initdb after 
the recompile?







Re: [OPEN-ILS-DEV] very slow ISBN search

2008-06-20 Thread Bill Ott



I believe you noted to me previously that this requires an initdb after the
recompile?




Indeed.  The on-disk format will be different

 Attached is a patch for Postgres 8.2.9, but it should apply to any
version without any trouble.

  


Thanks again Mike

...but on a Friday afternoon,

  delete from metabib.full_rec where length(value)  2700;


Ah, test records!



[OPEN-ILS-DEV] alternative to quick_metarecord_map.sql

2008-06-20 Thread Bill Ott

Last question of the week:

If importing a small batch of records into a database with a few hundred 
thousand existing records, is there a good alternative to running 
quick_metarecord_map.sql?...it can get a bit time consuming.





[OPEN-ILS-DEV] offline blocked list

2008-06-16 Thread Bill Ott

Strange doings with the offline blocked list.

When running offline-blocked-list.pl, I end up missing one user.  I 
don't see any rhyme or reason for which user it drops, but it seems 
consistent.


For instance, I currently have 4 users set to barred:

evergreen=# select count(*) from actor.usr where barred = 't';
count
---
4



When I run the script, I only receive 3:

$ /openils/bin/offline-blocked-list.pl /home/opensrf/.srfsh.xml srfsh
- echo open-ils.storage open-ils.storage.actor.user.lost_barcodes | 
/openils/bin/oils_requestor -f /home/opensrf/.srfsh.xml -c srfsh -h 
blade9.grpl.org
- echo open-ils.storage open-ils.storage.actor.user.barred_barcodes | 
/openils/bin/oils_requestor -f /home/opensrf/.srfsh.xml -c srfsh -h 
blade9.grpl.org

16822707 B
P19751013 B
910911 B
- echo open-ils.storage 
open-ils.storage.actor.user.penalized_barcodes | 
/openils/bin/oils_requestor -f /home/opensrf/.srfsh.xml -c srfsh -h 
blade9.grpl.org





Re: [OPEN-ILS-DEV] Certificate question

2008-06-06 Thread Bill Ott

Robert said the following on 06/06/2008 10:16 AM:
Originally I was able to permanently accept the self-signed 
certificate in the staff client. That certificate was only valid for 1 
month and once that month was up it started prompting me for it again. 
I was able to recreate the certificate with a time limit of 1 year but 
now it won't permanently accept it. Why was I able to permanently 
accept it the first time but not this time?


You should be able to.  Just remove the existing cert and replace it 
with a new one.  The option to add more than a month is provided with 
the -days arg.  This example will set you up for over 2 1/2 years.
  e.g.   openssl req -new -x509 -nodes -days 999 -out server.crt 
-keyout server.key


You'll need to restart apache.


If you're client is the problem (and I don't know why it would be), to 
reset your client and let it replace any existing cert info, remove the 
cert8.db and key.db files from the OpenILS profile.  Under Windows, 
probably found under:
  C:\Documents and Settings\user\Application 
Data\OpenILS\openils_ils_staff_client\Profiles\random string\



Having said that, Dan's correct about purchasing a cert if you're going 
to be using this in production, otherwise patrons will be prompted to 
accept a certificate from this unknown signer for any SSL traffic 
(e.g. My Account), and I.E. 7 in particular has a really nasty dialog 
that reports this as Not Recommended to the user.





On Fri, Jun 6, 2008 at 10:12 AM, Dan Scott [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


2008/6/6 Robert [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]:
 How can I import the certificate into the staff client on a
windows machine
 so that I don't have to accept it every time I start the staff
client? I
 have tried to import it through the normal means, internet
options -
 content - certificates but it still asks me to accept it after
that. Also,
 I can't accept it permanently when it asks. I click the radio
button for
 Accept this certificate permanently and then click ok but it
brings the same
 screen back up every time I do it. The only way I can get it to
continue on
 loading the staff client is to temporarily accept the
certificate for the
 session. Does anyone have any suggestions as to how to make this
permanent?

Hi Robert:

I'm not sure it's possible to permanently accept a self-signed
certificate in the staff client - particularly through Windows'
certificate methods, which I believe would only affect Internet
Explorer. The staff client is built on Mozilla XUL which uses a
separate means of ensuring secure communications.

If you purchase and deploy a SSL certificate from a trusted certified
authority, I believe that you won't be prompted to accept the
certificate at all (until it expires, etc). There are a number of web
sites that provide more information about SSL, and that describe how
to purchase and deploy certified SSL keys: here's one -
http://www.sitepoint.com/article/securing-apache-2-server-ssl

--
Dan Scott
Laurentian University




--


[OPEN-ILS-DEV] Re: PATCH: re-open client window

2008-05-25 Thread Bill Ott
Here, I was so concerned about the patch and that I had the right diff 
data included, I forgot about the formalities.



For posterity.


Developer’s Certificate of Origin 1.1 By making a contribution to this 
project, I certify that:


(a) The contribution was created in whole or in part by me and I have 
the right to submit it under the open source license indicated in the 
file; or


(b) The contribution is based upon previous work that, to the best of my 
knowledge, is covered under an appropriate open source license and I 
have the right under that license to submit that work with 
modifications, whether created in whole or in part by me, under the same 
open source license (unless I am permitted to submit under a different 
license), as indicated in the file; or


(c) The contribution was provided directly to me by some other person 
who certified (a), (b) or (c) and I have not modified it; and


(d) In the case of each of (a), (b), or (c), I understand and agree that 
this project and the contribution are public and that a record of the 
contribution (including all personal information I submit with it, 
including my sign-off) is maintained indefinitely and may be 
redistributed consistent with this project or the open source license 
indicated in the file.




Index: Open-ILS/xul/staff_client/chrome/content/main/main.js
===
--- Open-ILS/xul/staff_client/chrome/content/main/main.js   (revision 9692)
+++ Open-ILS/xul/staff_client/chrome/content/main/main.js   (working copy)
@@ -240,6 +240,25 @@
},
false
);
+
+var y = document.getElementById('new_window_btn');
+y.setAttribute('label','Open New Window');
+y.addEventListener(
+'command',
+function() {
+   if (G.data.session) {
+   try {
+   
G.window.open('chrome://open_ils_staff_client/content/main/menu_frame.xul?server='
 +
+   
G.data.server,'main','chrome,resizable' );
+
+   } catch(E) { alert(E); }
+   } else {
+   alert ('Please login first!')
+   }
+},
+false
+);
+
if ( found_ws_info_in_Achrome() ) {
//var hbox = x.parentNode; var b = 
document.createElement('button');
//b.setAttribute('label','Migrate legacy settings'); 
hbox.appendChild(b);

Index: Open-ILS/xul/staff_client/chrome/content/main/main.xul
===
--- Open-ILS/xul/staff_client/chrome/content/main/main.xul  (revision 9692)
+++ Open-ILS/xul/staff_client/chrome/content/main/main.xul  (working copy)
@@ -83,6 +83,9 @@
hbox
label id=version_label/
button id=about_btn/
+
+label id=new_window_label/
+button id=new_window_btn/
/hbox
label value= /



Re: [OPEN-ILS-DEV] PATCH: re-open client window

2008-05-25 Thread Bill Ott

Jason Etheridge wrote:

Huzzah!  Applied with thanks to trunk, rel_1_2, and rel_1_2_2.  Works
as advertised.
  


Doh!  One small issue.  It throws an error if used just following 
workstation registration, before you log back in.  Too sunny out to 
worry about now though.





Re: [OPEN-ILS-DEV] OpenSRF API Question

2008-05-14 Thread Bill Ott

Mike Rylander said the following on 05/10/2008 08:56 AM:

Actually, because you have your config file in the default location
(not required, but makes it simpler) and you're require'ing the
oils_header.pl example, you already have access to the full
Fieldmapper API, which happens to be what you're looking for.

You'll notice that the arrays there are blessed into Perl packages
like Fieldmapper::actor::card.  That package defines accessor/mutator
methods for each field, on the actor.card table in this particular
case, as well as some methods that return some class-level information
and some administrative and state-maintenance fields.  You can see
what accessors are defined by looking for the class in the Evergreen
Fieldmapper IDL xml file, which you'll find at
/openils/conf/fm_IDL.xml .  To find the class in question, you'll
actually look an oils_obj:fieldmapper attribute containing the part of
the Perl package name after 'Fieldmapper::'.

That IDL file defines how Evergreen apps written in any supported
programming language communicate with one another and interpret data.
It's also used to generate a great many interfaces (programmatic and
user interfaced) in Evergreen.
  


Having spent a couple hours today working with the API, I've got to say, 
I'm all but giddy with the possibilities!


We tracked down wrap_perl in XMLRPCGateway.pm, and I agree with the 
comment, These should probably be moved out to a library somewhere.  
Doug grafted it into oils_header.pl, which makes for a very handy way to 
hash'ify the results of a simplereq.







[OPEN-ILS-DEV] Lost Cards

2008-05-13 Thread Bill Ott


Thoughts on providing a timestamp column to actor.card?  Or is there a 
way to find out when a card was marked lost and subsequently replaced 
that I'm just not seeing?






Re: [OPEN-ILS-DEV] SIP2 in Evergreen

2008-05-12 Thread Bill Ott


We're in the midst of retooling one of our libraries, and we're going 
to put a self-check machine in it.  What self-check machines do the 
production sites (PINES/Sitka whomever else) use?  Is any machine that 
is SIP2 compliant going to be okay generally?


Not in production (for a few more months), but we've run the 3M 6210's 
through their paces without problem.





Re: [OPEN-ILS-DEV] Indexing problem?

2008-05-12 Thread Bill Ott



Jason Etheridge said the following on 05/09/2008 05:40 PM:

On Mon, May 5, 2008 at 11:30 AM, Bill Ott [EMAIL PROTECTED] wrote:
  

My test database has 360,000+ bib records, and only about 20,000 holdings
attached.  When performing a simple keyword search from the staff client I
get hundreds or thousands of results in a couple of seconds.  If I limit
those to items with holdings or those available, in either the staff client
or opac, it takes about 60 seconds to receive any results, if it ever
finishes.



Hey Bill, did you figure this one out?
  


Turns out it just needed the Dyson treatment (insert  Hoover, Oreck, 
your favorite vacuum cliche).


I guess I hadn't done a full vacuum after importing all of my data.  She 
runs like the wind now!






[OPEN-ILS-DEV] Indexing problem?

2008-05-05 Thread Bill Ott
My test database has 360,000+ bib records, and only about 20,000 
holdings attached.  When performing a simple keyword search from the 
staff client I get hundreds or thousands of results in a couple of 
seconds.  If I limit those to items with holdings or those available, in 
either the staff client or opac, it takes about 60 seconds to receive 
any results, if it ever finishes.


I used the import scripts to bring in all bib records, but I rolled my 
own scripts to populate asset.call_number and asset.copy.  Perhaps I 
missed something?


Any thoughts on where to start looking?

Here's the log of a search.


[2008-5-5 11:25:55] -e [INFO:18631:Client.pm:275:] timed_read() read 810 
bytes of data
[2008-5-5 11:25:55] open-ils.search 
[INFO:18686:Application.pm:101:1209998914186690] CALL: 
open-ils.search.biblio.multiclass.query [HASH(0x27023b0), blue, 1]
[2008-5-5 11:25:55] open-ils.search 
[INFO:18686:Biblio.pm:613:1209998914186690] bib search for: 
[default_class,keyword,depth,0,limit,5000,offset,0,org_unit,1,searches,{keyword:{term:blue}},visibility_limit,3000]
[2008-5-5 11:25:55] open-ils.search [INFO:18714:Client.pm:84:] Creating 
Client instance: blade9.grpl.org:5222, osrf, 
open-ils.search_drone_at_blade9.grpl.org
[2008-5-5 11:25:55] open-ils.search 
[INFO:18686:AppSession.pm:501:1209998914186690] AppSession sending 
REQUEST to [EMAIL PROTECTED]/open-ils.storage with threadTrace [1]
[2008-5-5 11:25:55] open-ils.search [INFO:18714:Client.pm:275:] 
timed_read() read 28 bytes of data
[2008-5-5 11:25:55] -e [INFO:18639:Client.pm:275:] timed_read() read 907 
bytes of data
[2008-5-5 11:25:55] open-ils.storage 
[INFO:18685:Application.pm:101:1209998914186690] CALL: 
open-ils.storage.biblio.multiclass.search_fts.atomic [default_class, 
keyword, limit, 5000, org_unit, 1, visibility_limit, 3000, depth, 0, 
searches, HASH(0x4f74aa0), offset, 0]
[2008-5-5 11:25:55] open-ils.storage [INFO:18715:Client.pm:84:] Creating 
Client instance: blade9.grpl.org:5222, osrf, 
open-ils.storage_drone_at_blade9.grpl.org
[2008-5-5 11:25:55] open-ils.storage [INFO:18715:Client.pm:275:] 
timed_read() read 28 bytes of data
[2008-5-5 11:25:55] open-ils.storage [INFO:18715:Pg.pm:64:] Attempting 
to connect to evergreen at egdb1
[2008-5-5 11:25:55] open-ils.storage [INFO:18715:Pg.pm:94:] Connected to 
MASTER db evergreen at egdb1
[2008-5-5 11:27:5] open-ils.search 
[INFO:18686:Biblio.pm:532:1209998914186690] compiled search is 
{default_class:keyword,depth:0,limit:10,offset:0,org_unit:1,searches:{keyword:{term:blue}},visibility_limit:3000}
[2008-5-5 11:27:5] open-ils.search 
[INFO:18686:AppSession.pm:501:1209998914186690] AppSession sending 
RESULT to [EMAIL PROTECTED]/1209998914__1209998914.129312_18669 with 
threadTrace [1]
[2008-5-5 11:27:5] open-ils.search 
[INFO:18686:AppSession.pm:501:1209998914186690] AppSession sending 
STATUS to [EMAIL PROTECTED]/1209998914__1209998914.129312_18669 with 
threadTrace [1]






[OPEN-ILS-DEV] Arg to reshelving.complete ?

2008-05-01 Thread Bill Ott


Right now, open-ils.storage.action.circulation.reshelving.complete, 
accepts only an argument for duration (e.g. 24h).  We anticipate the 
desire to change this duration per location.  I believe it would just be 
a matter of also shifting in an argument for circ_lib and modifying the 
query accordingly in the complete_reshelving method.


Am I missing any gotchas here?  Other than of course allowing for the 
possibility of no circ_lib, like it's current situation.



--


Re: [OPEN-ILS-DEV] Arg to reshelving.complete ?

2008-05-01 Thread Bill Ott



Mike Rylander wrote:

On Thu, May 1, 2008 at 6:40 PM, Bill Ott [EMAIL PROTECTED] wrote:
  

 Right now, open-ils.storage.action.circulation.reshelving.complete, accepts
only an argument for duration (e.g. 24h).  We anticipate the desire to
change this duration per location.  I believe it would just be a matter of
also shifting in an argument for circ_lib and modifying the query
accordingly in the complete_reshelving method.

 Am I missing any gotchas here?  Other than of course allowing for the
possibility of no circ_lib, like it's current situation.



Actually, here's a counter-proposal ... how about leaving the current
arg as-is for a default and then modify the query to use an org_unit
setting to override that where applicable?  With that, it's locally
controlled, and only needs the one cron job.
  

I like!


Re: [OPEN-ILS-DEV] import_demo question

2008-04-29 Thread Bill Ott
psql:insert_holdings.sql:1: ERROR:  date/time field value out of 
range: 12/13/1993

HINT:  Perhaps you need a different datestyle setting.
psql:insert_holdings.sql:2: ERROR:  current transaction is aborted, 
commands ignored until end of transaction block
psql:insert_holdings.sql:3: ERROR:  current transaction is aborted, 
commands ignored until end of transaction block

..

So, can you help me figure out how to fix this problem it is having 
with my create date of 12/13/1993. 


The short answer is, it's expecting an ISO 8601 date.  i.e.  -mm-dd

If you feel adventuresome, the following *should* reformat all dates in 
the file.  Just in case, it will also create a backup of your original. 
  perl -i.orig -p -e 's/(\d+)(\/)(\d+)(\/)(\d{4})/$5-$1-$3/g' filename





Re: [OPEN-ILS-DEV] Latest trunk error

2008-03-07 Thread Bill Ott


My bad, Bill. That one has been around for quite a while, as it turns
out - thanks for finding it!

I've updated xul/server/circ/util.js accordingly.
  


Thank you.  And thanks for the note on what cured it.  I poked around 
for a bit but couldn't track anything down.





[OPEN-ILS-DEV] Latest trunk error

2008-03-06 Thread Bill Ott

After yet another svn update on my machine running trunk.

When selecting Import Record from Z39.50, I receive a dialog noting:

  *** Failed to get string staff.circ.utils.owning_lib in bundle:
  /xul/20080306.142908/server/locale/en-US/common.properties
  undefined


I dumped in some bibs from the import scripts and when trying to do 
holdings maintenance I also receive the above error, then when OK'd, I 
receive a dialog box that simply notes undefined, followed by many 
noting TypeError: obj.list has no properties.



In the client terminal window, I find the following:

  Original Request:

  request open-ils.search 
open-ils.search.biblio.record.copy_count.staff 1,76116

  -
  TypeError: obj.list has no properties
  TypeError: obj.list has no properties
  TypeError: obj.list has no properties
  util.exec.chain error: {message:x has no
properties,fileName:http://blade9/xul/20080306.142908/server/main/JSAN.js,lineNumber:1296,stack:;()@http://blade9/xul/20080306.142908/server/main/JSAN.js:1296\n(404)@http://blade9/xul/20080306.142908/server/main/JSAN.js:247\n@:0\n,name:TypeError}

  chain broken





Re: [OPEN-ILS-DEV] Evergreen 1.2.1.0 Client issue

2008-03-05 Thread Bill Ott


Choose Holdings Maintenance (which can be made to come up by default to save 
time later).


I've been asked this question, but hadn't looked into it yet.  How is 
this done?






Re: [OPEN-ILS-DEV] Error in Trunk

2008-03-05 Thread Bill Ott

Hmm...

I setup a custom org_tree re-ran autogen.sh and my problems went away. 




Bill Ott said the following on 03/04/2008 10:12 PM:
Something new, again when trying to register a new client.  This is 
with the latest trunks (EG 8863 / SRF 1251).



[2008-03-04 21:58:19] open-ils.actor [ERR 
:9636:EX.pm:66:120468528696012] Exception: OpenSRF::EX::ERROR 
2008-03-04T21:58:19 OpenSRF::Application 
/openils/lib/perl5/OpenSRF/Application.pm:553 System ERROR: Call to 
open-ils.storage for method 
open-ils.storage.actor.org_unit.descendants.atomic
failed with exception: Exception: OpenSRF::EX::ERROR 
2008-03-04T21:58:19 OpenILS::Application::AppUtils 
/openils/lib/perl5/OpenILS/Application/AppUtils.pm:177 System ERROR: 
Exception: OpenSRF::DomainObject::oilsMethodException 
2008-03-04T21:58:19 OpenSRF::AppRequest 
/openils/lib/perl5/OpenSRF/AppSession.pm:1006 404  Method 
[open-ils.storage.actor.org_unit.descendants.atomic] not found for 
OpenILS::Application::Storage




[OPEN-ILS-DEV] Error in Trunk

2008-03-04 Thread Bill Ott
Something new, again when trying to register a new client.  This is with 
the latest trunks (EG 8863 / SRF 1251).



[2008-03-04 21:58:19] open-ils.actor [ERR 
:9636:EX.pm:66:120468528696012] Exception: OpenSRF::EX::ERROR 
2008-03-04T21:58:19 OpenSRF::Application 
/openils/lib/perl5/OpenSRF/Application.pm:553 System ERROR: Call to 
open-ils.storage for method 
open-ils.storage.actor.org_unit.descendants.atomic
failed with exception: Exception: OpenSRF::EX::ERROR 
2008-03-04T21:58:19 OpenILS::Application::AppUtils 
/openils/lib/perl5/OpenILS/Application/AppUtils.pm:177 System ERROR: 
Exception: OpenSRF::DomainObject::oilsMethodException 
2008-03-04T21:58:19 OpenSRF::AppRequest 
/openils/lib/perl5/OpenSRF/AppSession.pm:1006 404  Method 
[open-ils.storage.actor.org_unit.descendants.atomic] not found for 
OpenILS::Application::Storage




Re: [OPEN-ILS-DEV] EG client login error

2008-02-13 Thread Bill Ott
 I'm not being prompted to login in the my account section of the 
catalogue.


I didn't go back to read the original post, but this makes me wonder, 
did you run autogen?  Seems like I've had odd events like this if I hadn't.





[OPEN-ILS-DEV] Bug reports for trunk?

2008-02-08 Thread Bill Ott
Are you interested in receiving bug reports for trunk, or is the code in 
so much flux that I should just wait to see what the next batch of 
changes brings?



I don't want to slow progress for issues that may be getting addressed 
by other changes...



Of course I'd love to submit the fix and not just the bug report, but I 
haven't gotten a good enough handle on the code to track down what the 
logs seem to be telling me.






[OPEN-ILS-DEV] Register Workstation broken in trunk?

2008-02-06 Thread Bill Ott


I can't use the client to register new client installs under trunk.  I 
receive the following:


Call to [open-ils.actor.user.perm.highest_org] failed for session 
[1202309547.426312.120230954716702], thread trace [1]:
Can't call method id without a package or object reference at 
/openils/lib/perl5/OpenILS/Application/AppUtils.pm line 781.



Being impatient, I can manually insert the client into actor.workstation 
and hack the chrome/ws_info accordingly, after which the client runs 
normally.  So it seems to be strictly related to the new registration.





Re: [OPEN-ILS-DEV] Register Workstation broken in trunk?

2008-02-06 Thread Bill Ott



I've been working on some changes in that area.  When was the last time
you updated from subversion?
  


Just this morning.
At revision 8656.



[OPEN-ILS-DEV] Telephone notification

2008-02-06 Thread Bill Ott
I've come across a very basic and flexible form of a possible telephone 
notification system.
As briefly discussed back in Dec., this is only a piece of what would be 
much more useful as a fully interactive telephony information and 
renewal system, but for my current situation, it would answer the 
question of what to do with our 300-400 calls that are currently being 
placed each day by a similar system.


Asterisk has a very simple method to auto-dial out and deliver message.
 see: 
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out+deliver+messageview_comment_id=13733



This could deliver pre-recorded messages, or could be used in 
conjunction with something like CMU's text-to-speech project, Festival, 
to add dynamic data to the call.  A script to format the .call file, 
possibly time stamping it for the future and/or using a cron job to move 
the files accordingly, and a second script to record the call result and 
return that data to action.hold_notification, where the results would 
appear in the staff client just like email notification. 
See some Asterisk notes below.


Now, the part I'm trying to wrap my head around.  How could the Asterisk 
server receive and return call info?


The MacGyver side of me has crazy ideas about using an email from the 
current notification system to trigger a procmail script to initiate the 
call.  The only thing that makes that a bit less crazy is the fact that 
many cell phone providers allow email to SMS messaging, so email could 
be the base notification, triggering text messages or phone calls.


Returning to reality, I think about the possibility of using the 
Asterisk-jabber module to receive messages.

 http://www.voip-info.org/wiki/view/Asterisk+Jabber

Then there's that possibility of OpenSRF over HTTP.


Thoughts on my ramblings?



My basic testing on the Asterisk end has used the following for an 
extensions.conf.  I'm using both text-to-speech and a pre-recorded message.

 [default]
 exten = s,1,Answer
 exten = s,n,AGI(festival-script.pl|This is the Grand Rapids Public 
Library\, you have items available for pick-up.)

 exten = s,n,Background(vm-goodbye)
 exten = s,n,AGI(record-result.pl|${CHANNEL}-${id})
 exten = s,n,Hangup
 exten = failed,1,AGI(record-result.pl|${CHANNEL}-${id})


My festival-script.pl is a minor modification of the example given here:
 
http://www.voip-info.org/wiki/index.php?page=Asterisk+festival+installation


My record-result.pl is simply logging the results to a text file.

The .call file I'm testing with consists of the following.  Copied into 
/var/spool/asterisk/outgoing, these are processed much like queued email 
or lpd jobs.


 Channel: Zap/g1/5480; outgoing channel and phone number to dial
 Set: id=555 ; local variable to identify hold
 WaitTime: 30; total time allowed to complete call
 MaxRetries: 1   ; retry attemptsthat is, initial call plus 
1 retry = 2 calls

 RetryTime: 600  ; time between retries
 Context: default; see extensions.conf
 Extension: s; see extensions.conf
 Priority: 1




[OPEN-ILS-DEV] merging branches and holdings woes

2008-02-01 Thread Bill Ott


Is there an easy way for me to merge the acq-experiment and evergreen 
trunk branches to get the best of both worlds?


For example, I love the new Z39.50 search screen, and also the 
config.z3950_x  tables instead of entries in the opensrf.xml file, but 
when using these from the acq branch, I lose some functionality such as 
the Local System Administration.



Odd problem under either.  Within Holding Maintenance, I can add 
volumes, and those appear in the Consortial total, but the individual 
branch where volumes were added remain at zero.  When searching the 
OPAC, the item details appear as expected.


When trying to check the status of an item by barcode, I then receive 
the following, which doesn't seem to provide much help.



barcode = 1234


{
message:details.copy has no properties,
fileName:http://blade9/xul/20080201.161947/server/main/JSAN.js;,
lineNumber:1150,
stack:handle_req(
[
object Object
]

)@http://blade9/xul/20080201.161947/server/main/JSAN.js:1150\n()@http://blade9/xul/20080201.161947/server/main/JSAN.js:1211\n(
[
object KeyboardEvent
]
)@http://blade9/xul/20080201.161947/server/main/JSAN.js:479\n@:0\n;,
name:TypeError
}



Re: [OPEN-ILS-DEV] Adding Z39.50 host

2008-01-31 Thread Bill Ott



Bill Erickson said the following on 01/31/2008 10:40 AM:

ZOOM error 100 Unspecified error (addinfo: Expected CONSTRUCTED PDU
not found (pdu error: 3002)) from diag-set 'Bib-1'

I don't quite know how to parse this, but the $rs-option() is what
makes the difference.  For some reason, fetching the full record with
no holdings from the specified Z server is returning data the Z client
can't understand.



Of course, the Z server may not support that option or may have another
name for it.

  
Doesn't it figure that I'd start testing with one that didn't support 
that option.
If nothing else, I learned a good bit about ZOOM, Yaz, and z39.50 in 
general. 

The following entry works quite nicely.  


olink
 hostolc1.ohiolink.edu/host
 port210/port
 dbinnopac/db
 attrs
   tcncode12/codeformat1/format/tcn
   isbncode7/codeformat3/format/isbn
   lccncode9/codeformat1/format/lccn
   authorcode1003/codeformat3/format/author
   titlecode4/codeformat3/format/title
   issncode8/codeformat1/format/issn
   publishercode1018/codeformat3/format/publisher
   pubdatecode31/codeformat1/format/pubdate
   item_typecode1001/codeformat1/format/item_type
 /attrs
 /olink





Re: [OPEN-ILS-DEV] Adding Z39.50 host

2008-01-31 Thread Bill Ott



  attrs
tcncode12/codeformat1/format/tcn
isbncode7/codeformat3/format/isbn



By the way, you can add extra fields here (like Music_Number) if you
happen to know the code and format, 



Speaking of which.  The trained eye will notice that the format (aka 
structure attribute) is wrong in my example.  The 3's should be 1, 2, or 6.



...I was looking at the relation attribute.





[OPEN-ILS-DEV] Adding Z39.50 host

2008-01-30 Thread Bill Ott

Has anyone else added additional Z39.50 hosts to search?

I thought this would be a simple matter of adding the host into the 
opensrf.xml z3950 section.  However, the few I've tried have failed.  
Am I missing something?




My osrfsys.log, it looks like the initial search completes, in this case 
returning 2 hits


open-ils.auth 2008-01-30 14:08:15 
[INFO:29368:oils_event.c:11:1201717980294124] Creating new event: SUCCESS
open-ils.auth 2008-01-30 14:08:15 
[INFO:29368:osrf_app_session.c:522:1201717980294124] [open-ils.auth] 
sent 762 bytes of data to 
[EMAIL PROTECTED]/open-ils.search_drone_at_blade8.grpl.org_29335
open-ils.auth 2008-01-30 14:08:15 
[INFO:29368:osrf_stack.c:103:1201717980294124] Message processing 
duration 0.001082
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Client.pm:275:1201717980294124] timed_read() read 1024 bytes 
of data
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Client.pm:275:1201717980294124] timed_read() read 425 bytes 
of data
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Editor.pm:71:1201717980294124] editor[0|1] checking perms 
user=1, org=4, perm=REMOTE_Z3950_QUERY
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Editor.pm:71:1201717980294124] editor[0|1] request 
open-ils.storage.permission.user_has_perm : [1,REMOTE_Z3950_QUERY,4]
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:AppSession.pm:501:1201717980294124] AppSession sending 
REQUEST to [EMAIL PROTECTED]/open-ils.storage with threadTrace [1]
[2008-1-30 14:8:15] -e [INFO:29380:Client.pm:275:] timed_read() read 685 
bytes of data
[2008-1-30 14:8:15] open-ils.storage 
[INFO:29408:Application.pm:101:1201717980294124] CALL: 
open-ils.storage.permission.user_has_perm [1, REMOTE_Z3950_QUERY, 4]
[2008-1-30 14:8:15] open-ils.storage 
[INFO:29408:AppSession.pm:501:1201717980294124] AppSession sending 
RESULT to 
[EMAIL PROTECTED]/open-ils.search_drone_at_blade8.grpl.org_29335 with 
threadTrace [1]
[2008-1-30 14:8:15] open-ils.storage 
[INFO:29408:AppSession.pm:501:1201717980294124] AppSession sending 
STATUS to 
[EMAIL PROTECTED]/open-ils.search_drone_at_blade8.grpl.org_29335 with 
threadTrace [1]
[2008-1-30 14:8:15] open-ils.search 
[INFO:29335:Client.pm:275:1201717980294124] timed_read() read 767 bytes 
of data
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:184:1201717980294124] z3950: query = @attr 1=4 
@attr 4=6 learning perl
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:196:1201717980294124] z3950: search [EMAIL PROTECTED] 1=4 
@attr 4=6 learning perl ] took 0 seconds
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:220:1201717980294124] z3950: search returned 2 hits
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:Z3950.pm:234:1201717980294124] z3950: fetching record 0
[2008-1-30 14:8:16] open-ils.search 
[INFO:29335:AppSession.pm:501:1201717980294124] AppSession sending 
STATUS to [EMAIL PROTECTED]/1201717980__1201717980.285581_29412 with 
threadTrace [1]




From my gateway.log.  It looks like this is actually an error while 
trying to report an error.



osrf_json_gw 2008-01-30 14:08:15 
[INFO:29412:osrf_app_session.c:522:1201717980294124] [open-ils.search] 
sent 327 bytes of data to [EMAIL PROTECTED]/open-ils.search
osrf_json_gw 2008-01-30 14:08:15 
[ACT:29412:osrf_json_gateway.c:220:1201717980294124] [172.16.64.51] 
[4b7ca1875d6df6a93a5bc6c91229ae63] open-ils.search 
open-ils.search.z3950.search_class 4b7ca1875d6df6a93a5bc6c91229ae63, 
{service:usc,username:,password:,limit:10,offset:0,search:{title:learning 
perl}}
osrf_json_gw 2008-01-30 14:08:15 
[INFO:29412:osrf_json_gateway.c:220:1201717980294124] [172.16.64.51] 
[4b7ca1875d6df6a93a5bc6c91229ae63] open-ils.search 
open-ils.search.z3950.search_class 4b7ca1875d6df6a93a5bc6c91229ae63, 
{service:usc,username:,password:,limit:10,offset:0,search:{title:learning 
perl}}
osrf_json_gw 2008-01-30 14:08:16 
[WARN:29412:osrf_stack.c:182:1201717980294124] The stack doesn't know 
what to do with the provided message code: 500, name 
osrfMethodException. Passing UP.
osrf_json_gw 2008-01-30 14:08:16 
[INFO:29412:osrf_stack.c:103:1201717980294124] Message processing 
duration 0.84
osrf_json_gw 2008-01-30 14:08:16 [ERR 
:29412:osrf_json_gateway.c:262:1201717980294124] Gateway received 
error:  *** Call to [open-ils.search.z3950.search_class] failed for 
session [1201720095.501727.120172009529412], thread trace [1]:
Can't locate object method throw via package ZOOM::Exception at 
/usr/share/perl5/Error.pm line 397.
   (in cleanup) Can't locate object method DESTROY via package 
ZOOM::Connection at /openils/lib/perl5/OpenILS/Utils/ZClient.pm line 56.
   (in cleanup) Can't locate object method DESTROY via package 
ZOOM::ResultSet at /openils/lib/perl5/OpenILS/Utils/ZClient.pm line 93.


osrf_json_gw 2008-01-30 14:08:16 
[INFO:29412:osrf_json_gateway.c:327:1201717980294124] Completed 
processing service=open-ils.search, 
method=open-ils.search.z3950.search_class




So, I threw the following at the perl debugger, and sure 

Re: [OPEN-ILS-DEV] Christmas vacation and EG add-ons

2007-12-22 Thread Bill Ott



We may've talked also about re-vamping the whole notification system
to allow easy plugin development as new communication media comes
along (although, this may've been just me dreaming again... I don't
remember).  I mean, current notification media might include E-Mail
(already in place), Voice Phone, VoIP, IM, SMS, pager, etc.  Even in
just the IM category, we have several protocols (OSCAR [AOL], MSN,
Yahoo, Jabber, SILC, IRC...).  
  
There are some notes on the wiki (scratchpad: notification) but it's 
just some brain storming if I recall correctly.


SMS and pager providers often have email interfaces for these services, 
so I would think that could be a short trip.  IM presents some similar 
issues as telephony in regard to verification of message delivery.


As the ultimate quick-n-dirty, I could have something working today 
based on a Windows application that will dial based on data from an .xls 
sheet.  A quick trip to reporter will give me that, but it doesn't help 
on the customer service end when you go looking to see if a notice was 
delivered.


Telephony offers some issues not found with email.  For instance, an 
early bird checking in items and triggering an email hold at 7:00AM is a 
good thing.  A phone call at that time probably isn't.  So, you're 
dealing with batch data.  Then there's the call result.  RFPs spell out 
pretty well how an SMTP server deals with delivery failures, retries, 
etc. In telephony we're talking busy signals, no answers, fast busy, 
error tones (e.g. Da-Do-Da I'm sorry, your number can not be completed 
as dialed...).  How long should we wait between calls if busy?  How 
many times should we retry?


Then there's LATA issues with calling.  Let's take PINES.  One telephony 
server would make how many calls?  Between how many different LATAs?  
Our current telephony server makes 300-500 calls a day for only our 
system.  Toll charges can add up quick...  So, distributed servers 
calling for specific regions are useful.


You are correct that dial-in service for renewals, etc. is also 
popular.  This requires much tighter integration with the ILS, as you're 
dealing with authentication and real-time data.  This is also where 
Asterisk comes to mind, as it has the pieces available for phone 
tree/application type service.  I'm not familiar with it, but it also 
has some kind of Jabber interface, not sure if that could be useful.


I agree that notification overall has a lot of possibilities, but I have 
some selfish motives in regard to telephony, as I'm seeking to replace 
something existing, and that would be quickly missed if not available.


A notification API using the previously discussed interface, was it 
OpenSRF over HTTP (?), might fit the bill well.  Again, I'm just 
starting to poke at possibilities.  I've operated 2 different telephony 
servers for ILS notifications, and have seen some good and bad with each.


...back to vacation.





[OPEN-ILS-DEV] Christmas vacation and EG add-ons

2007-12-21 Thread Bill Ott
What I'm doing on my Christmas vacation (aka - vacations, work with 
few(er) interruptions).



As I prepare to leave the office for the next week and a half, I'm oddly 
enough planning to work on toys for Evergreen.  Before I get too deep 
into reinventing wheels, I thought I'd ask who might be already working 
with either of the following:



LibraryFind (libraryfind.org).
 Our first venture down Ruby on Rails (I'll leave out the discussion of 
where chic new languages come from) and it looks like it might be an 
easy add-on to Evergreen -- with OpenSearch all ready to go.  Add in a 
tag cloud and it begins to look an awfully lot like some other product 
for tens of thousands more...



A telephone notification system for holds/overdues.  I see a lot of 
different add-ons and options for Asterisk, which seems like an obvious 
choice, so I've got my old Asterisk box dusted off and ready to go.  Has 
anyone else started barking up this tree?







[OPEN-ILS-DEV] Survey Question

2007-11-21 Thread Bill Ott


There's an option in the Survey Wizard for OPAC Visible.  Where does 
this become visible in the OPAC?





Re: [OPEN-ILS-DEV] Hold Pull List

2007-11-16 Thread Bill Ott
Throwing up my hands in defeat, I made yet another installation, this 
time under Deb Etch, and lo and behold the hold pull list works 
flawlessly...


I'm curious if anyone else has the hold pull list working under FC6, or 
if it's just a coincidence that a different distro worked as expected.



Jason Etheridge said the following on 11/03/2007 01:20 PM:

On Oct 29, 2007 4:08 PM, Bill Ott [EMAIL PROTECTED] wrote:
  

Interesting things in the world of holds.  Holds are placed, but when
trying to get a list of items to fill holds, I don't get any results.
While the hold appears to still exist, I've tracked back to this when
the hold was originally placed, specifically, the call to
open-ils.storage.action.hold_request.copy_targeter.  Looks like Basic.pm
is receiving an array reference instead of a value (?).



Bill, did you figure this out?

I wonder if this has anything to do with the change in JSON formats.

  




Re: [OPEN-ILS-DEV] reporter problems

2007-10-25 Thread Bill Ott


One other thing...  The reporter config in opensrf.xml has a setting 
called output_base, which defines where the output files are stored 
on the local machine (mentioned above).  This defaults to 
/openils/var/reporter/output


The reporting interface (in the staff client) expects the output to 
live at http://host/reporter/


Ok, now you guys are just reading my mind... 

I need to go for coffee between emails, because I already looked under 
the hood to find out how to daemonize clark-kent.pl, and just started 
tracking down this issue after seeing the 404 looking for /reporter/1, 
when I had already seen Clark create /reporter/output/1/5/5


As an aside, /openils/var/reporter hadn't been created at install either.
 (or /openils/var/reporter/output as noted in the example output_base )



Re: [OPEN-ILS-DEV] Mac Client

2007-10-23 Thread Bill Ott



Interesting.  Would you be willing to write up the specific steps you
used on the wiki?
A bit quick-n-dirty, but here it is: 
http://open-ils.org/dokuwiki/doku.php?id=osx_client_install


Cleaning up after myself, I moved this to the place-holder provided for 
the Mac install instructions:


  
http://open-ils.org/dokuwiki/doku.php?id=evergreen-user:installing_and_running_the_staff_client#installing_on_mac





Re: [OPEN-ILS-DEV] metabib.metarecord not populated

2007-10-22 Thread Bill Ott


I think there's a script that will fix your problem, and which needs 
to be added to the documentation.


Run Evergreen/src/extras/import/quick_metarecord_map.sql and the 
metarecords will be created for you.


Beats the heck out of making those inserts by hand!



Re: [OPEN-ILS-DEV] Mac Client (was: Two questions)

2007-10-22 Thread Bill Ott


Jason Etheridge wrote:
If anyone wants to buy me a Mac Mini, I'll try my best.   


I was about ready to drop it in the mail, but...

XULRunner 1.8.0.4 seems to work.  I had all kinds of strangeness with 
1.8.1.3.  I didn't track down exactly what caused the problems, nor did 
I scrutinize the release notes for a possible reason...


http://developer.mozilla.org/en/docs/XULRunner_1.8.0.4_Release_Notes#Mac_OS_X




Re: [OPEN-ILS-DEV] Mac Client

2007-10-22 Thread Bill Ott



Interesting.  Would you be willing to write up the specific steps you
used on the wiki?
A bit quick-n-dirty, but here it is: 
http://open-ils.org/dokuwiki/doku.php?id=osx_client_install




[OPEN-ILS-DEV] Server loads (theoretically)

2007-10-13 Thread Bill Ott


Should Evergreen run more efficiently with more application servers, or 
more processor power?


I've got several blade servers running a test cluster (much prettier 
than my franken-cluster of months gone by).  I'm running one virtual 
brick (VMware w/ one OSRF router/gateway  3 application servers) along 
with individual EG servers on other blades.  What I lack is enough test 
traffic to make a dent in the processing power (dual quad-core Xeons 
with 8GB RAM).


From an architectural perspective, once I get some real world load, 
should I see better performance running the OS natively and having more 
raw horsepower, or having ump-teen application servers available?