IRC log for #koha, 2007-04-01

← Previous day | Today | Next day → | Search | Index

All times shown according to UTC.

Time Nick Message
13:24 owen Anybody awake this morning/afternoon/evening/ungodly hour of the night?
14:13 pecisk :)
14:14 newest one always wins
14:52 kados morning all
14:56 owen Hi kados
14:56 kados howdy
14:57 owen kados, do you know if it's possible to tell from anywhere in Koha how many times an item has been renewed?
14:57 kados owen: I looked into that yesterday a bit
14:58 owen: it's kinda tricky
14:58 especially if they've had the same book checked out before
14:59 owen We really should re-think how we're storing issues data if we can't get something as simple as a renew count
15:00 kados agreed
15:00 owen Koha must /have/ the data, because it can restrict whether an item can be renewed again!
15:00 kados if you look in opac-user.pl
15:00 it calls 'renewstatus'
15:01 i added $renewsleft
15:01 just need to get it working :-)
15:02 so what you can find is:
15:02 the item in the issues table, checked out by a specific patron, that's not been returned yet
15:03 and you can also tell how many times they've renewed
15:03 because if there is more than one entry for the same item, they've renewed it
15:03 owen: so do you want 'how many renews left' or 'how many times renewed'?
15:04 owen I'm not sure why, I think the former for the OPAC and the latter for the intranet. Does that sound crazy?
15:05 kados nope
15:20 owen: issues actually stores the renewal count
15:20 owen: so it's trivial to get that out
15:21 but for some reason, lastreneweddate isn't getting set
15:21 :(
15:23 owen: new variable passed to opac-user.pl: renewalcount
15:24 owen: it'll be null if there haven't been renewals on that item
15:25 owen: want me to add it to the template, or you wanna?
15:31 owen Are you working with just the issues loop or is it available to the overdues one as well?
15:33 kados it's now called 'renewcount' to be consistant
15:33 and it's in both loops
15:42 owen Doesn't seem to be coming through
15:43 kados hmmm
15:43 owen <!-- TMPL_VAR NAME="renewalcount" --> ?
15:44 kados ahh, yea, see above
15:44 i changed the name :-)
15:44 renewcount
15:44 sorry :-)
15:44 koha never calls them 'renewals' ... just 'renew' so I figured better be consistent
15:44 owen No, I tried it both ways
15:45 kados works for me
15:45 ie, on my account I see (1)
15:46 for those I've renewed
15:46 owen I see
15:47 So that's the count of how many times it's been renewed?
15:47 kados yea
15:47 did I missunderstand the requirements? :-)
15:48 owen We should probably expose both variables to the templates just to be safe, but I thought we should have the 'renewals left' count on the opac
15:48 kados ahh, sorry
15:50 owen: so should it also take into account reserves?
15:50 ie, shouldn't it tell you 'this is on reserve, you can't renew it'?
15:51 owen Right now the "status" variable tells the template whether an item can be renewed, right?
15:52 It'd be nice to have one variable that means "Renewals possible? Yes or no." and then a couple of variable to explain why
15:52 kados status tells you if they are possible
15:52 owen So, <!--tmpl_if name="on-reserve" -->Item is on reserve
15:53 <!--tmpl_if name="renewalspossible"--> Too many renewals
15:53 ...where renewals possible is 0 and evaluates as false? Don't know if it would work that way.
15:55 kados guess not, not translatable easily
15:55 hmmm
15:57 how about the following variables in the OPAC template: 'status' (flag), 'onreserve', 'renewsleft' 'renewcount'
15:57 owen Sounds good
15:58 kados renewsleft is gonna have the count, but won't take into account the reserve status
15:58 so in your template, you'll want logic like:
15:58 if (can renew) {
15:58 renewsleft  renewcount
15:59 } else {
15:59 if (onreserve) {
15:59 "item is on reserve"
15:59 } else {
15:59 too many renewals
15:59 }
15:59 make sense?
15:59 owen Yup
16:11 kados status, renewcount and onreserve done
16:14 owen: do you want 'renewsleft' or 'renewsallowed'?
16:14 ie, do you want koha to do the math for you?
16:15 owen How about both? So we can say "1 of 2 renewals left"
16:15 kados hehe
16:15 ok
16:22 owen kados, did you just take down our server?
16:23 kados yea, for about 5 seconds, sorry :/
16:25 well, 'status' (flag), 'onreserve', 'renewsleft' 'renewcount' are all there now
16:25 so have fun with the templates
16:25 :-)
16:26 brb
16:31 owen kados: renewsallowed is coming through, but not renewcount or renewsleft
16:36 kados if it's 0 it'll come through as null
16:37 owen But renewcount and renewsleft can't /both/ be null
16:37 kados right
16:37 mind if I check the template?
16:37 owen Of course not
16:38 I'm outputting those values in a comment in the ISSUES loop right after the renew link
16:38 kados k
16:40 ok, I see the problem
16:40 it's on my side
16:40 I was only filling renewsleft if renewsallowed was greater than renewcount
16:41 should be fixed now
16:41 hmmm
16:41 nope :-)
16:51 ahh
16:51 typo in opac-user.pl
16:51 owen: working, and even understands 0 :-)
16:51 knowing_diff_between_0_and_null++ :-)
16:56 owen: sent you an email :-)
16:56 hehe
17:01 owen Not sure I've got the best wording, but I'll have to look at it again after lunch
17:27 kados owen-away: when you return, let me know, I've got somthing to show you
18:01 owen kados: I'm back
18:18 kados owen: hey
18:46 owen kados: what are the chances we could get similar changes to the intranet side of things in terms of renewal counts, etc.?
18:48 I'm not sure how we'd fit it all in, but I know librarians would love to be able to see renew counts on issues.pl. Or at least have the display reflect whether an item could be renewed or not.
19:02 kados owen: brb
20:51 chris statistics table
20:51 has all that info
21:00 kados hey chris
21:00 it's also available for currently issued items in the issues table
21:08 chris yep

← Previous day | Today | Next day → | Search | Index

koha1