Re: [OPEN-ILS-GENERAL] Reports - Simple Record Extracts

2018-01-02 Thread Josh Stompro
Hello Eva, I worked on a change to the Simple Record Extracts recently which 
was included in the 3.0 release, so I panicked when I saw your message, but 
then saw that you are not on 3.0.  Even though I don’t think I caused the 
problem, it is fresh in my mind so here are some suggestions.

The Simple Record Extracts data is from the table reporter.super_simple_record. 
 So you could double check that table for entries for newer titles.  There 
should be one row for each bib record in your system, including deleted bib 
records.

That data is kept up to date by a trigger that could be disabled on your system.

The following SQL should show you if that trigger exists for the 
biblio.record_entry table.
select tgrelid::regclass, tgname from pg_trigger where tgname~'simple_rec';

If it doesn’t exist, then I would suggest you look through your database 
upgrade logs and scripts to see what might have gone wrong.  There may have 
been an update to that trigger that didn’t fully complete during your upgrade.  
I just took a quick look at the 2.10->2.12 upgrade sql scripts and I couldn’t 
spot a likely spot, I don’t see super_simple_record mentioned anywhere, or the 
trigger.

You can also perform some queries on the reporter.old_super_simple_record view, 
which is where the data actually comes from.  If entries for newer titles shows 
up in that view, then I think you can try to just re-enable and rebuild the 
data.

You can attempt to re-enable that trigger with the following SQL, there is a 
nice shortcut function that tries to delete the trigger, empty out 
reporter.super_simple_record and then re populates it and enables the trigger.

Begin;
Select reporter.refresh_materialized_simple_record();
--Check to see if data looks correct.
select * from reporter.super_simple_record where id >= 26; -- use a bib id 
from after your upgrade.

Then do a “Rollback;” to get rid of changes if things don’t look right, or do a 
“Commit;” if everything looks good.

That command will take some time to work through all your bib records.

Josh Stompro - LARL IT Director

From: Open-ils-general 
[mailto:open-ils-general-boun...@list.georgialibraries.org] On Behalf Of 
Cerninakova Eva
Sent: Monday, January 01, 2018 1:56 PM
To: Evergreen Discussion Group 
Subject: [OPEN-ILS-GENERAL] Reports - Simple Record Extracts

Hi,

after upgrade from Evergreen 2.10 to 2.12 (currently we are on 2.12.4) we have 
discovered that some values extracted from the bibliographic record were not  
included to reports. This specifically applies to simple record extracts, 
particularly to these fields:

Item -> Call Number/Volume -> Bib Record -> Simple Record Extracts -> Author 
(normalized)
Item -> Call Number/Volume -> Bib Record -> Simple Record Extracts -> Title 
Proper (normalized)
Item -> Call Number/Volume -> Bib Record -> Simple Record Extracts -> Publisher 
(normalized)
Item -> Call Number/Volume -> Bib Record -> Simple Record Extracts -> 
Publication Year (normalized)
Item -> Call Number/Volume -> Bib Record -> Simple Record Extracts -> ISBN

The problem concerns not only "item" source (also "Invoice" and other sources 
using simple record extracts), however, applies only to records created after 
the upgrade - in cases when record had been created before upgrade and only new 
copy was added after the upgrade,  the record extracts are included to report 
correctly, see example 
https://docs.google.com/spreadsheets/d/12KmF3jWjwWWFAzUt99HgF5rcWSh4Z8Bbj248iD1hn50/edit?usp=sharing
 (items added after upgrade are red).


Could this be a bug?
And is there a way how to get correct values in autor column, title column etc. 
 to reports? Maybe there is any other  way than using simple record extracts?
Thanks a lot for any hint.

Eva







---
Mgr. Eva Cerniňáková
cer...@jabok.cz
Tel. +420 211 222 409

Knihovna Jabok
http:/knihovna.jabok.cz
Tel.  +420 211 222 410
Jabok - Vyšší odborná škola sociálně pedagogická a teologická
Salmovská 8, 120 00 Praha 2

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png]

Bez virů. 
www.avg.com




[OPEN-ILS-GENERAL] 2017 Evergreen Community Survey

2018-01-02 Thread Kathy Lussier

Hi all,

Happy New Year! Now that 2017 is behind us, the Evergreen Outreach 
Committee is beginning to gather highlight the year’s activities for the 
2017 annual report.


We are asking Evergreen libraries and consortia to respond to our annual 
community survey. The survey is essential for capturing a snapshot of 
the libraries that make up the Evergreen community.


The survey takes about five minutes to complete and requires the 
following information that you may need to obtain from a report or 
another source:


* Total service population
* Total number of registered users
* Total number of circulations in 2017

We are hoping to make the data-gathering process for these surveys a 
little easier in future years. The information you submit for this 
year’s survey will be available for you to review/update next year so 
that you will no longer need to re-submit the same information from year 
to year.


Whether you are a single, standalone library or a large consortium, we 
want to hear from you! We’ve received great responses over the past two 
years, but we also know we missed hearing from many Evergreen sites. 
Please make sure your library is represented.


The survey is available at https://goo.gl/forms/KgkcgLLiInGm6Pj93.

--
Kathy Lussier
Project Coordinator
Massachusetts Library Network Cooperative
(508) 343-0128
kluss...@masslnc.org
Twitter: http://www.twitter.com/kmlussier



Re: [OPEN-ILS-GENERAL] unAPI from getAttribute in WWW/SuperCat.pm?

2018-01-02 Thread Daniel Wells
Thanks for the additional information.  Yeah, if you are limited to
communicating via Z39.50, then your options are going to be much more
confined.  I don't think your strategy here is off track.  Hopefully others
using Z39.50/SRU more regularly can chime in if another path seems better.

It looks like you will also need to add that subfield to the actual 852
field output a few lines down, but you probably already figured that part
out :)

Finally, please submit a branch and bug on Launchpad once you have this
working for you, as this seems like something others might find useful.

Sincerely,
Dan

On Tue, Jan 2, 2018 at 10:37 AM, John Merriam  wrote:

> Hi Dan.
>
> Yes, 'copy_id' is what I was looking for.  Thank you so much for that!
>
> We need to have the id from the asset.copy table in the 852 subfield f of
> our Z39.50 output for our holdings.  I'm not sure exactly why but it is my
> understanding that certain vendors that we work with need it there.
>
> If there is some other place we should be doing this I would like to
> know.  It seems to me WWW/SuperCat.pm is the only place to do it.
>
> Thanks again!
>
>
> On 1/2/2018 10:23 AM, Daniel Wells wrote:
>
>> Hello John,
>>
>> This part of the code is pulling data from the unapi.bre() function in
>> the DB, so in this case, you want 'copy_id', i.e.:
>>
>> ...
>> f => $copy->getAttribute('copy_id'),
>> ...
>>
>> This said, I think we'd all be interested to know exactly what you are
>> trying to accomplish, as there are other existing APIs for getting copy
>> IDs, so I am not sure if adding it into this SRU function is the easiest
>> way to go.
>>
>> Sincerely,
>> Dan
>>
>>
>> On Tue, Jan 2, 2018 at 9:50 AM, John Merriam > > wrote:
>>
>> Hello.  I am working in the perl module WWW/SuperCat.pm and trying
>> to get the id of a row in asset.copy.  For some reason I am getting
>> back what looks like an unAPI URI instead of just the id of the
>> row.  I've been staring at this for a while and not sure why this is
>> happening or the best way to fix it.  This is around line 2030 in my
>> WWW/SuperCat.pm in EG 2.12.8.  The basic code flow in
>> WWW/SuperCat.pm is:
>>
>> results retrieved from cstore
>> my $marcxml = XML::LibXML->load_xml(...);
>> my @copies;
>> for my $node ($marcxml->getElementsByTagName('holdings')) {
>>for my $volume ($node->getElementsByTagName('volume')) {
>>  for my $copy ($volume->getElementsByTagName('copy')) {
>>push @copies, {
>>  f => $copy->getAttribute('id'),
>>};
>>
>> f ends up with unAPI stuff in it instead of just the row id that I
>> am looking for.  It looks like:
>>
>> ftag:open-ils.org:U2@acp/5826234
>>
>> The part that I want is after the /   I put in a hack to manipulate
>> the unAPI string and strip out the / and everything in front of it
>> but I don't want to leave it that way.  I would like to do this the
>> correct way.
>>
>> I'm not sure if it really is supposed to behave this way or not.
>> Assuming it is, I was thinking maybe a function exists that can
>> extract the row id from the unAPI URI?  I wasn’t able to find one.
>>
>> Any ideas how to correctly get just the real row id from the
>> database without the unAPI stuff?
>>
>> Thanks in advance!
>>
>
> --
>
> John Merriam
> Evergreen System Specialist
> Bibliomation, Inc.
> 24 Wooster Ave.
> Waterbury, CT 06708
> 203-577-4070 x108
>


Re: [OPEN-ILS-GENERAL] unAPI from getAttribute in WWW/SuperCat.pm?

2018-01-02 Thread John Merriam

Hi Dan.

Yes, 'copy_id' is what I was looking for.  Thank you so much for that!

We need to have the id from the asset.copy table in the 852 subfield f 
of our Z39.50 output for our holdings.  I'm not sure exactly why but it 
is my understanding that certain vendors that we work with need it there.


If there is some other place we should be doing this I would like to 
know.  It seems to me WWW/SuperCat.pm is the only place to do it.


Thanks again!


On 1/2/2018 10:23 AM, Daniel Wells wrote:

Hello John,

This part of the code is pulling data from the unapi.bre() function in 
the DB, so in this case, you want 'copy_id', i.e.:


...
f => $copy->getAttribute('copy_id'),
...

This said, I think we'd all be interested to know exactly what you are 
trying to accomplish, as there are other existing APIs for getting copy 
IDs, so I am not sure if adding it into this SRU function is the easiest 
way to go.


Sincerely,
Dan


On Tue, Jan 2, 2018 at 9:50 AM, John Merriam > wrote:


Hello.  I am working in the perl module WWW/SuperCat.pm and trying
to get the id of a row in asset.copy.  For some reason I am getting
back what looks like an unAPI URI instead of just the id of the
row.  I've been staring at this for a while and not sure why this is
happening or the best way to fix it.  This is around line 2030 in my
WWW/SuperCat.pm in EG 2.12.8.  The basic code flow in
WWW/SuperCat.pm is:

results retrieved from cstore
my $marcxml = XML::LibXML->load_xml(...);
my @copies;
for my $node ($marcxml->getElementsByTagName('holdings')) {
   for my $volume ($node->getElementsByTagName('volume')) {
     for my $copy ($volume->getElementsByTagName('copy')) {
       push @copies, {
         f => $copy->getAttribute('id'),
       };

f ends up with unAPI stuff in it instead of just the row id that I
am looking for.  It looks like:

ftag:open-ils.org:U2@acp/5826234

The part that I want is after the /   I put in a hack to manipulate
the unAPI string and strip out the / and everything in front of it
but I don't want to leave it that way.  I would like to do this the
correct way.

I'm not sure if it really is supposed to behave this way or not.
Assuming it is, I was thinking maybe a function exists that can
extract the row id from the unAPI URI?  I wasn’t able to find one.

Any ideas how to correctly get just the real row id from the
database without the unAPI stuff?

Thanks in advance!


--

John Merriam
Evergreen System Specialist
Bibliomation, Inc.
24 Wooster Ave.
Waterbury, CT 06708
203-577-4070 x108


Re: [OPEN-ILS-GENERAL] unAPI from getAttribute in WWW/SuperCat.pm?

2018-01-02 Thread Daniel Wells
Hello John,

This part of the code is pulling data from the unapi.bre() function in the
DB, so in this case, you want 'copy_id', i.e.:

...
f => $copy->getAttribute('copy_id'),
...

This said, I think we'd all be interested to know exactly what you are
trying to accomplish, as there are other existing APIs for getting copy
IDs, so I am not sure if adding it into this SRU function is the easiest
way to go.

Sincerely,
Dan


On Tue, Jan 2, 2018 at 9:50 AM, John Merriam  wrote:

> Hello.  I am working in the perl module WWW/SuperCat.pm and trying to get
> the id of a row in asset.copy.  For some reason I am getting back what
> looks like an unAPI URI instead of just the id of the row.  I've been
> staring at this for a while and not sure why this is happening or the best
> way to fix it.  This is around line 2030 in my WWW/SuperCat.pm in EG
> 2.12.8.  The basic code flow in WWW/SuperCat.pm is:
>
> results retrieved from cstore
> my $marcxml = XML::LibXML->load_xml(...);
> my @copies;
> for my $node ($marcxml->getElementsByTagName('holdings')) {
>   for my $volume ($node->getElementsByTagName('volume')) {
> for my $copy ($volume->getElementsByTagName('copy')) {
>   push @copies, {
> f => $copy->getAttribute('id'),
>   };
>
> f ends up with unAPI stuff in it instead of just the row id that I am
> looking for.  It looks like:
>
> ftag:open-ils.org:U2@acp/5826234
>
> The part that I want is after the /   I put in a hack to manipulate the
> unAPI string and strip out the / and everything in front of it but I don't
> want to leave it that way.  I would like to do this the correct way.
>
> I'm not sure if it really is supposed to behave this way or not. Assuming
> it is, I was thinking maybe a function exists that can extract the row id
> from the unAPI URI?  I wasn’t able to find one.
>
> Any ideas how to correctly get just the real row id from the database
> without the unAPI stuff?
>
> Thanks in advance!
>
> --
>
> John Merriam
> Evergreen System Specialist
> Bibliomation, Inc.
> 24 Wooster Ave.
> Waterbury, CT 06708
> 203-577-4070 x108
>


[OPEN-ILS-GENERAL] unAPI from getAttribute in WWW/SuperCat.pm?

2018-01-02 Thread John Merriam
Hello.  I am working in the perl module WWW/SuperCat.pm and trying to 
get the id of a row in asset.copy.  For some reason I am getting back 
what looks like an unAPI URI instead of just the id of the row.  I've 
been staring at this for a while and not sure why this is happening or 
the best way to fix it.  This is around line 2030 in my WWW/SuperCat.pm 
in EG 2.12.8.  The basic code flow in WWW/SuperCat.pm is:


results retrieved from cstore
my $marcxml = XML::LibXML->load_xml(...);
my @copies;
for my $node ($marcxml->getElementsByTagName('holdings')) {
  for my $volume ($node->getElementsByTagName('volume')) {
for my $copy ($volume->getElementsByTagName('copy')) {
  push @copies, {
f => $copy->getAttribute('id'),
  };

f ends up with unAPI stuff in it instead of just the row id that I am 
looking for.  It looks like:


ftag:open-ils.org:U2@acp/5826234

The part that I want is after the /   I put in a hack to manipulate the 
unAPI string and strip out the / and everything in front of it but I 
don't want to leave it that way.  I would like to do this the correct way.


I'm not sure if it really is supposed to behave this way or not. 
Assuming it is, I was thinking maybe a function exists that can extract 
the row id from the unAPI URI?  I wasn’t able to find one.


Any ideas how to correctly get just the real row id from the database 
without the unAPI stuff?


Thanks in advance!

--

John Merriam
Evergreen System Specialist
Bibliomation, Inc.
24 Wooster Ave.
Waterbury, CT 06708
203-577-4070 x108