IRC log for #koha, 2020-12-04

All times shown according to UTC.

Time S Nick Message
00:12 inlibro joined #koha
01:12 inlibro joined #koha
02:01 cait joined #koha
02:12 inlibro joined #koha
02:54 cait1 joined #koha
03:04 koha-jenkins Project Koha_Master_D10-Full build #16: ABORTED in 1 min 12 sec: https://jenkins.koha-community[…]ster_D10-Full/16/
03:12 inlibro joined #koha
03:59 koha-jenkins Project Koha_Master_D10-Full-i386 build #1: UNSTABLE in 53 min: https://jenkins.koha-community[…]_D10-Full-i386/1/
04:06 koha-jenkins Project Koha_Master_D10-Full-armhf build #1: FAILURE in 3 min 10 sec: https://jenkins.koha-community[…]D10-Full-armhf/1/
04:12 inlibro joined #koha
05:12 inlibro joined #koha
05:22 dcook Another day another bug..
06:13 inlibro joined #koha
06:13 paxed i just love how overdue_notices log, even with DEBUG on, just logs the sql, and all kinds of other crap, but doesn't actually log what borrowers it handles.
07:13 inlibro joined #koha
07:17 reiveune joined #koha
07:18 reiveune hello
07:21 paul_p_ joined #koha
07:26 alex_a joined #koha
07:41 fridolin joined #koha
07:42 did joined #koha
07:44 fridolin hi
07:51 magnuse \o/
07:59 lds joined #koha
08:13 inlibro joined #koha
08:16 ashimema mornin' #koha
08:17 cait1 morning #koha!
08:20 khall joined #koha
08:39 magnuse kia ora ashimema and cait1
08:40 magnuse sweet as
08:41 cait1 heh
08:47 davidnind joined #koha
09:02 khall_ joined #koha
09:10 khall joined #koha
09:13 inlibro joined #koha
09:24 khall_ joined #koha
09:47 khall joined #koha
09:52 alex_a_ joined #koha
09:57 cait joined #koha
09:58 khall_ joined #koha
10:04 khall joined #koha
10:10 cait1 joined #koha
10:13 inlibro joined #koha
10:31 davidnind left #koha
10:44 tcohen morning
11:00 alexbuckley joined #koha
11:10 khall joined #koha
11:13 inlibro joined #koha
11:50 tuxayo hi #koha :)
11:50 Oak joined #koha
11:56 TimothyAlexis joined #koha
11:57 Oak joined #koha
11:58 TimothyAlexis Using this
11:59 TimothyAlexis my $accountlines = Koha::Account::Lines->search({ amountoutstanding => { '>' => 0 }, status => 'RETURNED', date => { '<' => ?????})
11:59 TimothyAlexis What could I use to calculate the date?
12:03 cait1 what kidn of date are you loking for?
12:03 TimothyAlexis Does it want a string?
12:05 Oak joined #koha
12:06 TimothyAlexis Something compared to DateTime->now->subtract(days => 10)->strftime(something-something);
12:07 TimothyAlexis But I suppose this one is proper? Koha::DateUtils qw( dt_from_string );
12:07 Joubu you need to use datetime_parser, search for '$dtf'
12:07 Joubu Koha/Patrons.pm:    my $dtf = Koha::Database->new->schema​->storage->datetime_parser;
12:07 Joubu Koha/Patrons.pm:        {   returndate                  => { '<'   =>  $dtf->format_datetime($older_than_date), },
12:08 TimothyAlexis Thank you Joubu
12:08 TimothyAlexis Joubu++
12:13 TimothyAlexis I'm not sure I need to use a string.
12:14 inlibro joined #koha
12:14 TimothyAlexis the date should be something like today - 10 days
12:15 Oak joined #koha
12:23 tcohen doesn't DBIC translate DateTime objects correctly?
12:23 tcohen without calling the parser explicitly?
12:27 TimothyAlexis I want $accountlines to contain the records compared to this raw sql:
12:28 TimothyAlexis SELECT * FROM accountlines WHERE date < date_sub(curdate(), INTERVAL 10 DAY) AND status = 'RETURNED' AND amountoutstanding > 0;
12:34 chris_n joined #koha
12:34 ashimema you could use raw sql
12:35 ashimema string ref if memory serves
12:36 TimothyAlexis Joonas Kylmälä requested that "Instead of doing RAW SQL use Koha Koha::Account::Line objects and ->delete"
12:36 ashimema sorry
12:36 ashimema I meant.. raw via objects
12:36 ashimema just digging out an example
12:37 TimothyAlexis Looking at this example:  {   returndate                  => { '<'   =>  $dtf->format_datetime($older_than_date)} $older_than_date is a string, correct? So it's parsing that and using a DateTime object as a parameter, right?
12:38 ashimema `date => { '<' => \"NOW()" }` for example
12:39 ashimema or `date => { '<' => \["date_sub(now(), INTERVAL ? DAY)", "10" ]}`
12:40 ashimema so the first example there, a string ref, tells dbic to use the NOW() as raw sql in your where statement...
12:41 ashimema the second example, an array ref, tells dbic you're passing in raw sql + bind params.
12:41 ashimema so the `"10"` there could happily be `$days`
12:41 ashimema hope that helps
12:42 TimothyAlexis It does.
12:42 ashimema or.. as you've done above.. you could calculate the date using DateTime in perl.. then pass that into format_datetime to get a properly formatted string..
12:42 ashimema nice to have options ;)
12:43 ashimema https://metacpan.org/pod/SQL::[…]parison-operators
12:43 ashimema for further reading if you need it ;)
12:44 ashimema my general advice is.. don't lean on literals too much.. but there are certainly cases where they make allot of sense.. (in my humble opinion.. this is probably one of them 😉 )
13:01 TimothyAlexis I would have prefered to just use the Event Scheduler in the database. It would have required 5 minutes of work instead of 2 weeks.
13:02 TimothyAlexis 🤣
13:03 khall joined #koha
13:05 ashimema now i'm intrigued to know what you're developing
13:05 TimothyAlexis bug 27080
13:05 huginn Bug http://bugs.koha-community.org[…]_bug.cgi?id=27080 enhancement, P5 - low, ---, timothy_alexis.vass, ASSIGNED , Add --statute-barred-fees option to cleanup_database.pl to purge all fees where the item has been returned and the fee is older than the given number of days.
13:05 ashimema aha, i see
13:08 pastebot "TimothyAlexis" at 127.0.0.1 pasted "I would have done something like this" (6 lines) at http://paste.koha-community.org/26388
13:09 ashimema sounds like a nice idea for a plugin
13:09 ashimema something to manage mysql events ;)
13:12 pastebot "TimothyAlexis" at 127.0.0.1 pasted "Would this be correct?" (7 lines) at http://paste.koha-community.org/26389
13:14 inlibro joined #koha
13:28 ashimema looks reasonable to me
13:28 ashimema I can't remember.. if there's a non-commit and verbose modes to the script you may want to split it..
13:29 ashimema instead of chaining delete immediately..
13:29 ashimema set the search as a variable
13:30 ashimema then call `$results->delete if $confirm;` and `print "Will delete " . $results->count if $verbose`
13:30 ashimema something along those lines
13:30 Dyrcona joined #koha
13:45 TimothyAlexis ashimema++
13:50 marie-luce joined #koha
13:55 ashimema tuxayo around?
14:01 pastebot "TimothyAlexis" at 127.0.0.1 pasted "What is the problem with implementing something compared to this, which is also in cleanup_database.pl? Why even involve all that complexity in the first place?" (18 lines) at http://paste.koha-community.org/26390
14:05 lukeG joined #koha
14:09 lukeG1 joined #koha
14:14 inlibro joined #koha
14:25 caroline anyone around know how to use this? https://translate.koha-community.org/tools/
14:26 caroline I put in my email address and got a response email, but https://koha-community.org/man[…]20.05/zh_TW/html/ doesn't seem to have changed
14:26 caroline compared to https://translate.koha-communi[…]W/html/index.html
14:34 caroline Did i somehow break Pootle? https://translate.koha-community.org/
14:37 Joubu I've just restarted apache, it fixed the error
14:37 Joubu you should email Bernardo about the export tool
14:39 caroline he's the one who sent it to me hehe!
14:39 caroline thanks for restarting! :)
14:40 Joubu caroline: then tell him it does not seem to work :)
14:41 caroline it's not the tool that took down apache was it?
14:41 Joubu I don't know
14:41 huginn News from kohagit: Bug 27144: Fix syntax error that prevents deleting patrons <https://git.koha-community.org[…]769ed923999d3991f>
14:41 huginn News from kohagit: Bug 26665: (bug 20168 follow-up) Fix path to bootstrap js file <https://git.koha-community.org[…]1e3c08fc5eb35c770>
14:41 huginn News from kohagit: Bug 27003: Item creation log must be done after the item is created <https://git.koha-community.org[…]08a2846a6fd933f3c>
14:41 huginn News from kohagit: Bug 27128: (bug 25728 follow-up) Don't prefill av's code <https://git.koha-community.org[…]a452a1ccb614deaef>
14:41 huginn News from kohagit: Bug 26976: Display 0 if renewalsallowed is not defined <https://git.koha-community.org[…]e4f782542c744bbee>
14:41 huginn News from kohagit: Bug 27030: Add missing perldoc for Processing hold status to C4::Reserves <https://git.koha-community.org[…]582c8dc384afb93e7>
14:41 huginn News from kohagit: Bug 26336: Add hint before and remove select after staging with no items <https://git.koha-community.org[…]77ffa5bdbb4cb8ca1>
14:41 huginn News from kohagit: Bug 26336: Disable 'Item processing' dropdown if no item <https://git.koha-community.org[…]f41a79df3cf697b01>
14:41 huginn News from kohagit: Bug 12430: Add unit tests for C4::Search::buildQuery <https://git.koha-community.org[…]2bdc413c9d00c6ca7>
14:41 huginn News from kohagit: Bug 16067: Remove FastMmap <https://git.koha-community.org[…]b84742daa5b97ec50>
14:41 huginn News from kohagit: Bug 12430: Use releance ranking without QueryWeightFields <https://git.koha-community.org[…]5663cb264b5c376b7>
14:57 TimothyAlexis How do I manually obsolete an attachment in a bug report?
14:58 TimothyAlexis I can go to details > edit details and then check it as obsolete, but then what? :/
14:58 Joubu then submit
15:01 TimothyAlexis OK, so... after having worked with this bug 27080 I want to refactor/reindent/clean up the entire code in cleanup_database.pl so that it's consistent.
15:01 huginn Bug http://bugs.koha-community.org[…]_bug.cgi?id=27080 enhancement, P5 - low, ---, timothy_alexis.vass, Needs Signoff , Add --statute-barred-fees option to cleanup_database.pl to purge all fees where the item has been returned and the fee is older than the given number of days.
15:01 TimothyAlexis How many bug reports do you want me to create for that?
15:02 Joubu what do you want to do exactly?
15:02 Joubu To me the most important thing is to improve the output for the dry-run mode
15:03 TimothyAlexis I want to make the sub usage { text pretty.
15:04 TimothyAlexis I want to replace all the C4 stuff
15:05 TimothyAlexis After this comment: https://bugs.koha-community.or[…]g.cgi?id=27080#c3
15:05 huginn Bug 27080: enhancement, P5 - low, ---, timothy_alexis.vass, Needs Signoff , Add --statute-barred-fees option to cleanup_database.pl to purge all fees where the item has been returned and the fee is older than the given number of days.
15:07 Joubu the usage sub must be moved to the POD, and pod2usage used instead
15:08 Joubu you won't mange (easily) to remove all the C4 stuffs from this script
15:08 Joubu the usage move requires its own bug
15:09 Joubu DELETE FROM message_queue => Can be moved to Koha easily if you create the Koha::Objects modules
15:10 Joubu DELETE FROM action_logs => very easy, the Koha modules exist already
15:11 Joubu TimothyAlexis: Are you aware of filter_by_last_update?
15:11 TimothyAlexis OK so the purpose of what I want to do is to prevent suffering for the next Human being who needs to look at this code.
15:11 Joubu you should have used it in 27080 I think
15:12 Joubu man, you are lucky, I cleaned it (a bit) last cycle :D
15:12 TimothyAlexis *bows in gratitude*
15:14 TimothyAlexis What is filter_by_last_update ?
15:14 Joubu Koha/Objects.pm
15:14 Joubu 266 sub filter_by_last_update {
15:14 inlibro joined #koha
15:15 Joubu it's the method used by all the Koha::Objects from cleanup_database.pl to select the rows you want to remove given their "age"
15:18 TimothyAlexis How could I have used it?
15:19 TimothyAlexis If you want to improve the patch, please go ahead, I need to leave the office.
15:32 koha-jenkins Project Koha_Master_D9 build #1514: UNSTABLE in 48 min: https://jenkins.koha-community[…]a_Master_D9/1514/
15:35 koha-jenkins Project Koha_Master_D10 build #430: UNSTABLE in 50 min: https://jenkins.koha-community[…]a_Master_D10/430/
15:38 koha-jenkins Project Koha_Master_D11 build #168: UNSTABLE in 52 min: https://jenkins.koha-community[…]a_Master_D11/168/
15:49 fridolin left #koha
16:08 alex_a_ joined #koha
16:10 alex_a joined #koha
16:14 lisettelatah joined #koha
16:14 inlibro joined #koha
16:15 reiveune bye
16:16 reiveune left #koha
16:19 koha-jenkins Project Koha_20.11_U20 build #5: SUCCESS in 46 min: https://jenkins.koha-community[…]Koha_20.11_U20/5/
16:21 koha-jenkins Project Koha_20.11_U2010 build #6: FAILURE in 10 min: https://jenkins.koha-community[…]ha_20.11_U2010/6/
16:22 koha-jenkins Project Koha_20.11_D9 build #7: FAILURE in 3 min 7 sec: https://jenkins.koha-community[…]/Koha_20.11_D9/7/
16:26 koha-jenkins Project Koha_Master_U2010 build #61: UNSTABLE in 50 min: https://jenkins.koha-community[…]_Master_U2010/61/
16:28 koha-jenkins Project Koha_20.11_U18 build #6: SUCCESS in 1 hr 5 min: https://jenkins.koha-community[…]Koha_20.11_U18/6/
16:31 koha-jenkins Project Koha_20.11_D10 build #21: SUCCESS in 52 min: https://jenkins.koha-community[…]oha_20.11_D10/21/
16:31 koha-jenkins Project Koha_20.11_D11 build #11: FAILURE in 10 min: https://jenkins.koha-community[…]oha_20.11_D11/11/
16:32 koha-jenkins Project Koha_20.11_U16 build #4: FAILURE in 10 min: https://jenkins.koha-community[…]Koha_20.11_U16/4/
16:41 koha-jenkins Project Koha_20.11_D9 build #8: STILL FAILING in 10 min: https://jenkins.koha-community[…]/Koha_20.11_D9/8/
16:43 koha-jenkins Project Koha_20.11_D11 build #12: STILL FAILING in 12 min: https://jenkins.koha-community[…]oha_20.11_D11/12/
16:50 tuxayo Does anyone know how in a unit test just ensure that no errors happened? I get "No tests run for subtest"
16:51 tuxayo Ok, I could just do something like
16:51 tuxayo is(blessed($club_hold), 'Koha::Club::Hold', 'add returns a Koha::Club::Hold');
16:51 koha-jenkins Project Koha_20.11_D11 build #13: STILL FAILING in 10 min: https://jenkins.koha-community[…]oha_20.11_D11/13/
16:53 cait1 left #koha
17:01 cait joined #koha
17:01 koha-jenkins Project Koha_20.11_D9 build #9: STILL FAILING in 10 min: https://jenkins.koha-community[…]/Koha_20.11_D9/9/
17:03 khall joined #koha
17:11 koha-jenkins Project Koha_20.11_D9 build #10: STILL FAILING in 10 min: https://jenkins.koha-community[…]Koha_20.11_D9/10/
17:14 koha-jenkins Project Koha_20.11_U20 build #6: SUCCESS in 48 min: https://jenkins.koha-community[…]Koha_20.11_U20/6/
17:14 inlibro joined #koha
17:21 koha-jenkins Project Koha_20.11_D9 build #11: STILL FAILING in 10 min: https://jenkins.koha-community[…]Koha_20.11_D9/11/
17:27 koha-jenkins Yippee, build fixed!
17:27 wahanui Congratulations!
17:27 koha-jenkins Project Koha_20.11_U16 build #5: FIXED in 54 min: https://jenkins.koha-community[…]Koha_20.11_U16/5/
17:34 koha-jenkins Yippee, build fixed!
17:34 wahanui Congratulations!
17:34 koha-jenkins Project Koha_20.11_U2010 build #7: FIXED in 1 hr 6 min: https://jenkins.koha-community[…]ha_20.11_U2010/7/
17:40 koha-jenkins Project Koha_20.11_U16 build #6: SUCCESS in 57 min: https://jenkins.koha-community[…]Koha_20.11_U16/6/
17:54 amoyano left #koha
18:07 ivan_dz joined #koha
18:14 koha-jenkins Yippee, build fixed!
18:14 wahanui Congratulations!
18:15 koha-jenkins Project Koha_20.11_D9 build #12: FIXED in 53 min: https://jenkins.koha-community[…]Koha_20.11_D9/12/
18:15 inlibro joined #koha
18:19 tcohen tuxayo can you elaborate a bit more?
18:26 pastebot "tuxayo" at 127.0.0.1 pasted "tchoen here is my test, "add when holds policy = 0"" (118 lines) at http://paste.koha-community.org/26393
18:26 tuxayo tcohen: hi :)
18:26 tuxayo Just checking that Koha::Club::Hold::add() worked.
18:27 tuxayo It shouldn't in the end but I'm triggering a bug that I introduced
18:27 tcohen it should return the Koha::Club::Hold object, right?
18:27 tuxayo tcohen: IIUC the other test then yes. That's why I copied it for now.
18:28 tuxayo When I'll have fixed my bug, I'll likely have test for an excepted exception but I don't know it yet.
18:29 tuxayo Because hold policy = 0 should cause it to fail.
18:30 tcohen somehow unrelated, but I recently had a situation in which I needed to test some method was called under some circumstances inside a method
18:30 tcohen *not called*
18:31 tcohen writing a full test for that was complicated because it envolved EnqueueLetter and all that stuff
18:32 tcohen I solved it by setting a global variable to 0, mocking EnqueueLetter to set the variable to 1, and testing variable == 0, after calling the method
18:32 koha-jenkins Project Koha_20.11_U2010 build #8: SUCCESS in 58 min: https://jenkins.koha-community[…]ha_20.11_U2010/8/
18:32 tuxayo tricky!
18:32 tcohen I mention it because I was too close to get into a rabbit hole
18:32 tuxayo (jenkins approves)
18:32 tcohen for something that didn't deserve it
18:45 Oak joined #koha
19:15 inlibro joined #koha
19:28 alexbuckley joined #koha
20:00 khall joined #koha
20:15 inlibro joined #koha
20:25 khall joined #koha
20:53 alexbuckley joined #koha
21:15 inlibro joined #koha
21:41 tuxayo Hi :)
21:41 tuxayo About creating an atomicupdate, what should one do with the last line? «NewVersion( $DBversion, XXXXX, "Description");»
21:41 tuxayo https://wiki.koha-community.or[…]atomicupdate_file
21:41 tuxayo Should the version be filled before running locally or should I comment it?
22:15 inlibro joined #koha
23:16 inlibro joined #koha

| Channels | #koha index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary