Evergreen ILS Website

IRC log for #evergreen, 2018-03-27

| Channels | #evergreen index | Today | | Search | Google Search | Plain-Text | summary | Join Webchat

All times shown according to the server's local time.

Time Nick Message
04:01 abowling1 joined #evergreen
06:30 pinesol_green News from qatests: Testing Success <http://testing.evergreen-ils.org/~live>
07:23 rjackson_isl joined #evergreen
07:28 agoben joined #evergreen
08:25 collum joined #evergreen
08:28 jvwoolf joined #evergreen
08:32 rlefaive joined #evergreen
08:34 remingtron joined #evergreen
08:39 kmlussier joined #evergreen
08:52 mmorgan joined #evergreen
08:52 Dyrcona joined #evergreen
08:54 bos20k joined #evergreen
09:21 yboston joined #evergreen
09:21 Bmagic @coffee jeff
09:21 * pinesol_green brews and pours a cup of Panama Gesha 2011, and sends it sliding down the bar to jeff
09:21 Bmagic @coffee [someone]
09:21 * pinesol_green brews and pours a cup of Kenya AA, 2003 Crop, and sends it sliding down the bar to abneiman
09:21 Bmagic @coffee
09:21 * pinesol_green brews and pours a cup of La Esperanza Colombia Huila, and sends it sliding down the bar to Bmagic
09:21 Bmagic On me yall
09:22 abneiman bmagic++ man, I NEVER get coffee from pinesol! :)
09:22 Bmagic haha! Today is your lucky day! Time to play the lotto
09:23 abneiman nope, clearly I used up all my luck on virtual coffee
09:24 Bmagic :)
09:33 Bmagic Just got hit with an email about a company wanting to register our domain name in China. They wanted to know if we had business partners in China. I was fooled into replying but I should have googled it
09:33 Bmagic https://www.chinalawblog.com/2017/08/​the-china-domain-name-scam-redux.html
09:42 Dyrcona I had someone ask to buy my domain a few years ago.
09:55 yboston joined #evergreen
10:02 rlefaive joined #evergreen
10:06 littlet joined #evergreen
10:11 rlefaive joined #evergreen
10:11 stephengwills joined #evergreen
10:33 rlefaive joined #evergreen
10:40 Jaswinder joined #evergreen
10:41 Jaswinder Hi Guys, I want to test Ebook API methods form srfsh. I tried to send the request it is throwing 500 error, Basically, I am trying to call this Ebook API method: open-ils.ebook_api.title.details
10:42 Jaswinder Example: request open-ils.ebook_api open-ils.ebook_api.title.details {"sessionid":"1522161337.001863.​152216133624029","title_id":"a"}
10:42 Jaswinder Any thoughts, how do I test it?
10:48 kmlussier joined #evergreen
10:52 * kmlussier plans to buy lottery ticket since she hasn't used up her luck yet on virtual coffee.
10:55 Jaswinder Can anyone help here?
10:56 dbs sorry Jaswinder I don't know anything about the ebook api
11:01 Jaswinder Anyone else?
11:03 JBoyer jeffdavis would know the most about it, but I'll mention some low-hanging fruit: You already have the setup you need on the Overdrive or OneClick side? This service can't do anything without some configuration on their side. (and they usually point you at a test system, etc.)
11:05 mmorgan1 joined #evergreen
11:07 dbwells Jaswinder: it looks like that method is not expecting an argument hash, but rather just two unnamed arguments, something like: request open-ils.ebook_api open-ils.ebook_api.title.details "1522161337.001863.152216133624029", "a"
11:07 stephengwills joined #evergreen
11:08 dbwells (using your example data, which may or may not do something of value)
11:10 Jaswinder JBoyer - Yes, i do have setup
11:12 JBoyer Ok. Did dbwells suggestion help? I've not called these services manually so I have no idea if that should work. The title id seems a little unusual, does it need a real UUID or something, or can you not even connect to the remote service to make the call?
11:13 Jaswinder dbwells - I have my own ebook version of API setup locally which I am calling using the srfsh utility. I tried what you sent but it gave no response.
11:13 rlefaive joined #evergreen
11:14 kmlussier dbwells++
11:14 Jaswinder This is an example command: request open-ils.ebook_api open-ils.ebook_api.get_patron_id "ASDABS-ASSAS-2323", "1212133", "BAC@GMAIL.COM"
11:15 kmlussier gmcharlt / phasefx: I was thinking of upgrading the MassLNC community demo server to 3.1. Would you be okay with keeping the Equinox demo server at 3.0 so that folks have a choice of which release they try out?
11:20 dbwells Jaswinder: also, your session ID doesn't look like what I would expect for an Ebook API session ID.  It looks like an OpenSRF session ID, which isn't what you want, I think.
11:21 dbwells Jaswinder: in my basic testing, my session ID looks like "ebook_api.ses.{HASH_VALUE}"
11:21 Christineb joined #evergreen
11:21 dbwells This is after starting a "test" session using:  request open-ils.ebook_api open-ils.ebook_api.start_session "ebook_test", "1"
11:24 rlefaive joined #evergreen
11:35 Jaswinder dbwells - You are correct. I tried with new session id and I got no response.
11:36 gmcharlt kmlussier: in the short term, but not indefinitely
11:36 Jaswinder I tried the following: request open-ils.ebook_api open-ils.ebook_api.get_patron_id "B225D41C-CDFS-4F60-9FF5-AASSWD11", "ebook_api.ses.a8f6bb29081a44b1ff83f7e542dcca6d", "abc@gmail.com"
11:37 Jaswinder The perl code looks for 3 arguments: token, session_id, and an email
11:38 kmlussier gmcharlt: OK, thanks. I'll upgrade it for now then. I can always move it back to 3.0 when the other server moves to 3.1.
11:38 bshum systemd-- # cries to himself as he keeps poking at Ubuntu 18.04
11:39 JBoyer gmcharlt, while you're around, can you look at the last comment of bug 1758347
11:39 pinesol_green Launchpad bug 1758347 in Evergreen 3.0 "wrong version of asset.merge_record_assets() stored function" [High,Fix committed] https://launchpad.net/bugs/1758347
11:39 JBoyer ?
11:39 pastebot "Jaswinder" at 64.57.241.14 pasted "srfsh logs" (21 lines) at http://paste.evergreen-ils.org/1049
11:39 gmcharlt JBoyer: crap. thanks for the heads-up
11:40 Jaswinder I have pasted the logs here
11:40 JBoyer gmcharlt, it happens. I just wanted to make sure it was seen before 3.0.6 is cut. Thanks!
11:41 kmlussier JBoyer++
11:50 Jaswinder dbwells - any comments/suggestions based on the logs?
11:58 dbwells Jaswinder: sorry, stepped away for a few minutes.
11:58 Jaswinder np
12:02 dbwells Jaswinder: I don't see anything jumping out in that log, sorry.
12:02 Jaswinder hmm - Is there any place that I can check?
12:03 dbwells Most likely place to start would be the osrfsys.log
12:05 khuckins joined #evergreen
12:06 Jaswinder let me check that as well
12:07 dbwells Jaswinder: So, 'get_patron_id' is something you have added?  I do not see it in the code.
12:08 * berick tries to devise the incantation that makes an opensf 2.5 api call behave like an opensrf 2.4 api call WRT bundling/chunking.
12:08 Jaswinder Yes, I did as a part of addition API vendor
12:10 Jaswinder So, basically, I added an entry to EbookAPI.pm inside the %vendors% block as : 'ebooks' => 'OpenILS::Application::EbookAPI::EBooks'
12:11 Jaswinder and then created a perl class similar to oneclickdigital.pm as Ebooks.pm inside /Application/EbookAPI/
12:11 jihpringle joined #evergreen
12:11 Jaswinder If you want, I can share a piece of code to your email or another location
12:13 dbwells Jaswinder: From the log you posted, it seems like your request "worked", it just didn't return anything.  I might try making my 'get_patron_id' method return "TEST" right away or something like that just to make sure everything is wired up correctly.  I need to head out for a bit, but if you want to email, it is dbw2@calvin.edu.  I'll be back in around an hour or so.
12:14 Jaswinder Thanks and I appreciate it! I will try it out first and then email you if I need help.
12:16 terran joined #evergreen
12:17 ngf42 joined #evergreen
12:38 rlefaive joined #evergreen
12:41 mmorgan1 Anyone willing to run a quick query? I'm wondering if anyone gets significant numbers from the query in comment #1 of bug 1758975
12:41 pinesol_green Launchpad bug 1758975 in Evergreen "Item status can be set to Lost and Paid inappropriately when closing a transaction for a Long Overdue or Lost returned item" [Undecided,New] https://launchpad.net/bugs/1758975
12:43 yboston joined #evergreen
12:44 jeffdavis mmorgan1: that query gives 7 hits with null stop_fines and 26 with stop_fines = LOST on our system
12:47 Dyrcona Gives me 1 with null stop_fines and 1,938 with LOST.
12:50 mmorgan jeffdavis: Dyrcona: Interesting. I don't find any with NULL stop_fines, but not too long ago we closed a large number of transactions that had been erroneously left open.
12:53 mmorgan Our circs go to LONGOVERDUE at 42 days. Dyrcona: I seem to remember your timetable for going to LOST was similar? Or maybe shorter?
13:05 Dyrcona Looks like like we have two a/ts for lost at 14 days and 28 days.
13:06 Dyrcona We don't use longoverdue.
13:12 collum "No rows found"
13:12 collum Lost at 60 days and we don't use longoverdue.
13:14 Dyrcona The 14 days lost is limited to 3 org units by a filter. I suspect 3 banches of the same system, but I didn't look them up.
13:14 Dyrcona Everyone else uses 28 days.
13:15 mmorgan We also have the ou settings to restore overdues on long overdue/lost item return set to TRUE, which likely plays into this.
13:24 mmorgan jeffdavis++
13:24 mmorgan Dyrcona++
13:24 mmorgan collum++
13:24 * mmorgan runs off to fix status in 84 items
13:28 Jaswinder dbwells - I have sent you an email with the source code.
13:47 dbwells Jaswinder: well, I can answer at least one question.  In Evergreen, an "authtoken" is a hash value you receive when you first login, and is then sent on all subsequest request to make sure you are a valid user with a valid session.  The easiest way to get one is via the srfsh "login" command, e.g.: login userName password123
13:49 dbwells That should give you a response of "Login Session: c35674c2d671..."  The token is that long hexidecimal string.
13:52 dbwells So, the full call, something like: request open-ils.ebook_api open-ils.ebook_api.get_patron_id "<authtoken goes here>", "ebook_api.ses.<some session value>", "abc@gmail.com"
13:54 Jaswinder Thanks, I did try new token and session id for ebooks and ran the request. The logs says that the authentication failed.
13:56 Jaswinder I also noticed this in the log: No user in the cache exists with key oils_auth_ebooks
13:57 Jaswinder Does this have any role in authenticating the user?
14:01 dbwells Jaswinder: can you paste up your exact error log?  (with truncated session values, if needed)
14:04 dbwells That last error comes from the Evergreen auth service (oils_auth.c), but I don't know where that key would come from.
14:06 dbwells Nevermind, I see, somewhere you are passing an authtoken of "ebooks".  That obviously isn't right.
14:06 pastebot "Jaswinder" at 64.57.241.14 pasted "osrfsys.log" (8 lines) at http://paste.evergreen-ils.org/1058
14:08 dbwells Jaswinder: In that example, you have an extra argument "recordedbooks".  It is not needed.
14:09 Jaswinder Actually, it is ebooks
14:10 Jaswinder I needed to specify a vendor name. so the call can go to correct vendor file. In my case, it is Ebooks.pm file
14:10 dbwells Well, in any case, the first argument must be the authtoken, then the session, then the identifier (email, in this case).
14:10 dbwells No, the vendor is "baked in" to the ebook_api session at that point.
14:11 dbwells Only the intial "start_session" needs the vendor key.
14:11 yboston joined #evergreen
14:13 dbwells Jaswinder: Does that make sense?
14:13 * dbwells goes to check his assumptions...
14:13 Jaswinder Yes
14:15 Jaswinder One more question
14:16 Jaswinder I have called the request without the vendor name. I see authentication failed again. I see this in the log: EbookAPI: getting patron id for patron abc@gmail.com How do I make sure that this user exist in EG?
14:21 Dyrcona Jaswinder: That code is normally used from the OPAC, after a patron has logged in. It generally sends the patron barcode to the vendor.
14:21 Dyrcona Jaswinder: What, exactly, are you trying to do?
14:23 _bott_ Does anyone have a good reference for the color codes for the rectangle around a user's name in the XUL client?
14:25 dbwells Jaswinder: You will see the "getting patron id for patron..." message every time if you have "info" or lower level logging on.  Are you also getting the "authentication failed" message still?  If so, your authtoken is bad.
14:27 dbwells Jaswinder: Other than that, there is no inherent connection between Evergreen users and the token you are passing along to your provider.  I think the assumption here is you will do everything logged in as yourself, so having an authtoken already guarentees you are in Evergreen.
14:27 kmlussier _bott_: I've seen good documentation somewhere on it. I can't remember if it was in the eg docs or somewhere else.
14:28 Jaswinder Yes, I am getting that. I want to get the patron id from external API call after the user is authenticated by EG.
14:28 _bott_ kmlussier: I know I've seen the same, but I haven't tracked it down
14:28 kmlussier _bott_: http://docs.sitka.bclibraries.ca/Sitka/​current/html/patron-status-colour.html
14:28 kmlussier When in doubt, always start with the Sitka documentation.
14:28 _bott_ sitka++
14:29 kmlussier _bott_: I don't know if those are standard colors or if they have been customized.
14:29 _bott_ It's a start!
14:30 dbwells Jaswinder: Then I would say you do not need to further check for the user existence based on their email, they have already logged in at that point?  Does that help?
14:31 dbwells Jaswinder: It looks like you are on the right track.
14:32 Jaswinder dbwells: so basically, I can remove these lines:  # verify that user is authenticated in EG     my $e = new_editor(authtoken => $auth);     if (!$e->checkauth) {         $logger->error("EbookAPI: authentication failed: " . $e->die_event);         return;     }
14:32 dbwells Jaswinder: No, that is what checks the token.
14:33 dbwells Jaswinder: if *that* is still failing, for some reason you don't have a valid authtoken.  Try logging in again?
14:33 Jaswinder The call is failing and I am getting :EbookAPI: authentication failed message
14:33 Jaswinder yes, I can try that
14:34 dbwells by default, a token expires after one hour.
14:34 Dyrcona Jaswinder: Have you logged in to Evergreen in srfsh before trying this?
14:34 Jaswinder yes, using logind egadmin password
14:34 dwgreen joined #evergreen
14:35 Jaswinder *correction login egadmin password
14:36 Dyrcona OK, and you are passing the authtoken that you got back from that as a quoted string in the first argument to your calls?
14:36 Jaswinder yes
14:36 Dyrcona Then, you would not see that message from that line of code.
14:39 Dyrcona If that line that you pasted fails, you're not logged in or you've passed an invalid token.
14:40 Jaswinder Okay, so I am pass the authentication process. Now, I need to get the user email associated with that username from db and the library id.
14:40 Jaswinder Any thoughts on this?
14:41 dbwells Jaswinder: yeah, progress!
14:41 Jaswinder Yup :)
14:41 Jaswinder Thank You guys for helping
14:43 Dyrcona Jaswinder: There's a call to retrieve the patron session...open-ils.auth.session.retrieve.
14:43 Dyrcona You pass the Evergreen session token, and it returns the user object.
14:44 Dyrcona That object has an email field with the email address, if any.
14:44 Dyrcona So, are you adding a new vendor that requires the email address to authenticate the patron?
14:46 jeffdavis Jaswinder: what ebook vendor are you trying to work with?
14:46 Jaswinder Dyrcona - I received an error because there is no library id associate with this user. So, the external API call failed. I need to have a library ID
14:47 Jaswinder I am adding a new vendor.
14:47 jeff Jaswinder: which vendor?
14:47 Dyrcona Jaswinder: You copied the Overdrive code?
14:47 Jaswinder I may need to add an entry to DB
14:47 Dyrcona You would get your library ID from your vendor, if necessary.
14:47 Jaswinder No, I copied the OneClickdigital library code
14:48 Dyrcona OK. It's similar.
14:48 jeffdavis Jaswinder: I'm asking because your code earlier mentioned "recordedbooks", but Recorded Books and OneClickdigital are the same thing.
14:48 Jaswinder The requirement is to have library ids and a key in a separate table
14:49 Jaswinder Jeff - Yes, that is correct
14:49 Dyrcona Jaswinder: There are settings for that in config.org_unit_setting_type.
14:49 Jaswinder But, I am writing the code with different set of APIs
14:49 Dyrcona I'll ask again, what are you trying to do?
14:50 Dyrcona What's your overall goal?
14:50 dbwells I think he is adding "ebooks.com" as a provider.
14:51 Jaswinder Dyrcona: My goal is to add additional vendor that will be used for basic search, advanced search, checkouts, and etc. vendor API will return books or audio data and that will be displayed on the results.
14:52 Dyrcona Jaswinder: The best way to get the results in search is to add MARC records supplied by the vendor, then you use the oneclick digital settings with Evergreen.
14:52 Dyrcona If you want to use a search API for recorded books to add to Evergreen search results, a different approach would be in order.
14:53 Dyrcona I think you'd want to add a module to search that would use the vendor's api and add the results to your evergreen search results.
14:53 Dyrcona I'm not sure if anyone has ever done that.
14:54 Jaswinder I am not aware of MARC records. However, I want another vendor just like Overdrive with additional functionality in place
14:54 JBoyer I gave it serious consideration until I saw the API I was going to have to talk to and then changed my mind. (XML makes you want to wash yo mouth out with SOAP...)
14:54 bshum ha ha
14:56 Jaswinder One more thing, the results will be displayed in a separate tab along with other vendor tabs (if any). I have the db schema that contains library_id and keys that will be used for all API calls.
14:56 Dyrcona Jaswinder: The vendor can usually supply you with records that you can load into the database of the items in your collection with them.
14:59 jeffdavis Incorporating external search results would be pretty neat. We don't do that for Overdrive and OneClickdigital because integrating the results with EG search results runs into the difficulties JBoyer mentioned, but showing them separately from Evergreen search results ("bento box" style search) seems reasonable.
15:01 jeffdavis And it has the advantage of not needing to import vendor records into Evergreen in advance. :)
15:01 Jaswinder Jeff: Yes, I agree.
15:02 Jaswinder This is approach that I taking
15:02 jeffdavis I like it :)
15:03 Jaswinder For the initial part, I need to first ensure that the user is authenticated by EG which I have done so. Then, I want to use the user email along with library id and key to make calls out.
15:03 mmorgan1 joined #evergreen
15:07 Jaswinder Do I have add an entry to this table: config.org_unit_setting_type to get library_id?
15:07 Dyrcona You might, but you could always use the one for oneclick digital.
15:08 Dyrcona That table provides the list of basic settings.
15:08 * csharp tries to wrap his head around dereferencing perl arrays within an array :-/
15:08 Dyrcona You assign them values by making an entry in actor.org_unit_setting.
15:08 Dyrcona csharp: Actuall arrays or arrays refs?
15:08 jeff csharp: have a concrete example?
15:09 Dyrcona csharp: If you installed perldoc: man perllol
15:09 csharp https://pastebin.com/AG2qk2EA
15:10 csharp this is towards my attempt to fix bug 1666987
15:10 pinesol_green Launchpad bug 1666987 in Evergreen "build/tools/relator_map no longer fetching relator codes" [Low,Confirmed] https://launchpad.net/bugs/1666987 - Assigned to Chris Sharp (chrissharp123)
15:11 Dyrcona So, at columns is an array of arrays of 3 members?
15:11 Jaswinder Is the library id uniquer per vendor or per user in EG?
15:11 csharp Dyrcona: looks like 2 members - code and relator term
15:11 jeffdavis Jaswinder: it depends on your vendor.
15:11 Dyrcona Jaswinder: It is per vendor, but it could be unique per library & vendor combination if you have more than 1 library in your Evergreen.
15:12 Jaswinder I see. so which tables I should be using to add library_id for a vendor?
15:13 Dyrcona csharp: easy: $columns[0] is the first row $columns[0][0] is the first column of the first row, $columns[0][1] is the second column of the first row, and so one.
15:13 csharp Dyrcona: ah - thanks for the pointer
15:14 * csharp has the "alapaca" book open to the references section
15:14 Dyrcona Jaswinder: you want to insert a row in actor.org_unit_setting.
15:15 Dyrcona org_unit is the id of the library, for name use the name of the setting in config.org_unit_setting_type, and for value, it is a JSON value, so use double quotes if it is a string.
15:17 Jaswinder Thanks! I am going to try this now
15:17 Dyrcona The id will be generated automatically if you don't supply it or leave it null.
15:18 jeff csharp: looking at the HTML::TableExtract docs, and depending on what you're trying to do, the rows() table method might be more useful for you: https://metacpan.org/pod/HTML::TableExtract
15:19 csharp jeff: yep, that looks better
15:22 jeff also, you probably want to test success using if ($response->is_success) instead of just if ($response) -- I didn't have LWP::Protocol::https installed, so if ($response) was true but the value of $content later on was "LWP will support https URLs if the LWP::Protocol::https module is installed."
15:23 csharp jeff: thanks for that
15:23 Dyrcona While on the subject of inserting into actor.org_unit_setting ... I made this handy, little skeleton for Emacs this morning: https://pastebin.com/Hzq1Q9J9
15:25 jeff csharp: and you can use something like this to output two columns for each row with a tab between them: map { print "@{$_}[0]\t@{$_}[1]\n" } $table->rows();
15:26 jeff csharp: that looks a bit dense, moreso because I put it on one line for irc.
15:26 Dyrcona You can do a join, which is cleaner, IMNSHO.
15:26 jeff sure, or a foreach, etc!
15:26 csharp jeff: that's exactly what I'm after for the finished product - thank you
15:27 jeff Dyrcona: oh, you meant a join within the map, right? :-)
15:28 jeff that would look something like this: map { print join("\t", @{$_}), "\n" } $table->rows();
15:28 Dyrcona jeff: I haven't looked at the output of the function you mentioned but I was thinking print join('\t', @$_)
15:28 Dyrcona yes, that, more or less.
15:31 jeff in that same map block, you could grab the first value from the row and test for a leading hyphen, and then either remove it or skip output of the entire row, depending on what you want to do for "Discontinued" codes.
15:31 jeff (there's apparently only one)
15:31 csharp jeff: yes, I want to remove the leading hyphen to be in line with the script I'm replacing
15:31 Dyrcona csharp: Would the current script not work if the useragent is set?
15:32 Dyrcona I never got that far into fixing it because other things came up.
15:32 csharp Dyrcona: dbwells was just asking me that privately - it appeared to break when I tested, but I'll try again
15:33 Jaswinder What are these fields for: org_unit_setting_type: frm_class, view_perm, update_perm?
15:33 jeff cloudflare--
15:33 Dyrcona csharp: I seem to recall that part of the problem was the pages had been reorganized, but I'm unclear.
15:33 jeff loc_blindly_accepting_defaults--
15:34 Dyrcona Jaswinder: You view_perm and updates_perm can be set to say that the user must have those permissions to view or update the setting via the staff client.
15:35 Dyrcona fm_class is a reference to a class in the fm_IDL.xml if one exists for that setting.
15:37 Dyrcona typos-- # but it's IRC.
15:38 * csharp confirms that changing LWP::Simple to LWP::UserAgent works without further work to the HTML parsing
15:38 csharp so yay!
15:38 Dyrcona csharp++
15:38 csharp I'll look into what jeff ran into with the HTTPS warning
15:39 Dyrcona IIRC, I looked into it briefly around the time of the 2.9 release.
15:40 csharp I'll test on a fresh server and see if we need to add new packager dependencies
15:40 * csharp heads out for now
15:41 dbwells csharp++
15:42 Dyrcona Guess I never made a Lp bug for it.
15:42 jeff csharp: the relator_map script uses an http url, and LoC isn't redirecting to https, so you'll likely not hit that at all. Also, I was testing your script on a box that would not have have Evergreen pre-reqs installed, so the needed modules for https might already be there.
15:44 jeff somewhat annoying that a single checkbox on LoC's cloudflare account configuration interface breaks us, but working around it rather than trying to get someone to untick the box is likely the better option for now. :-P
15:46 Jaswinder Dyrcona: Where do I add the library id then? Which field?
15:46 Jaswinder Sorry, I am bit confused here
15:47 derekz joined #evergreen
15:48 * jeff tries asking LoC anyway
15:53 stephengwills joined #evergreen
16:02 jeffdavis INSERT INTO config.org_unit_setting_type (name, label, grp, datatype) VALUES ('ebook_api.ebooks.com.library_id','Ebooks.com Library ID', 'ebook_api', 'string');
16:02 jeffdavis INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (1, 'ebook_api.ebooks.com.library_id', '"123"');
16:02 jeffdavis Jaswinder: I would do something like the above.
16:02 jeffdavis First you create a new library setting type for Ebooks.com library_id in the config.org_unit_setting_type table, then you add the actual library_id value for your library in actor.org_unit_setting.
16:03 Jaswinder Thanks Jeff
16:07 dbwells Jaswinder: Just to double-check and turn your question back around, whatever you are planning to store in "library_id" is per library, not per user?
16:09 dbwells Nevermind, I think see where you mentioned combining it with the user's email.  I think I get what is going on now.
16:10 Jaswinder yea, got it dbwells.
16:11 stephengwills joined #evergreen
16:12 Jaswinder Jeff, the insert statement to org_unit_settings table has org_unit as 1. Why the org_unit is 1 here?
16:13 dbwells Jaswinder: that is just the default "root" org_unit
16:13 dbwells It comes from the ids in the actor.org_unit table.
16:13 Jaswinder So it is not tied to any vendor?
16:15 dbwells That row just says "for org_unit 1, for the setting of "ebook_api.ebooks.com.library_id", the value is "123".  So the second column is what ties it to a vendor, so to speak.
16:15 Jaswinder Got it, this is org unit for the libraries that user selects
16:16 dbwells Yes, however that happens in your case (manual selection, home ou, etc.)
16:20 khuckins joined #evergreen
16:20 Dyrcona Ah, no. I was messing more with the marc_tooltips script and not relator codes now that I think about it, but neither one seemed to work.
16:23 jeff Dyrcona: loc.gov is behind cloudflare now, and they have the (default, I believe) "Browser Integrity Check" enabled, so certain user-agent strings (or lack of user-agent string) are rejected: https://support.cloudflare.com/hc/en-us/articles/2​00170086-What-does-the-Browser-Integrity-Check-do-
16:24 Dyrcona This was in 2015 and they were blocking based on UserAgent.
16:24 Dyrcona Dunno if they were at cloudflare, then, but the useragent checks were in place.
16:24 Dyrcona Kind of dumb, really. I write bots all the time that claim to be Firefox.
16:25 Dyrcona And, I'm usually just interested in the text, so actually less stress on the site than a normal user who grabs images, etc.
16:26 Dyrcona Anyway, I'm looking at the scripts, now, and thinking about commenting on bug 1746121.
16:26 pinesol_green Launchpad bug 1746121 in Evergreen "Wishlist: Add MARC field help to the MARC editor" [Wishlist,New] https://launchpad.net/bugs/1746121
16:27 Dyrcona IIRC, the one that grabs the French translations from LAC-BAC worked the last time I tried it.
16:28 Dyrcona Maybe I'll comment some other time.
16:28 jeff Dyrcona: I'm going to pester webmaster@loc to see if they'll add a page rule, but that's no reason not to fix it on our end. :-)
16:30 Dyrcona I have no problem lying about a useragent string. :)
16:38 * Dyrcona has written some rather sophisticated link checking bots, including one that parses a JSON object out of the JavaScript on the page that comes back and checks one of it's fields to determine if the link is still valid. Yes, someone has gone that far in making their site "dynamic."
16:38 Dyrcona They can't just return a 404 like normal people.
16:41 jeff we have at least one vendor where their removed/deleted titles cannot be determined until you make an attempt to view/circ the title. they are of course a CPC vendor, so the only way to do a definitive check for validity costs a non-trivial amount of money. :-)
16:42 Dyrcona That's a bummer.
17:00 mmorgan joined #evergreen
17:06 mmorgan left #evergreen
17:10 Jaswinder Guys, is there a way I can write test case to run srfsh commands. I don't like to regenerate sessions every hour
17:19 dbwells Jaswinder: srfsh is just a handy way to run OpenSRF commands.  Our live tests are written in Perl rather than using srfsh.  You can find them in Evergreen/Open-ILS/src/perlmods/live_t  (for inspiration)
17:23 Jaswinder I am looking at this and this is good
17:23 Jaswinder How do I retrieve email id of the user from table? Also, how DB calls are made to retrieve information?
17:32 dbwells Jaswinder: I need to head out shortly, but there are no good quick answers to those questions.  Here is a quick answer which might be okay:
17:33 dbwells There are separate APIs for fetching many things.  These are not uniform, but particular to certain needs.
17:33 dbwells To get the email for a usr, you need to get at the usr object.
17:34 dbwells One way to do this, as mentioned earlier, is via 'open-ils.auth.session.retrieve'.
17:34 Jaswinder okay, So for newly created tables, I can still use existing API to get data?
17:36 dbwells Actually, it looks like the whole usr object might already be on the 'requestor' for the CStore editor, so $editor->requestor->email might be all you need here.
17:37 dbwells In addition to "custom" APIs, there are uniform APIs which are autogenerated from something called the IDL.
17:37 dbwells An entirely new table would also need an entry in the IDL to get these methods autogenerated.
17:38 Jaswinder Good to know that information. I will research on this as how I can leverage IDL to get the data
17:40 dbwells Jaswinder: if you go back to here and look under "Dealing with Data", you might be able to pick it up.  http://library.calvin.edu/devd​ocs_project/doku.php?id=start  Use the live tests for examples as well.
17:41 dbwells Lack of tuits have prevented that page from maturing, but having you asking these questions is the right kind of inspriation.
17:41 dbwells Basically, for your needs, "cstore" and "CstoreEditor" are the things to focus on.  PCRUD is similar, but more useful for external/client-side access to things.
17:42 Jaswinder thanks! I am going to review these docs now
17:46 dbwells I know the docs are still jumbled and incomplete.  You seem savvy enough, so that information combined with trolling through the code for "cstore" and "$editor->" calls might get you there.  Good luck!  Folks are generally most in the channel during 9-5 Eastern, though a few are further west.
17:46 * dbwells heads out
18:31 pinesol_green News from qatests: Testing Success <http://testing.evergreen-ils.org/~live>
18:33 Dyrcona "And, there was much rejoicing."
18:46 ngf42 http://i.imgur.com/oLYSHuu.gif
18:47 Dyrcona Indeed!
18:47 Dyrcona ngf42++
18:48 ngf42 EveryoneWhoDidActualWorkOnMakingThatHappen++ Dyrcona++
18:52 abowling joined #evergreen
18:54 Dyrcona It's weird some of the stuff you find if you just latest pates on Pastebin.
20:07 Dyrcona joined #evergreen
20:21 stephengwills joined #evergreen

| Channels | #evergreen index | Today | | Search | Google Search | Plain-Text | summary | Join Webchat