Time |
S |
Nick |
Message |
01:24 |
|
|
AndrewFH joined #koha |
01:47 |
|
|
khall joined #koha |
05:48 |
|
|
alex_a joined #koha |
06:46 |
|
|
reiveune joined #koha |
06:46 |
|
|
paul_p joined #koha |
06:59 |
|
|
cait joined #koha |
07:00 |
|
|
cait1 joined #koha |
07:02 |
|
|
alex_a joined #koha |
07:13 |
|
|
petrova joined #koha |
07:30 |
|
|
lds joined #koha |
07:36 |
|
|
petrova_ joined #koha |
08:37 |
|
|
paul_p joined #koha |
08:41 |
|
|
andyH joined #koha |
08:42 |
|
andyH |
Good morning! Is there anyone in here that's an expert on using Koha's API, or generally automating pulling data out of Koha? (sorry if that sent twice) |
08:43 |
|
|
paul_p_ joined #koha |
08:45 |
|
Joubu |
andyH: Hi, ask your question and you will see if someone has the answer :) |
08:49 |
|
andyH |
Fair enough! I'm just considering options at the moment really, but I want to regularly (nightly?) pull out all items that have been checked out and take a copy somewhere else, though ideally I need to be able to record when checked out items are checked back in again. The goal is for the data to be used for some reporting over time, as well as displaying a dashboard outside Koha to individual users of things they've borrowed |
08:50 |
|
andyH |
I'm musing over using the API, which looks like I could just grab all checked out items easily enough, but doesn't seem to offer an obvious way to capture what was checked in again without polling every single item. I assume SQL could be used to interrogate the data directly too. |
08:51 |
|
andyH |
However, I'm new to Koha - I've just been pulled in to help another organisation - so I'm just trying to work out what's technically possible without actually having access to the data myself. I don't know, for instance, if the API has any rate-limiting baked into it. |
08:53 |
|
Joubu |
by "API" you mean the "REST API" I suppose? |
08:53 |
|
Joubu |
I am not sure I understand which info you want to display on your dashboard, the items that have been checked in during the day? |
08:53 |
|
andyH |
I am supposing that too... from looking at the Koha wiki, it looks like the API has sort of evolved over time a little, but yes, the REST API is what I've settled on |
08:54 |
|
andyH |
For the dashboard, I just want to be able to show users what items they have checked out with due dates (and I only want it there as the dashboard will be showing them other non-Koha things too) |
08:54 |
|
andyH |
For reporting I want to be able to consider things being checked in and out over time. For example, looking at a subject area to see how long items are borrowed for on average over a year |
08:55 |
|
Joubu |
Are you familiar with perl? |
08:55 |
|
Joubu |
If so I would write some code using the Koha modules |
08:56 |
|
andyH |
In a past life, I am. I can read it, but I'm a bit rusty for actually writing it :) I think the organisation I'm working with is hoping to push the data into PowerBI to do some analytics with other data sources. |
08:57 |
|
andyH |
But I don't need to actually write the automation... I just need to work out how it could be done. Is the API actually good enough for pulling out large amounts of data at once, or will it need direct SQL thrown at the database to get what I'm after |
08:59 |
|
Joubu |
I think you will be stuck if you want to only use the REST API as all the routes are not implemented yet, I would suggest you to request the DB directly |
09:00 |
|
Joubu |
for reporting you will certainly need to do complex queries, with JOIN, etc. You will have to be familiar with Koha DB structure however |
09:00 |
|
andyH |
Yeah, I did read that the API was a work in progress, but was pleasantly surprised to find the documentation of API calls being pretty comprehensive |
09:01 |
|
andyH |
Unpicking the Koha db structure is potentially a fair amount of work, but that at least is more in my comfort zone |
09:02 |
|
andyH |
Is it wishful thinking for any of the db structures to be documented, even just a partial relationship diagram... |
09:04 |
|
Joubu |
http://schema.koha-community.org/ |
09:05 |
|
Joubu |
http://schema.koha-community.o[…]elationships.html |
09:05 |
|
Joubu |
but th |
09:05 |
|
Joubu |
but this is a bit scary :) |
09:10 |
|
andyH |
Oh, that is a really useful link :) |
09:11 |
|
andyH |
A bit scary, but it gives me what I need to move forwards, particularly if the API isn't there yet... so thanks for that :) |
09:15 |
|
andyH |
On a small and specific tangent, I don't suppose you know which table/field is commonly used to store the title/name of an item. The API docs didn't make it obvious, and a quick look at the tables around items don't show anything obvious (though I've only been looking for a few minutes) |
09:17 |
|
andyH |
It's possible I'm just being blind |
09:17 |
|
Joubu |
it's in the biblio table |
09:17 |
|
Joubu |
biblio.title |
09:18 |
|
andyH |
I actually just followed the relationships to the full version of that table and spotted it. Thanks :D |
09:18 |
|
Joubu |
you have items, biblioitems and biblio with biblio 1-1 biblioitems and biblioitems 1-N items |
09:18 |
|
andyH |
Yup, I was expecting something like that. I was just buried a bit deep and the view of biblio was truncated on the pages I had open |
09:19 |
|
andyH |
But that's really helpful. There's a lot of tables in here, but it actually looks - at a glance - to be pretty neatly designed |
09:20 |
|
Joubu |
not really, there are some inconsistencies there ;) |
09:20 |
|
andyH |
I look forward to them :D |
09:21 |
|
andyH |
But with this I could, if I really wanted to, replicate the bits I want out of Koha into another database, and then the people I'm working for can do all their PowerBI madness |
09:23 |
|
cait1 |
andyH: for your issues and returns questions... statistics, action_logs and issues, old_issues |
09:23 |
|
cait1 |
all of those could work |
09:23 |
|
cait1 |
an issue (checkout) is moved to old_issues when returned... and the time stamps can be queried |
09:24 |
|
andyH |
I spotted issues and was wondering whether that was checkouts or issues of a serial |
09:24 |
|
cait1 |
statistics and action_logs log circulation transactions if the logs are turned on (system preference) and are usually also quite helpful because no need to UNION |
09:24 |
|
cait1 |
issues of a serial is acutally "serial" :) |
09:24 |
|
andyH |
But having old_issues recording everything historically is really useful to know about :) |
09:25 |
|
cait1 |
we have some terminology mixup in the code vs. gui because koha was initially developed in nz, but the GUI has been taken over mostly by US terminolgoy |
09:25 |
|
cait1 |
we ar emoving to match things with the GUI in the API, but the database is another story |
09:26 |
|
andyH |
It's OK. This is perhaps the fourth library management system I've had to poke around in over the last decade, and every one has slightly different terminology, and often the same term means different things in different systems :D |
09:26 |
|
cait1 |
yep, it's part of the fun :) |
09:26 |
|
andyH |
Databases evolve and are hard to change, so I won't criticise anything in there. I know those pains well enough. |
09:27 |
|
andyH |
If I were to ask "how complete is the API", is there an obvious answer. Is everything documented in /api/v1/.html reliably functional? |
09:29 |
|
Joubu |
yes |
09:29 |
|
|
petrova joined #koha |
09:30 |
|
andyH |
Ok, that's useful. I don't think it'll easily let me know when things were checked in, but it might be useful for a couple of lightweight real time things I'm after :) |
09:31 |
|
andyH |
Thanks for the info though. It's been really helpful. Plus it's nice to dip back into IRC; it's been a while since I've had an excuse :) |
09:51 |
|
tuxayo |
petrova++ thanks for fixing translations :) |
09:52 |
|
petrova |
Glad to help! :) |
09:55 |
|
petrova |
if there's anything else I can help with related to translations just let me know and I will take a look |
09:57 |
|
Joubu |
learn Arabic, that will help! |
09:57 |
|
Joubu |
;) |
10:00 |
|
petrova |
:D |
10:02 |
|
|
lmstrandatdesk joined #koha |
10:18 |
|
|
oleonard joined #koha |
10:24 |
|
|
petrova joined #koha |
11:01 |
|
|
cait joined #koha |
11:03 |
|
|
AndrewFH joined #koha |
11:04 |
|
|
paul_p__ joined #koha |
11:09 |
|
|
AndrewFH joined #koha |
12:05 |
|
tuxayo |
`cpanm DBIx::QueryLog` and adding in the code `DBIx::QueryLog` before what one wants to debug is enough to have the SQL queries logged. This is great! |
12:31 |
|
|
David joined #koha |
12:32 |
|
|
paul_p joined #koha |
12:33 |
|
David |
Hello Everybody , Can I use a different naming for instance and for virtual host ? |
12:34 |
|
tuxayo |
hi David |
12:34 |
|
David |
If I use instance name library can I use the name opac as virtual host |
12:34 |
|
David |
Hi |
12:35 |
|
tuxayo |
What is the name of the instance for? |
12:35 |
|
tuxayo |
Why not name it like the opac directly |
12:35 |
|
tuxayo |
To avoid manual management |
12:36 |
|
|
Dyrcona joined #koha |
12:36 |
|
David |
library is the instance name |
12:38 |
|
David |
Sure, I have already created the instance library and want to use opac for virtual host |
12:38 |
|
David |
I just applied on my local machine it works |
12:39 |
|
David |
but does't work on network server |
12:39 |
|
tuxayo |
I'm not familiar with the management of instances with the package installation. But where is the instance name used? To see if renaming the instance would do the job |
12:40 |
|
tuxayo |
As the vhost would have the opac name right away |
12:44 |
|
David |
sudo koha-create --create-db library |
12:45 |
|
David |
the instance is created or located at /etc/apache2/sites-availble |
12:50 |
|
tuxayo |
And so you want to keep the name of the instance to "library" for example. And make the vhost name "opac" for example. Whereas now it's "library". Is that correct? |
12:53 |
|
David |
# Koha instance library Apache config. # OPAC <VirtualHost *:80> <IfVersion >= 2.4> Define instance "library" </IfVersion> Include /etc/koha/apache-shared.conf # Include /etc/koha/apache-shared-disable.conf # Include /etc/koha/apache-shared-opac-plack.conf Include /etc/koha/apache-shared-opac.conf ServerName library.myDNSname.org SetEnv KOHA_CONF "/etc/koha/sites/library/koha-conf.xml" AssignUserID library-koha library-koha Err |
12:54 |
|
David |
https://codeshare.io/YLzzbE |
12:55 |
|
David |
here is the code |
12:57 |
|
|
marie-luce joined #koha |
12:59 |
|
Joubu |
Replace ServerName with whatever you wish, no need to modify the instance's name |
12:59 |
|
tcohen |
hi all |
12:59 |
|
tcohen |
Joubu++ # feedback |
13:01 |
|
tcohen |
Joubu I see the guideline for <name>_id, but not for dates |
13:01 |
|
|
caroline joined #koha |
13:01 |
|
tcohen |
I chose <something>_date because that's what we had in the API guidelines |
13:02 |
|
tcohen |
but it is obviously trivial to map |
13:04 |
|
tcohen |
would you agree with suspended_on and suspended_until? |
13:05 |
|
tcohen |
as valid column names for dates? |
13:06 |
|
David |
server name with the newly created virtuahost file name ? |
13:08 |
|
Joubu |
tcohen: make sense, yes |
13:18 |
|
Joubu |
bug 21083# not pushed yet?? |
13:18 |
|
huginn |
Bug https://bugs.koha-community.or[…]_bug.cgi?id=21083 enhancement, P5 - low, ---, jonathan.druart+koha, Needs Signoff , Batch patron modification does not allow to modify repeatable patron attributes |
13:20 |
|
Joubu |
Repeatable subfields on the batch item modification tools is absolutely buggy and there is no report on bz |
13:20 |
|
Joubu |
Is "repeatable" used for item's subfields? |
13:23 |
|
|
lds joined #koha |
13:23 |
|
|
lds joined #koha |
13:47 |
|
cait1 |
tcohen: around? |
13:48 |
|
tuxayo |
hola tcohen , I wrote about my findings so far on bug 25260 . Letter data seems to magically change... I'll dig more latter. |
13:48 |
|
huginn |
Bug https://bugs.koha-community.or[…]_bug.cgi?id=25260 enhancement, P5 - low, ---, tomascohen, Needs Signoff , Merge 'reserves' and 'old_reserves' into a new 'holds' table |
13:50 |
|
|
AndrewFH joined #koha |
13:52 |
|
cait1 |
ashimema: tcohen: 28729 |
13:52 |
|
cait1 |
bug 28729 |
13:52 |
|
huginn |
Bug https://bugs.koha-community.or[…]_bug.cgi?id=28729 critical, P5 - low, ---, koha-bugs, NEW , Return-path Header not correctly set in emails |
14:17 |
|
oleonard |
Revised patch on Bug 28376 if anyone has a moment to test |
14:17 |
|
huginn |
Bug https://bugs.koha-community.or[…]_bug.cgi?id=28376 enhancement, P5 - low, ---, oleonard, In Discussion , Replace obsolete jquery-ui-timepicker-addon |
14:28 |
|
tcohen |
I'm almost back |
14:28 |
|
tcohen |
cait1 ashimema |
14:28 |
|
tcohen |
hi |
14:28 |
|
tcohen |
hi tuxayo |
14:28 |
|
cait1 |
wb tcohen |
14:28 |
|
cait1 |
sorry, i am finding bugs... |
14:29 |
|
tcohen |
tuxayo it seems to me that abnormal exits remove letters |
14:29 |
|
tcohen |
cait1 it is better not having bugs, but finding them is a great thing |
14:30 |
|
cait1 |
your vacation mus have been a good one .) |
14:30 |
|
cait1 |
i am really ready for mine soon |
15:05 |
|
huginn |
News from kohagit: Bug 28731: (bug 17600 follow-up) Import necessary subroutines in reports svc endpoint <https://git.koha-community.org[…]fbfc25c7f333aae96> |
15:15 |
|
reiveune |
bye |
15:15 |
|
|
reiveune left #koha |
15:40 |
|
koha-jenkins |
Project Koha_Master_U20 build #147: SUCCESS in 31 min: https://jenkins.koha-community[…]a_Master_U20/147/ |
15:42 |
|
|
khall joined #koha |
15:48 |
|
koha-jenkins |
Project Koha_Master_D10_MDB_Latest build #636: SUCCESS in 40 min: https://jenkins.koha-community[…]0_MDB_Latest/636/ |
15:54 |
|
koha-jenkins |
Project Koha_Master_D10_My8 build #612: SUCCESS in 46 min: https://jenkins.koha-community[…]ster_D10_My8/612/ |
15:59 |
|
koha-jenkins |
Project Koha_Master_D11 build #342: SUCCESS in 53 min: https://jenkins.koha-community[…]a_Master_D11/342/ |
16:03 |
|
koha-jenkins |
Project Koha_Master_U_Stable build #213: SUCCESS in 56 min: https://jenkins.koha-community[…]ter_U_Stable/213/ |
16:10 |
|
koha-jenkins |
Project Koha_Master build #1712: SUCCESS in 1 hr 1 min: https://jenkins.koha-community[…]Koha_Master/1712/ |
16:11 |
|
koha-jenkins |
Project Koha_Master_D10_CPAN build #380: SUCCESS in 30 min: https://jenkins.koha-community[…]ter_D10_CPAN/380/ |
16:29 |
|
koha-jenkins |
Project Koha_Master_D9 build #1707: SUCCESS in 41 min: https://jenkins.koha-community[…]a_Master_D9/1707/ |
16:51 |
|
|
cait1 left #koha |
16:56 |
|
|
cait joined #koha |
17:03 |
|
koha-jenkins |
Project Koha_Master_D9 build #1708: SUCCESS in 33 min: https://jenkins.koha-community[…]a_Master_D9/1708/ |
20:25 |
|
|
khall joined #koha |
20:46 |
|
|
paul_p joined #koha |
23:57 |
|
|
khall joined #koha |