From dcook at prosentient.com.au Mon Mar 1 00:23:25 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Mon, 1 Mar 2021 10:23:25 +1100 Subject: [Koha-devel] Bug 15565 - Place multiple holds at once for the same record in OPAC Message-ID: <01aa01d70e28$b6c1bdb0$24453910$@prosentient.com.au> Hi all, I was wondering if someone could QA or test (then I'll QA) this bug. It's really handy end-user functionality so it would be great to get it into Koha. Cheers, David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus at libriotech.no Tue Mar 2 13:22:21 2021 From: magnus at libriotech.no (Magnus Enger) Date: Tue, 2 Mar 2021 13:22:21 +0100 Subject: [Koha-devel] XSLT to display keywords with 650$2 = x Message-ID: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> Kia ora! I want to display most keywords as usual, but with an exception for those from the 650 field. Specifically, I want to display only those keywords that has the value "x" or "y" in subfield $2, and hide the other 650-keywords. Any hints on how to this in XSLT would be infinitely appreciated, and added to the wiki, so others can benefit from the solution. Here is an example:       A     x         B     y         C     z         D   I want to display A and B (because they have $2 = x or y), and D (because it is not 650), but not C (because it is 650 and $2 is neither x nor y). Best regards, Magnus Libriotech From a.roussos at dataly.gr Tue Mar 2 15:17:30 2021 From: a.roussos at dataly.gr (Andreas Roussos) Date: Tue, 2 Mar 2021 16:17:30 +0200 Subject: [Koha-devel] XSLT to display keywords with 650$2 = x In-Reply-To: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> References: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> Message-ID: <42ff7555-d2d5-7bcf-6761-aa5ac8831134@dataly.gr> Hi Magnus, Give the following a try: Regards, Andreas P.S.: There's probably a much better way of doing this... ;-) On 2021-03-02 14:22, Magnus Enger wrote: > Kia ora! > > I want to display most keywords as usual, but with an exception for > those from the 650 field. Specifically, I want to display only those > keywords that has the value "x" or "y" in subfield $2, and hide the > other 650-keywords. Any hints on how to this in XSLT would be infinitely > appreciated, and added to the wiki, so others can benefit from the > solution. > > Here is an example: > >   >     A >     x >   >   >     B >     y >   >   >     C >     z >   >   >     D >   > > I want to display A and B (because they have $2 = x or y), and D > (because it is not 650), but not C (because it is 650 and $2 is neither > x nor y). > > Best regards, > Magnus > Libriotech > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ From joonas.kylmala at helsinki.fi Tue Mar 2 15:33:36 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Tue, 2 Mar 2021 16:33:36 +0200 Subject: [Koha-devel] Rolling DB upgrades Message-ID: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> Hi, I opened a bug report for introducing rolling DB upgrade support for Koha. I would like to hear if you have anything to object to that or should we just go ahead and develop that? :) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27832 -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From magnus at libriotech.no Tue Mar 2 15:47:50 2021 From: magnus at libriotech.no (Magnus Enger) Date: Tue, 2 Mar 2021 15:47:50 +0100 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> Message-ID: <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> Den 02.03.2021 15:33, skrev Joonas Kylmälä: > Hi, > > I opened a bug report for introducing rolling DB upgrade support for > Koha. I would like to hear if you have anything to object to that or > should we just go ahead and develop that? :) I must confess I am not 100% certain what you mean by rolling updates here. Could you give some more details? Best regards, Magnus Libriotech From joonas.kylmala at helsinki.fi Tue Mar 2 16:00:03 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Tue, 2 Mar 2021 17:00:03 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> Message-ID: Hi, for example if we rename a DB column in Koha now we need to stop all the koha web server instances (or they stop responding because because koha checks that db revision is correct), do DB upgrade, start all Koha web server instances. With rolling upgrade we would first create another column with the same name and write & read data to both columns during the 1st step of upgrade, then in 2nd step when all web server nodes are using latest version we could upgrade again to newer version and just delete the old column and start using new one. Ahaha, there is probably better explanation online if you search "rolling database schema upgrade" but hopefully the above clarfied my intention. Joonas On 02/03/2021 16:47, Magnus Enger wrote: > Den 02.03.2021 15:33, skrev Joonas Kylmälä: >> Hi, >> >> I opened a bug report for introducing rolling DB upgrade support for >> Koha. I would like to hear if you have anything to object to that or >> should we just go ahead and develop that? :) > > I must confess I am not 100% certain what you mean by rolling updates > here. Could you give some more details? > > Best regards, > Magnus > Libriotech > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From joonas.kylmala at helsinki.fi Tue Mar 2 16:01:18 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Tue, 2 Mar 2021 17:01:18 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> Message-ID: <56be4605-ad4f-4f93-91ca-02c99a5f9dc3@helsinki.fi> Correction: "create another column with the same name" -> create another column with the *new* name" On 02/03/2021 17:00, Joonas Kylmälä wrote: > Hi, > > for example if we rename a DB column in Koha now we need to stop all the > koha web server instances (or they stop responding because because koha > checks that db revision is correct), do DB upgrade, start all Koha web > server instances. With rolling upgrade we would first create another > column with the same name and write & read data to both columns during > the 1st step of upgrade, then in 2nd step when all web server nodes are > using latest version we could upgrade again to newer version and just > delete the old column and start using new one. > > Ahaha, there is probably better explanation online if you search > "rolling database schema upgrade" but hopefully the above clarfied my > intention. > > Joonas > > On 02/03/2021 16:47, Magnus Enger wrote: >> Den 02.03.2021 15:33, skrev Joonas Kylmälä: >>> Hi, >>> >>> I opened a bug report for introducing rolling DB upgrade support for >>> Koha. I would like to hear if you have anything to object to that or >>> should we just go ahead and develop that? :) >> >> I must confess I am not 100% certain what you mean by rolling updates >> here. Could you give some more details? >> >> Best regards, >> Magnus >> Libriotech >> >> _______________________________________________ >> Koha-devel mailing list >> Koha-devel at lists.koha-community.org >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> website : https://www.koha-community.org/ >> git : https://git.koha-community.org/ >> bugs : https://bugs.koha-community.org/ > -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From fridolin.somers at biblibre.com Tue Mar 2 16:30:40 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Tue, 2 Mar 2021 16:30:40 +0100 Subject: [Koha-devel] XSLT to display keywords with 650$2 = x In-Reply-To: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> References: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> Message-ID: <76505969-e74e-9107-82c5-9388a31a2c7f@biblibre.com> try this : Le 02/03/2021 à 13:22, Magnus Enger a écrit : > Kia ora! > > I want to display most keywords as usual, but with an exception for > those from the 650 field. Specifically, I want to display only those > keywords that has the value "x" or "y" in subfield $2, and hide the > other 650-keywords. Any hints on how to this in XSLT would be infinitely > appreciated, and added to the wiki, so others can benefit from the > solution. > > Here is an example: > >   >     A >     x >   >   >     B >     y >   >   >     C >     z >   >   >     D >   > > I want to display A and B (because they have $2 = x or y), and D > (because it is not 650), but not C (because it is 650 and $2 is neither > x nor y). > > Best regards, > Magnus > Libriotech > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From julian.maurice at biblibre.com Tue Mar 2 16:56:02 2021 From: julian.maurice at biblibre.com (Julian Maurice) Date: Tue, 2 Mar 2021 16:56:02 +0100 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> Message-ID: <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> Le 02/03/2021 à 16:00, Joonas Kylmälä a écrit : > With rolling upgrade we would first create another > column with the new name and write & read data to both columns during > the 1st step of upgrade, then in 2nd step when all web server nodes are > using latest version we could upgrade again to newer version and just > delete the old column and start using new one. Does it mean that the application (Perl) code should be aware of that intermediary state where both columns exist at the same time ? If so, for how long should it be aware of that old database state ? Does it mean that, for every database schema update, you have to do something like this: - git reset --hard commit_for_1st_step - updatedatabase (add new column) && reload starman - git reset --hard commit_for_2nd_step - updatedatabase (remove old column) && reload starman ? Do you know another open source software that allows rolling upgrade ? It seems like a great idea, but from what I just read online it looks really hard to do it correctly. -- Julian Maurice BibLibre From katrin.fischer.83 at web.de Tue Mar 2 23:17:45 2021 From: katrin.fischer.83 at web.de (Katrin Fischer) Date: Tue, 2 Mar 2021 23:17:45 +0100 Subject: [Koha-devel] XSLT to display keywords with 650$2 = x In-Reply-To: <76505969-e74e-9107-82c5-9388a31a2c7f@biblibre.com> References: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> <76505969-e74e-9107-82c5-9388a31a2c7f@biblibre.com> Message-ID: <4055aa96-a8af-7af3-5b45-cbf013bcdb81@web.de> Hi Magnus, a slightly different approach I use when I need to filter on $2, below an example for 084. It has an advantage if you need to add separators between the fields as the for-each only has the nodes matching your criteria: MSC: q=nlc,phr: msc | Hope that makes sense, Katrin On 02.03.21 16:30, Fridolin SOMERS wrote: > try this : > > >   >     >   > > > Le 02/03/2021 à 13:22, Magnus Enger a écrit : >> Kia ora! >> >> I want to display most keywords as usual, but with an exception for >> those from the 650 field. Specifically, I want to display only those >> keywords that has the value "x" or "y" in subfield $2, and hide the >> other 650-keywords. Any hints on how to this in XSLT would be >> infinitely appreciated, and added to the wiki, so others can benefit >> from the solution. >> >> Here is an example: >> >>    >>      A >>      x >>    >>    >>      B >>      y >>    >>    >>      C >>      z >>    >>    >>      D >>    >> >> I want to display A and B (because they have $2 = x or y), and D >> (because it is not 650), but not C (because it is 650 and $2 is >> neither x nor y). >> >> Best regards, >> Magnus >> Libriotech >> _______________________________________________ >> Koha-devel mailing list >> Koha-devel at lists.koha-community.org >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> website : https://www.koha-community.org/ >> git : https://git.koha-community.org/ >> bugs : https://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcook at prosentient.com.au Tue Mar 2 23:47:00 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Wed, 3 Mar 2021 09:47:00 +1100 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> Message-ID: <040501d70fb5$f5174880$df45d980$@prosentient.com.au> I am also skeptical. It seems to me that we would have to train every developer on how to write their Perl code and database changes to work with this conceptual model. That being said, I am intrigued. I hate downtime as much as the next person. But how do you propose that the Koha community (and not just your organisation) would make this work? At the moment, the Koha community releases new versions once every month. Some libraries pick those upgrades up automatically, some have sysadmins initiate upgrades, etc. I think we have to assume that no human intervention is a requirement for Koha. So I'm not sure how a 2-step upgrade would work for libraries without sysadmins who were specifically knowledgeable about Koha. Happy to hear more though. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel On Behalf Of Julian Maurice Sent: Wednesday, 3 March 2021 2:56 AM To: koha-devel at lists.koha-community.org Subject: Re: [Koha-devel] Rolling DB upgrades Le 02/03/2021 à 16:00, Joonas Kylmälä a écrit : > With rolling upgrade we would first create another column with the new > name and write & read data to both columns during the 1st step of > upgrade, then in 2nd step when all web server nodes are using latest > version we could upgrade again to newer version and just delete the > old column and start using new one. Does it mean that the application (Perl) code should be aware of that intermediary state where both columns exist at the same time ? If so, for how long should it be aware of that old database state ? Does it mean that, for every database schema update, you have to do something like this: - git reset --hard commit_for_1st_step - updatedatabase (add new column) && reload starman - git reset --hard commit_for_2nd_step - updatedatabase (remove old column) && reload starman ? Do you know another open source software that allows rolling upgrade ? It seems like a great idea, but from what I just read online it looks really hard to do it correctly. -- Julian Maurice BibLibre _______________________________________________ Koha-devel mailing list Koha-devel at lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/ From joonas.kylmala at helsinki.fi Wed Mar 3 08:38:17 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Wed, 3 Mar 2021 09:38:17 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <040501d70fb5$f5174880$df45d980$@prosentient.com.au> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> <040501d70fb5$f5174880$df45d980$@prosentient.com.au> Message-ID: <978e3465-a6e3-a138-74b6-098d71f501ce@helsinki.fi> Hi, On 03/03/2021 00:47, dcook at prosentient.com.au wrote: > It seems to me that we would have to train every developer on how to write their Perl code and database changes to work with this conceptual model. Yeah, that's correct if there is DB changes. > That being said, I am intrigued. I hate downtime as much as the next person. Downtime, removal of odd maintenance hours and shorter feedback loop are the main benefits I see here. > But how do you propose that the Koha community (and not just your organisation) would make this work? At the moment, the Koha community releases new versions once every month. Some libraries pick those upgrades up automatically, some have sysadmins initiate upgrades, etc. I think we have to assume that no human intervention is a requirement for Koha. So I'm not sure how a 2-step upgrade would work for libraries without sysadmins who were specifically knowledgeable about Koha. For such installations, non-distributed ones, there would be no change. You could just upgrade the debian package and it would do all the upgrade steps. If you have Koha web server on multiple different servers then you have to do similar coordination as you have had to do already with Koha but just with different commands. Joonas -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From joonas.kylmala at helsinki.fi Wed Mar 3 08:44:03 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Wed, 3 Mar 2021 09:44:03 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <978e3465-a6e3-a138-74b6-098d71f501ce@helsinki.fi> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> <040501d70fb5$f5174880$df45d980$@prosentient.com.au> <978e3465-a6e3-a138-74b6-098d71f501ce@helsinki.fi> Message-ID: On 03/03/2021 09:38, Joonas Kylmälä wrote: > Downtime, removal of odd maintenance hours and shorter feedback loop are > the main benefits I see here. ahah, one more thing I was thinking: I hate to spend time on doing releases so I wanted to automate so far as just pushing to production git branch and there it goes on it's way through unit tests and to the prod :) Joonas -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From joonas.kylmala at helsinki.fi Wed Mar 3 09:44:57 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Wed, 3 Mar 2021 10:44:57 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> Message-ID: Hi On 02/03/2021 17:56, Julian Maurice wrote: > Does it mean that the application (Perl) code should be aware of that > intermediary state where both columns exist at the same time ? If so, > for how long should it be aware of that old database state ? Yup. And answer to the second question: as long as the DB migration takes, sometimes just a few seconds, sometimes hours (we had e.g. some character encoding change in biblio metadata table if I'm not mistaken and it took a loong time). > Does it mean that, for every database schema update, you have to do > something like this: > - git reset --hard commit_for_1st_step > - updatedatabase (add new column) && reload starman > - git reset --hard commit_for_2nd_step > - updatedatabase (remove old column) && reload starman > ? If you just do the reload starman before updatedatabase then yeah, I think this represents the idea :) I found more verbose explanation from here: http://alexandre-masselot.blogspot.com/2012/08/continuous-deployment-in-perl-code-folks.html > > Do you know another open source software that allows rolling upgrade ? > It seems like a great idea, but from what I just read online it looks > really hard to do it correctly. I don't know any other software but not sure it is that difficult. What I gather, we could use e.g. Jenkins to push the code / new debian package that would be created for every commit. Jenkins would make sure db schema migration is finished before installing a newer version and the steps would be repeated until we are at the latest release. And I want to add to to the other email I sent earlier, to clarify the non-distributed setup for David: the one node setup would probably be best to be done in the current fashion, shutdown koha, run all db migrations, start koha. It seems hacky and useless to try do downtimeless migration with that given you also don't care the service being down during HW maintanance, etc. Joonas -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From fridolin.somers at biblibre.com Wed Mar 3 09:51:27 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Wed, 3 Mar 2021 09:51:27 +0100 Subject: [Koha-devel] XSLT to display keywords with 650$2 = x In-Reply-To: <4055aa96-a8af-7af3-5b45-cbf013bcdb81@web.de> References: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> <76505969-e74e-9107-82c5-9388a31a2c7f@biblibre.com> <4055aa96-a8af-7af3-5b45-cbf013bcdb81@web.de> Message-ID: Oh indeed, using parent node with ".." is a great idea for this case :) Le 02/03/2021 à 23:17, Katrin Fischer a écrit : > Hi Magnus, > > a slightly different approach I use when I need to filter on $2, below > an example for 084. It has an advantage if you need to add separators > between the fields as the for-each only has the nodes matching your > criteria: > > > > MSC: > select="marc:datafield[@tag=084]/marc:subfield[@code='2'][.='msc']"> > > select="$SearchUrl"/>q=nlc,phr: select="str:encode-uri(../marc:subfield[@code='a'], true())"/> > msc > > > test="position()=last()"> class="separator"> | > > > > > Hope that makes sense, > > Katrin > > > On 02.03.21 16:30, Fridolin SOMERS wrote: >> try this : >> >> >>   >>     >>   >> >> >> Le 02/03/2021 à 13:22, Magnus Enger a écrit : >>> Kia ora! >>> >>> I want to display most keywords as usual, but with an exception for >>> those from the 650 field. Specifically, I want to display only those >>> keywords that has the value "x" or "y" in subfield $2, and hide the >>> other 650-keywords. Any hints on how to this in XSLT would be >>> infinitely appreciated, and added to the wiki, so others can benefit >>> from the solution. >>> >>> Here is an example: >>> >>>    >>>      A >>>      x >>>    >>>    >>>      B >>>      y >>>    >>>    >>>      C >>>      z >>>    >>>    >>>      D >>>    >>> >>> I want to display A and B (because they have $2 = x or y), and D >>> (because it is not 650), but not C (because it is 650 and $2 is >>> neither x nor y). >>> >>> Best regards, >>> Magnus >>> Libriotech >>> _______________________________________________ >>> Koha-devel mailing list >>> Koha-devel at lists.koha-community.org >>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >>> website : https://www.koha-community.org/ >>> git : https://git.koha-community.org/ >>> bugs : https://bugs.koha-community.org/ >> > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From julian.maurice at biblibre.com Wed Mar 3 10:39:07 2021 From: julian.maurice at biblibre.com (Julian Maurice) Date: Wed, 3 Mar 2021 10:39:07 +0100 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> Message-ID: <7f988583-36d2-3ca6-e500-7d2492ff35a2@biblibre.com> Le 03/03/2021 à 09:44, Joonas Kylmälä a écrit : > I don't know any other software but not sure it is that difficult. What > I gather, we could use e.g. Jenkins to push the code / new debian > package that would be created for every commit. Jenkins would make sure > db schema migration is finished before installing a newer version and > the steps would be repeated until we are at the latest release. I'm not too much concerned about the "push-test-release" process, but more about how we consistently make the code aware of the multiple possible database states. Surely we'd have to enforce a new set of rules for writing database updates. And we'd have to test these changes very carefully, since a tiny mistake could mean a loss of data. Of course you have backups, but DB rollback means downtime, right ? So, that sounds like a lot of extra work for avoiding a few seconds of downtime (most of the time). That being said, I'm really interested in seeing an actual working implementation :) Also, what about template translations ? It takes some time to generate translated templates, and it can do weird things if the new code is used while using the old templates (or the old code with the new templates). Wouldn't that prevent zero-downtime upgrade ? -- Julian Maurice BibLibre From joonas.kylmala at helsinki.fi Wed Mar 3 11:18:06 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Wed, 3 Mar 2021 12:18:06 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: <7f988583-36d2-3ca6-e500-7d2492ff35a2@biblibre.com> References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> <7f988583-36d2-3ca6-e500-7d2492ff35a2@biblibre.com> Message-ID: Hi, On 03/03/2021 11:39, Julian Maurice wrote: > I'm not too much concerned about the "push-test-release" process, but > more about how we consistently make the code aware of the multiple > possible database states. Surely we'd have to enforce a new set of rules > for writing database updates. And we'd have to test these changes very > carefully, since a tiny mistake could mean a loss of data. Of course you > have backups, but DB rollback means downtime, right ? Depends on the rollback I guess, some things you could probably revert without downtime. The possibility of loss of data due to programming error happens now as well and is no different. > So, that sounds like a lot of extra work for avoiding a few seconds of > downtime (most of the time). Not really sure it is more work than writing the current db upgrade procedures, maybe tiny bit, and a bit more if you want to be able to revert the DB upgrade as well (which is optional and I don't think we should even consider that for MVP implementation of this). > Also, what about template translations ? It takes some time to generate > translated templates, and it can do weird things if the new code is used > while using the old templates (or the old code with the new templates). > Wouldn't that prevent zero-downtime upgrade ? You redirect the traffic during upgrade to other nodes that are in working state and after the node being upgraded is ready to receive traffic you then can re-enable the traffic redirection there. Joonas -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From julian.maurice at biblibre.com Wed Mar 3 11:25:43 2021 From: julian.maurice at biblibre.com (Julian Maurice) Date: Wed, 3 Mar 2021 11:25:43 +0100 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> <7f988583-36d2-3ca6-e500-7d2492ff35a2@biblibre.com> Message-ID: Le 03/03/2021 à 11:18, Joonas Kylmälä a écrit : > Not really sure it is more work than writing the current db upgrade > procedures, maybe tiny bit, and a bit more if you want to be able to > revert the DB upgrade as well (which is optional and I don't think we > should even consider that for MVP implementation of this). You at least need to modify the code so that it handles the intermediary state, don't you ? In the case of a column/table rename, you need to make sure both columns/tables stay in sync until the whole upgrade process is finished. -- Julian Maurice BibLibre From joonas.kylmala at helsinki.fi Wed Mar 3 11:26:37 2021 From: joonas.kylmala at helsinki.fi (=?UTF-8?Q?Joonas_Kylm=c3=a4l=c3=a4?=) Date: Wed, 3 Mar 2021 12:26:37 +0200 Subject: [Koha-devel] Rolling DB upgrades In-Reply-To: References: <70723739-d660-8c4a-9006-45dce839c1ae@helsinki.fi> <54638e08-e763-853b-0e53-1dd9f919d4de@libriotech.no> <38a7cce2-fc87-619e-6074-1a90577a026e@biblibre.com> <7f988583-36d2-3ca6-e500-7d2492ff35a2@biblibre.com> Message-ID: <1d18a686-8bbf-5fe7-4ee1-3dcd7a43ead9@helsinki.fi> On 03/03/2021 12:25, Julian Maurice wrote: > Le 03/03/2021 à 11:18, Joonas Kylmälä a écrit : >> Not really sure it is more work than writing the current db upgrade >> procedures, maybe tiny bit, and a bit more if you want to be able to >> revert the DB upgrade as well (which is optional and I don't think we >> should even consider that for MVP implementation of this). > > You at least need to modify the code so that it handles the intermediary > state, don't you ? > In the case of a column/table rename, you need to make sure both > columns/tables stay in sync until the whole upgrade process is finished. You are right, that's the extra stuff needed. -- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto From magnus at libriotech.no Wed Mar 3 12:29:34 2021 From: magnus at libriotech.no (Magnus Enger) Date: Wed, 3 Mar 2021 12:29:34 +0100 Subject: [Koha-devel] XSLT to display keywords with 650$2 = x In-Reply-To: <4055aa96-a8af-7af3-5b45-cbf013bcdb81@web.de> References: <8e5daa90-680c-bedd-f4ac-69abd6aa15f1@libriotech.no> <76505969-e74e-9107-82c5-9388a31a2c7f@biblibre.com> <4055aa96-a8af-7af3-5b45-cbf013bcdb81@web.de> Message-ID: <920f849f-a63c-6184-4b4d-d5472add1b24@libriotech.no> Den 02.03.2021 23:17, skrev Katrin Fischer: > Hi Magnus, > > a slightly different approach I use when I need to filter on $2, below > an example for 084. It has an advantage if you need to add separators > between the fields as the for-each only has the nodes matching your > criteria: Thanks for your input everyone! I am using the approach provided by Katrin, and I'll add it to the wiki when everyone is happy with it. Best regards, Magnus Libriotech From martin.renvoize at ptfs-europe.com Thu Mar 4 19:00:36 2021 From: martin.renvoize at ptfs-europe.com (Renvoize, Martin) Date: Thu, 4 Mar 2021 18:00:36 +0000 Subject: [Koha-devel] Sandboxes now support translations Message-ID: Hi All, I spent a few minutes adding a new feature to the ptfs-e sandboxes today - http://sandboxes.ptfs-europe.co.uk/ You can now install a limited number of translations onto your test sandbox. Once you have a sandbox set up, you can now pick 'Install translation' from the "Actions" menu in the sandbox manager and pick to install French, German or Spanish (I tried to pick the three most popular, but let me know if you want another option added). Once you submit the form, it'll take a moment to return the output of the commands that run... you can then enable the translation via the koha system preferences inside your sandbox as usual. Hope that helps, *Martin Renvoize, MPhys (Hons)* Head of Development and Community Engagement *Phone:* +44 (0) 1483 378728 *Mobile:* +44 (0) 7725 985 636 *Email:* martin.renvoize at ptfs-europe.com www.ptfs-europe.com *Sign up for our newsletters here or by scanning the QR code* Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30 The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at info at ptfs-europe.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrin.fischer.83 at web.de Thu Mar 4 19:12:51 2021 From: katrin.fischer.83 at web.de (Katrin Fischer) Date: Thu, 4 Mar 2021 19:12:51 +0100 Subject: [Koha-devel] Sandboxes now support translations In-Reply-To: References: Message-ID: <67c781cc-68c4-c258-4647-bb97ee6f0c83@web.de> Thx, Martin! On 04.03.21 19:00, Renvoize, Martin wrote: > Hi All, > > I spent a few minutes adding a new feature to the ptfs-e sandboxes > today - http://sandboxes.ptfs-europe.co.uk/ > > > You can now install a limited number of translations onto your test > sandbox. Once you have a sandbox set up, you can now pick 'Install > translation' from the "Actions" menu in the sandbox manager and pick > to install French, German or Spanish (I tried to pick the three most > popular, but let me know if you want another option added).  Once you > submit the form, it'll take a moment to return the output of the > commands that run... you can then enable the translation via the koha > system preferences inside your sandbox as usual. > > Hope that helps, > > *Martin Renvoize, MPhys (Hons)* > > > > > > Head of Development and Community Engagement > > *Phone:* +44 (0) 1483 378728 > > > > *Mobile:* +44 (0) 7725 985 636 > > *Email:* martin.renvoize at ptfs-europe.com > > > > > www.ptfs-europe.com > > *Sign up for our newsletters here  or by > scanning the QR code* > > Registered in the United Kingdom No. 06416372   VAT Reg No. 925 7211 30 > > > The information contained in this email message may be privileged, > confidential and protected from disclosure. If you are not the > intended recipient, any dissemination, distribution or copying is > strictly prohibited. If you think that you have received this email > message in error, please email the sender at info at ptfs-europe.com > > > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From severine.queune at bulac.fr Fri Mar 5 08:13:17 2021 From: severine.queune at bulac.fr (=?UTF-8?Q?S=C3=A9verine_Queune?=) Date: Fri, 5 Mar 2021 08:13:17 +0100 Subject: [Koha-devel] Sandboxes now support translations In-Reply-To: <67c781cc-68c4-c258-4647-bb97ee6f0c83@web.de> References: <67c781cc-68c4-c258-4647-bb97ee6f0c83@web.de> Message-ID: Great feature ! Thanks Martin :) Le jeu. 4 mars 2021 à 19:12, Katrin Fischer a écrit : > Thx, Martin! > On 04.03.21 19:00, Renvoize, Martin wrote: > > Hi All, > > I spent a few minutes adding a new feature to the ptfs-e sandboxes today - > http://sandboxes.ptfs-europe.co.uk/ > > You can now install a limited number of translations onto your test > sandbox. Once you have a sandbox set up, you can now pick 'Install > translation' from the "Actions" menu in the sandbox manager and pick to > install French, German or Spanish (I tried to pick the three most popular, > but let me know if you want another option added). Once you submit the > form, it'll take a moment to return the output of the commands that run... > you can then enable the translation via the koha system preferences inside > your sandbox as usual. > > Hope that helps, > > *Martin Renvoize, MPhys (Hons)* > > > > Head of Development and Community Engagement > > > > *Phone:* +44 (0) 1483 378728 > > *Mobile:* +44 (0) 7725 985 636 > > *Email:* martin.renvoize at ptfs-europe.com > > www.ptfs-europe.com > > > *Sign up for our newsletters here or by > scanning the QR code* > > > > Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30 > > The information contained in this email message may be privileged, > confidential and protected from disclosure. If you are not the intended > recipient, any dissemination, distribution or copying is strictly > prohibited. If you think that you have received this email message in > error, please email the sender at info at ptfs-europe.com > > _______________________________________________ > Koha-devel mailing listKoha-devel at lists.koha-community.orghttps://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -- *Séverine QUEUNE* Administrateur fonctionnel du SIGB Équipe signalement et exposition des données Pôle Flux et données [image: Logo BULAC] Bibliothèque universitaire des langues et civilisations 65 rue des Grands Moulins F-75013 PARIS T +33 1 81 69 *18 55* www.bulac.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.blouin at inlibro.com Fri Mar 5 14:11:00 2021 From: philippe.blouin at inlibro.com (Philippe Blouin) Date: Fri, 5 Mar 2021 08:11:00 -0500 Subject: [Koha-devel] What am I missing about ErrorLog directive ? Message-ID: <0f0fdd4e-05e1-1351-6298-9993beed7cc0@inlibro.com> Hello everyone, I got a problem on (at least some of) my installation of 20.05 on Debian10 with the _non-plack_ logging. Plack logs into WHEREVER/var/log/plack-opac-error.log, as specified into log4perl. But non-plack logs into /var/log/apache2/error.log.  Not into WHEREVER/var/log/opac-error.log as specified in the VirtualHost's ErrorLog (or log4perl). I know I'm missing something fundamental, but my brain is fried and I really can't figure where's the override. Anyone can educate me? Big thanks, -- Philippe Blouin, Directeur de la technologie Tél.  : (833) 465-4276, poste 230 philippe.blouin at inLibro.com inLibro | pour esprit libre | www.inLibro.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fridolin.somers at biblibre.com Mon Mar 8 09:10:35 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Mon, 8 Mar 2021 09:10:35 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() Message-ID: Hi, While testing new hook : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 I faced a problem : How can I modify the current patron object ? Since we are in the store() method of that object and inside a transation. I tried to call $self->SUPER::store(); but does not work. Should we implement this possiblity or document hooks to say it is impossible. Thanks a lot for your help :D Best regards, -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From tomascohen at gmail.com Mon Mar 8 11:17:20 2021 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Mon, 8 Mar 2021 07:17:20 -0300 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: Message-ID: Maybe you need some other hook. Ones that allows you to make changes to the object right before it is stored instead of this one, that gets the 'just updated' object. When I added 'after' hooks for biblios and items actions, the idea was that they should act as triggers for other actions: in my case, fill a zebraqueue-ish table my plugin uses. El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS (< fridolin.somers at biblibre.com>) escribió: > Hi, > > While testing new hook : > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > I faced a problem : > How can I modify the current patron object ? > Since we are in the store() method of that object and inside a transation. > I tried to call $self->SUPER::store(); but does not work. > > Should we implement this possiblity or document hooks to say it is > impossible. > > Thanks a lot for your help :D > > Best regards, > > -- > Fridolin SOMERS > Software and system maintainer 🦄 > BibLibre, France > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.druart at bugs.koha-community.org Mon Mar 8 11:49:25 2021 From: jonathan.druart at bugs.koha-community.org (Jonathan Druart) Date: Mon, 8 Mar 2021 11:49:25 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: Message-ID: I wouldn't add other hooks, they are "_after_item_action_hooks" for creation and modification. "After item creation" should allow you to modify the item, unless we need a "pre store" hook. I had a look at the code and I didn't find any problems. Fridolin, what did you try exactly, can you share the code? Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi a écrit : > Maybe you need some other hook. Ones that allows you to make changes to > the object right before it is stored instead of this one, that gets the > 'just updated' object. > When I added 'after' hooks for biblios and items actions, the idea was > that they should act as triggers for other actions: in my case, fill a > zebraqueue-ish table my plugin uses. > > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS (< > fridolin.somers at biblibre.com>) escribió: > >> Hi, >> >> While testing new hook : >> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 >> >> I faced a problem : >> How can I modify the current patron object ? >> Since we are in the store() method of that object and inside a transation. >> I tried to call $self->SUPER::store(); but does not work. >> >> Should we implement this possiblity or document hooks to say it is >> impossible. >> >> Thanks a lot for your help :D >> >> Best regards, >> >> -- >> Fridolin SOMERS >> Software and system maintainer 🦄 >> BibLibre, France >> _______________________________________________ >> Koha-devel mailing list >> Koha-devel at lists.koha-community.org >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> website : https://www.koha-community.org/ >> git : https://git.koha-community.org/ >> bugs : https://bugs.koha-community.org/ >> > > > -- > Tomás Cohen Arazi > Theke Solutions (http://theke.io) > ✆ +54 9351 3513384 > GPG: B2F3C15F > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fridolin.somers at biblibre.com Tue Mar 9 09:32:41 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Tue, 9 Mar 2021 09:32:41 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: Message-ID: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Yop I've tried with : sub after_item_action { my ( $self, $params ) = @_; warn "AFTER ITEM ACTION"; my $item = $params->{item}; $item->itemnotes("Edited at " . localtime); } Calling $item->SUPER::store() generates an error : Plugin error (Example Kitchen-Sink Plugin): Can't locate object method "store" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" at /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm line 580. Surely only Koha::Item can call SUPER. Adding $self->SUPER::store() at the end of Koha::Item->store() does also not work. Is it because of "get_from_storage" ? $self->get_from_storage->_after_item_action_hooks({ action => $action }); The _after_item_action_hooks method is called not on object $self but on a copy ? Best regards, Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > I wouldn't add other hooks, they are "_after_item_action_hooks" for > creation and modification. > "After item creation" should allow you to modify the item, unless we > need a "pre store" hook. > I had a look at the code and I didn't find any problems. > Fridolin, what did you try exactly, can you share the code? > > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > a écrit : > > Maybe you need some other hook. Ones that allows you to make changes > to the object right before it is stored instead of this one, that > gets the 'just updated' object. > When I added 'after' hooks for biblios and items actions, the idea > was that they should act as triggers for other actions: in my case, > fill a zebraqueue-ish table my plugin uses. > > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > ( >) escribió: > > Hi, > > While testing new hook : > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > I faced a problem : > How can I modify the current patron object ? > Since we are in the store() method of that object and inside a > transation. > I tried to call $self->SUPER::store(); but does not work. > > Should we implement this possiblity or document hooks to say it is > impossible. > > Thanks a lot for your help :D > > Best regards, > > -- > Fridolin SOMERS > > Software and system maintainer 🦄 > BibLibre, France > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > website : https://www.koha-community.org/ > > git : https://git.koha-community.org/ > > bugs : https://bugs.koha-community.org/ > > > > > -- > Tomás Cohen Arazi > Theke Solutions (http://theke.io ) > ✆ +54 9351 3513384 > GPG: B2F3C15F > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > website : https://www.koha-community.org/ > > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From martin.renvoize at ptfs-europe.com Wed Mar 10 07:54:02 2021 From: martin.renvoize at ptfs-europe.com (Renvoize, Martin) Date: Wed, 10 Mar 2021 06:54:02 +0000 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: Indeed, I can't see calling SUPER working here.. and I can see the issue with calling a bare 'store' as you'd end up causing a recursion.. I initially wondered about setting an internal flag in the object that you could look for in the second call to the hook, but as get pass a new copy of the object (get_from_storage) and not the object itself I can't see that working either... Hummm On Tue, 9 Mar 2021, 8:32 am Fridolin SOMERS, wrote: > Yop > > I've tried with : > > sub after_item_action { > my ( $self, $params ) = @_; > warn "AFTER ITEM ACTION"; > > my $item = $params->{item}; > $item->itemnotes("Edited at " . localtime); > } > > Calling $item->SUPER::store() generates an error : > > Plugin error (Example Kitchen-Sink Plugin): Can't locate object method > "store" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" > at > /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm > > line 580. > > Surely only Koha::Item can call SUPER. > > Adding $self->SUPER::store() at the end of Koha::Item->store() does also > not work. > > Is it because of "get_from_storage" ? > > $self->get_from_storage->_after_item_action_hooks({ action => $action }); > > The _after_item_action_hooks method is called not on object $self but on > a copy ? > > Best regards, > > Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > > I wouldn't add other hooks, they are "_after_item_action_hooks" for > > creation and modification. > > "After item creation" should allow you to modify the item, unless we > > need a "pre store" hook. > > I had a look at the code and I didn't find any problems. > > Fridolin, what did you try exactly, can you share the code? > > > > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > a écrit : > > > > Maybe you need some other hook. Ones that allows you to make changes > > to the object right before it is stored instead of this one, that > > gets the 'just updated' object. > > When I added 'after' hooks for biblios and items actions, the idea > > was that they should act as triggers for other actions: in my case, > > fill a zebraqueue-ish table my plugin uses. > > > > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > > ( > >) escribió: > > > > Hi, > > > > While testing new hook : > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > > > > > I faced a problem : > > How can I modify the current patron object ? > > Since we are in the store() method of that object and inside a > > transation. > > I tried to call $self->SUPER::store(); but does not work. > > > > Should we implement this possiblity or document hooks to say it > is > > impossible. > > > > Thanks a lot for your help :D > > > > Best regards, > > > > -- > > Fridolin SOMERS > > > > Software and system maintainer 🦄 > > BibLibre, France > > _______________________________________________ > > Koha-devel mailing list > > Koha-devel at lists.koha-community.org > > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > website : https://www.koha-community.org/ > > > > git : https://git.koha-community.org/ > > > > bugs : https://bugs.koha-community.org/ > > > > > > > > > > -- > > Tomás Cohen Arazi > > Theke Solutions (http://theke.io ) > > ✆ +54 9351 3513384 > > GPG: B2F3C15F > > _______________________________________________ > > Koha-devel mailing list > > Koha-devel at lists.koha-community.org > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > website : https://www.koha-community.org/ > > > > git : https://git.koha-community.org/ < > https://git.koha-community.org/> > > bugs : https://bugs.koha-community.org/ > > > > > > -- > Fridolin SOMERS > Software and system maintainer 🦄 > BibLibre, France > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.renvoize at ptfs-europe.com Wed Mar 10 09:18:31 2021 From: martin.renvoize at ptfs-europe.com (Renvoize, Martin) Date: Wed, 10 Mar 2021 08:18:31 +0000 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: I've read the code a bit more now... You could probably use ->_result to reach inside the object and call a store without triggering the Koha::Objects store to circumnavigate the issues here... but.. should you.. I've commented on the bug. On Wed, 10 Mar 2021 at 06:54, Renvoize, Martin < martin.renvoize at ptfs-europe.com> wrote: > Indeed, I can't see calling SUPER working here.. and I can see the issue > with calling a bare 'store' as you'd end up causing a recursion.. I > initially wondered about setting an internal flag in the object that you > could look for in the second call to the hook, but as get pass a new copy > of the object (get_from_storage) and not the object itself I can't see that > working either... Hummm > > On Tue, 9 Mar 2021, 8:32 am Fridolin SOMERS, > wrote: > >> Yop >> >> I've tried with : >> >> sub after_item_action { >> my ( $self, $params ) = @_; >> warn "AFTER ITEM ACTION"; >> >> my $item = $params->{item}; >> $item->itemnotes("Edited at " . localtime); >> } >> >> Calling $item->SUPER::store() generates an error : >> >> Plugin error (Example Kitchen-Sink Plugin): Can't locate object method >> "store" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" >> at >> /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm >> >> line 580. >> >> Surely only Koha::Item can call SUPER. >> >> Adding $self->SUPER::store() at the end of Koha::Item->store() does also >> not work. >> >> Is it because of "get_from_storage" ? >> >> $self->get_from_storage->_after_item_action_hooks({ action => $action }); >> >> The _after_item_action_hooks method is called not on object $self but on >> a copy ? >> >> Best regards, >> >> Le 08/03/2021 à 11:49, Jonathan Druart a écrit : >> > I wouldn't add other hooks, they are "_after_item_action_hooks" for >> > creation and modification. >> > "After item creation" should allow you to modify the item, unless we >> > need a "pre store" hook. >> > I had a look at the code and I didn't find any problems. >> > Fridolin, what did you try exactly, can you share the code? >> > >> > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > > a écrit : >> > >> > Maybe you need some other hook. Ones that allows you to make changes >> > to the object right before it is stored instead of this one, that >> > gets the 'just updated' object. >> > When I added 'after' hooks for biblios and items actions, the idea >> > was that they should act as triggers for other actions: in my case, >> > fill a zebraqueue-ish table my plugin uses. >> > >> > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS >> > (> > >) escribió: >> > >> > Hi, >> > >> > While testing new hook : >> > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 >> > < >> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066> >> > >> > I faced a problem : >> > How can I modify the current patron object ? >> > Since we are in the store() method of that object and inside a >> > transation. >> > I tried to call $self->SUPER::store(); but does not work. >> > >> > Should we implement this possiblity or document hooks to say it >> is >> > impossible. >> > >> > Thanks a lot for your help :D >> > >> > Best regards, >> > >> > -- >> > Fridolin SOMERS > > > >> > Software and system maintainer 🦄 >> > BibLibre, France >> > _______________________________________________ >> > Koha-devel mailing list >> > Koha-devel at lists.koha-community.org >> > >> > >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> > < >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> >> > website : https://www.koha-community.org/ >> > >> > git : https://git.koha-community.org/ >> > >> > bugs : https://bugs.koha-community.org/ >> > >> > >> > >> > >> > -- >> > Tomás Cohen Arazi >> > Theke Solutions (http://theke.io ) >> > ✆ +54 9351 3513384 >> > GPG: B2F3C15F >> > _______________________________________________ >> > Koha-devel mailing list >> > Koha-devel at lists.koha-community.org >> > >> > >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> > < >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> >> > website : https://www.koha-community.org/ >> > >> > git : https://git.koha-community.org/ < >> https://git.koha-community.org/> >> > bugs : https://bugs.koha-community.org/ >> > >> > >> >> -- >> Fridolin SOMERS >> Software and system maintainer 🦄 >> BibLibre, France >> _______________________________________________ >> Koha-devel mailing list >> Koha-devel at lists.koha-community.org >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> website : https://www.koha-community.org/ >> git : https://git.koha-community.org/ >> bugs : https://bugs.koha-community.org/ >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.druart at bugs.koha-community.org Wed Mar 10 09:22:07 2021 From: jonathan.druart at bugs.koha-community.org (Jonathan Druart) Date: Wed, 10 Mar 2021 09:22:07 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: >From perlobj pod: "The SUPER pseudo-class is resolved from the package where the call is made. It is *not* resolved based on the object's class." You can still call $item->_result->update. I suggest you open a bug report to add a no_trigger flag to Koha::Object->store (like we did in Koha::Objects). Also spotted, at the end of store: 193 my $result = $self->SUPER::store; 202 $self->get_from_storage->_after_item_action_hooks({ action => $action }); 203 204 return $result; That's wrong! Le mar. 9 mars 2021 à 09:32, Fridolin SOMERS a écrit : > Yop > > I've tried with : > > sub after_item_action { > my ( $self, $params ) = @_; > warn "AFTER ITEM ACTION"; > > my $item = $params->{item}; > $item->itemnotes("Edited at " . localtime); > } > > Calling $item->SUPER::store() generates an error : > > Plugin error (Example Kitchen-Sink Plugin): Can't locate object method > "store" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" > at > /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm > > line 580. > > Surely only Koha::Item can call SUPER. > > Adding $self->SUPER::store() at the end of Koha::Item->store() does also > not work. > > Is it because of "get_from_storage" ? > > $self->get_from_storage->_after_item_action_hooks({ action => $action }); > > The _after_item_action_hooks method is called not on object $self but on > a copy ? > > Best regards, > > Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > > I wouldn't add other hooks, they are "_after_item_action_hooks" for > > creation and modification. > > "After item creation" should allow you to modify the item, unless we > > need a "pre store" hook. > > I had a look at the code and I didn't find any problems. > > Fridolin, what did you try exactly, can you share the code? > > > > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > a écrit : > > > > Maybe you need some other hook. Ones that allows you to make changes > > to the object right before it is stored instead of this one, that > > gets the 'just updated' object. > > When I added 'after' hooks for biblios and items actions, the idea > > was that they should act as triggers for other actions: in my case, > > fill a zebraqueue-ish table my plugin uses. > > > > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > > ( > >) escribió: > > > > Hi, > > > > While testing new hook : > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > > > > > I faced a problem : > > How can I modify the current patron object ? > > Since we are in the store() method of that object and inside a > > transation. > > I tried to call $self->SUPER::store(); but does not work. > > > > Should we implement this possiblity or document hooks to say it > is > > impossible. > > > > Thanks a lot for your help :D > > > > Best regards, > > > > -- > > Fridolin SOMERS > > > > Software and system maintainer 🦄 > > BibLibre, France > > _______________________________________________ > > Koha-devel mailing list > > Koha-devel at lists.koha-community.org > > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > website : https://www.koha-community.org/ > > > > git : https://git.koha-community.org/ > > > > bugs : https://bugs.koha-community.org/ > > > > > > > > > > -- > > Tomás Cohen Arazi > > Theke Solutions (http://theke.io ) > > ✆ +54 9351 3513384 > > GPG: B2F3C15F > > _______________________________________________ > > Koha-devel mailing list > > Koha-devel at lists.koha-community.org > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > website : https://www.koha-community.org/ > > > > git : https://git.koha-community.org/ < > https://git.koha-community.org/> > > bugs : https://bugs.koha-community.org/ > > > > > > -- > Fridolin SOMERS > Software and system maintainer 🦄 > BibLibre, France > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.druart at bugs.koha-community.org Wed Mar 10 09:23:35 2021 From: jonathan.druart at bugs.koha-community.org (Jonathan Druart) Date: Wed, 10 Mar 2021 09:23:35 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: > I suggest you open a bug report to add a no_trigger flag to Koha::Object->store (like we did in Koha::Objects). And just realized it's what Martin suggested but wouldn't work. Le mer. 10 mars 2021 à 09:22, Jonathan Druart < jonathan.druart at bugs.koha-community.org> a écrit : > From perlobj pod: > "The SUPER pseudo-class is resolved from the package where the call is > made. It is *not* resolved based on the object's class." > > You can still call $item->_result->update. > > I suggest you open a bug report to add a no_trigger flag to > Koha::Object->store (like we did in Koha::Objects). > > Also spotted, at the end of store: > 193 my $result = $self->SUPER::store; > > 202 $self->get_from_storage->_after_item_action_hooks({ action => > $action }); > 203 > 204 return $result; > > That's wrong! > > Le mar. 9 mars 2021 à 09:32, Fridolin SOMERS > a écrit : > >> Yop >> >> I've tried with : >> >> sub after_item_action { >> my ( $self, $params ) = @_; >> warn "AFTER ITEM ACTION"; >> >> my $item = $params->{item}; >> $item->itemnotes("Edited at " . localtime); >> } >> >> Calling $item->SUPER::store() generates an error : >> >> Plugin error (Example Kitchen-Sink Plugin): Can't locate object method >> "store" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" >> at >> /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm >> >> line 580. >> >> Surely only Koha::Item can call SUPER. >> >> Adding $self->SUPER::store() at the end of Koha::Item->store() does also >> not work. >> >> Is it because of "get_from_storage" ? >> >> $self->get_from_storage->_after_item_action_hooks({ action => $action }); >> >> The _after_item_action_hooks method is called not on object $self but on >> a copy ? >> >> Best regards, >> >> Le 08/03/2021 à 11:49, Jonathan Druart a écrit : >> > I wouldn't add other hooks, they are "_after_item_action_hooks" for >> > creation and modification. >> > "After item creation" should allow you to modify the item, unless we >> > need a "pre store" hook. >> > I had a look at the code and I didn't find any problems. >> > Fridolin, what did you try exactly, can you share the code? >> > >> > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > > a écrit : >> > >> > Maybe you need some other hook. Ones that allows you to make changes >> > to the object right before it is stored instead of this one, that >> > gets the 'just updated' object. >> > When I added 'after' hooks for biblios and items actions, the idea >> > was that they should act as triggers for other actions: in my case, >> > fill a zebraqueue-ish table my plugin uses. >> > >> > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS >> > (> > >) escribió: >> > >> > Hi, >> > >> > While testing new hook : >> > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 >> > < >> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066> >> > >> > I faced a problem : >> > How can I modify the current patron object ? >> > Since we are in the store() method of that object and inside a >> > transation. >> > I tried to call $self->SUPER::store(); but does not work. >> > >> > Should we implement this possiblity or document hooks to say it >> is >> > impossible. >> > >> > Thanks a lot for your help :D >> > >> > Best regards, >> > >> > -- >> > Fridolin SOMERS > > > >> > Software and system maintainer 🦄 >> > BibLibre, France >> > _______________________________________________ >> > Koha-devel mailing list >> > Koha-devel at lists.koha-community.org >> > >> > >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> > < >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> >> > website : https://www.koha-community.org/ >> > >> > git : https://git.koha-community.org/ >> > >> > bugs : https://bugs.koha-community.org/ >> > >> > >> > >> > >> > -- >> > Tomás Cohen Arazi >> > Theke Solutions (http://theke.io ) >> > ✆ +54 9351 3513384 >> > GPG: B2F3C15F >> > _______________________________________________ >> > Koha-devel mailing list >> > Koha-devel at lists.koha-community.org >> > >> > >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel >> > < >> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> >> > website : https://www.koha-community.org/ >> > >> > git : https://git.koha-community.org/ < >> https://git.koha-community.org/> >> > bugs : https://bugs.koha-community.org/ >> > >> > >> >> -- >> Fridolin SOMERS >> Software and system maintainer 🦄 >> BibLibre, France >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fridolin.somers at biblibre.com Fri Mar 12 13:47:23 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Fri, 12 Mar 2021 13:47:23 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: Mmmm interesting. Why not send the $self object to plugin and call SUPER::store() after hook ? Best regards, Le 10/03/2021 à 09:22, Jonathan Druart a écrit : > From perlobj pod: > "The |SUPER| pseudo-class is resolved from the package where the call is > made. It is /not/ resolved based on the object's class." > > You can still call $item->_result->update. > > I suggest you open a bug report to add a no_trigger flag to > Koha::Object->store (like we did in Koha::Objects). > > Also spotted, at the end of store: >  193     my $result = $self->SUPER::store; > >  202     $self->get_from_storage->_after_item_action_hooks({ action => > $action }); >  203 >  204     return $result; > > That's wrong! > > Le mar. 9 mars 2021 à 09:32, Fridolin SOMERS > > a > écrit : > > Yop > > I've tried with : > > sub after_item_action { >      my ( $self, $params ) = @_; >      warn "AFTER ITEM ACTION"; > >      my $item = $params->{item}; >      $item->itemnotes("Edited at " . localtime); > } > > Calling $item->SUPER::store() generates an error : > > Plugin error (Example Kitchen-Sink Plugin): Can't locate object method > "store" via package "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" > at > /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm > > line 580. > > Surely only Koha::Item can call SUPER. > > Adding $self->SUPER::store() at the end of Koha::Item->store() does > also > not work. > > Is it because of "get_from_storage" ? > > $self->get_from_storage->_after_item_action_hooks({ action => > $action }); > > The _after_item_action_hooks method is called not on object $self > but on > a copy ? > > Best regards, > > Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > > I wouldn't add other hooks, they are "_after_item_action_hooks" for > > creation and modification. > > "After item creation" should allow you to modify the item, unless we > > need a "pre store" hook. > > I had a look at the code and I didn't find any problems. > > Fridolin, what did you try exactly, can you share the code? > > > > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > > >> a > écrit : > > > >     Maybe you need some other hook. Ones that allows you to make > changes > >     to the object right before it is stored instead of this one, that > >     gets the 'just updated' object. > >     When I added 'after' hooks for biblios and items actions, the > idea > >     was that they should act as triggers for other actions: in my > case, > >     fill a zebraqueue-ish table my plugin uses. > > > >     El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > >     ( > >      >>) escribió: > > > >         Hi, > > > >         While testing new hook : > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > >   > > > > >         I faced a problem : > >         How can I modify the current patron object ? > >         Since we are in the store() method of that object and > inside a > >         transation. > >         I tried to call $self->SUPER::store(); but does not work. > > > >         Should we implement this possiblity or document hooks to > say it is > >         impossible. > > > >         Thanks a lot for your help :D > > > >         Best regards, > > > >         -- > >         Fridolin SOMERS > >          >> > >         Software and system maintainer 🦄 > >         BibLibre, France > >         _______________________________________________ > >         Koha-devel mailing list > > Koha-devel at lists.koha-community.org > > >          > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > > >  > > >         website : https://www.koha-community.org/ > > >          > > >         git : https://git.koha-community.org/ > > >          > > >         bugs : https://bugs.koha-community.org/ > > >          > > > > > > > > >     -- > >     Tomás Cohen Arazi > >     Theke Solutions (http://theke.io > >) > >     ✆ +54 9351 3513384 > >     GPG: B2F3C15F > >     _______________________________________________ > >     Koha-devel mailing list > > Koha-devel at lists.koha-community.org > > >      > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > > >  > > >     website : https://www.koha-community.org/ > > >      > > >     git : https://git.koha-community.org/ > > > >     bugs : https://bugs.koha-community.org/ > > >      > > > > > -- > Fridolin SOMERS > > Software and system maintainer 🦄 > BibLibre, France > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From tomascohen at gmail.com Fri Mar 12 14:27:14 2021 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Fri, 12 Mar 2021 10:27:14 -0300 Subject: [Koha-devel] [Koha] (koha) BACKUP KOHA VIA TOOLS In-Reply-To: References: Message-ID: What was it? El vie, 12 mar 2021 a las 10:17, muiru james () escribió: > The backups issue was resolved. > > Thanks you > > On Wed, Mar 10, 2021 at 11:18 AM muiru james wrote: > > > Hello team, > > > > I have a system that has no backups to download at the export data, > > backups in the tools module. The config file is well edited to allow for > > the backups via tools. > > > > What could be the problem? > > > > Koha version is 19.05 > > Ubuntu 16.04 > > > > Please help > > > > Warm Regards > > James > > > > > _______________________________________________ > > Koha mailing list http://koha-community.org > Koha at lists.katipo.co.nz > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha > -- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.druart at bugs.koha-community.org Fri Mar 12 15:14:30 2021 From: jonathan.druart at bugs.koha-community.org (Jonathan Druart) Date: Fri, 12 Mar 2021 15:14:30 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: So to have a "post_creation" hook that would be actually called *before* the item is effectively created, hum... :) Le ven. 12 mars 2021 à 13:47, Fridolin SOMERS a écrit : > Mmmm interesting. > > Why not send the $self object to plugin > and call SUPER::store() after hook ? > > Best regards, > > > Le 10/03/2021 à 09:22, Jonathan Druart a écrit : > > From perlobj pod: > > "The |SUPER| pseudo-class is resolved from the package where the call is > > made. It is /not/ resolved based on the object's class." > > > > You can still call $item->_result->update. > > > > I suggest you open a bug report to add a no_trigger flag to > > Koha::Object->store (like we did in Koha::Objects). > > > > Also spotted, at the end of store: > > 193 my $result = $self->SUPER::store; > > > > 202 $self->get_from_storage->_after_item_action_hooks({ action => > > $action }); > > 203 > > 204 return $result; > > > > That's wrong! > > > > Le mar. 9 mars 2021 à 09:32, Fridolin SOMERS > > > a > > écrit : > > > > Yop > > > > I've tried with : > > > > sub after_item_action { > > my ( $self, $params ) = @_; > > warn "AFTER ITEM ACTION"; > > > > my $item = $params->{item}; > > $item->itemnotes("Edited at " . localtime); > > } > > > > Calling $item->SUPER::store() generates an error : > > > > Plugin error (Example Kitchen-Sink Plugin): Can't locate object > method > > "store" via package > "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" > > at > > > /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm > > > > line 580. > > > > Surely only Koha::Item can call SUPER. > > > > Adding $self->SUPER::store() at the end of Koha::Item->store() does > > also > > not work. > > > > Is it because of "get_from_storage" ? > > > > $self->get_from_storage->_after_item_action_hooks({ action => > > $action }); > > > > The _after_item_action_hooks method is called not on object $self > > but on > > a copy ? > > > > Best regards, > > > > Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > > > I wouldn't add other hooks, they are "_after_item_action_hooks" > for > > > creation and modification. > > > "After item creation" should allow you to modify the item, unless > we > > > need a "pre store" hook. > > > I had a look at the code and I didn't find any problems. > > > Fridolin, what did you try exactly, can you share the code? > > > > > > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > > > > >> a > > écrit : > > > > > > Maybe you need some other hook. Ones that allows you to make > > changes > > > to the object right before it is stored instead of this one, > that > > > gets the 'just updated' object. > > > When I added 'after' hooks for biblios and items actions, the > > idea > > > was that they should act as triggers for other actions: in my > > case, > > > fill a zebraqueue-ish table my plugin uses. > > > > > > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > > > ( > > > > > >>) escribió: > > > > > > Hi, > > > > > > While testing new hook : > > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > > > > > > > > > > > > > I faced a problem : > > > How can I modify the current patron object ? > > > Since we are in the store() method of that object and > > inside a > > > transation. > > > I tried to call $self->SUPER::store(); but does not work. > > > > > > Should we implement this possiblity or document hooks to > > say it is > > > impossible. > > > > > > Thanks a lot for your help :D > > > > > > Best regards, > > > > > > -- > > > Fridolin SOMERS > > > > > >> > > > Software and system maintainer 🦄 > > > BibLibre, France > > > _______________________________________________ > > > Koha-devel mailing list > > > Koha-devel at lists.koha-community.org > > > > > > > > > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > > > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>> > > > website : https://www.koha-community.org/ > > > > > > > > > > git : https://git.koha-community.org/ > > > > > > > > > > bugs : https://bugs.koha-community.org/ > > > > > > > > > > > > > > > > > > > -- > > > Tomás Cohen Arazi > > > Theke Solutions (http://theke.io > > >) > > > ✆ +54 9351 3513384 > > > GPG: B2F3C15F > > > _______________________________________________ > > > Koha-devel mailing list > > > Koha-devel at lists.koha-community.org > > > > > > > > > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > > > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>> > > > website : https://www.koha-community.org/ > > > > > > > > > > git : https://git.koha-community.org/ > > > > > > > bugs : https://bugs.koha-community.org/ > > > > > > > > > > > > > > -- > > Fridolin SOMERS > > > > Software and system maintainer 🦄 > > BibLibre, France > > > > -- > Fridolin SOMERS > Software and system maintainer 🦄 > BibLibre, France > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fridolin.somers at biblibre.com Fri Mar 12 16:34:42 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Fri, 12 Mar 2021 16:34:42 +0100 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> Message-ID: <939a4246-05b7-31a7-8f08-0c7ebf900a10@biblibre.com> Oh indeed, So maybe : 1) call SUPER::store() 2) call hook with $self 3) call SUPER::store() incase $seft has changed What do you think ? 2) must call $seft->discard_changes right ? Le 12/03/2021 à 15:14, Jonathan Druart a écrit : > So to have a "post_creation" hook that would be actually called *before* > the item is effectively created, hum... :) > > > Le ven. 12 mars 2021 à 13:47, Fridolin SOMERS > > a > écrit : > > Mmmm interesting. > > Why not send the $self object to plugin > and call SUPER::store() after hook ? > > Best regards, > > > Le 10/03/2021 à 09:22, Jonathan Druart a écrit : > >  From perlobj pod: > > "The |SUPER| pseudo-class is resolved from the package where the > call is > > made. It is /not/ resolved based on the object's class." > > > > You can still call $item->_result->update. > > > > I suggest you open a bug report to add a no_trigger flag to > > Koha::Object->store (like we did in Koha::Objects). > > > > Also spotted, at the end of store: > >   193     my $result = $self->SUPER::store; > > > >   202     $self->get_from_storage->_after_item_action_hooks({ > action => > > $action }); > >   203 > >   204     return $result; > > > > That's wrong! > > > > Le mar. 9 mars 2021 à 09:32, Fridolin SOMERS > > > >> a > > écrit : > > > >     Yop > > > >     I've tried with : > > > >     sub after_item_action { > >           my ( $self, $params ) = @_; > >           warn "AFTER ITEM ACTION"; > > > >           my $item = $params->{item}; > >           $item->itemnotes("Edited at " . localtime); > >     } > > > >     Calling $item->SUPER::store() generates an error : > > > >     Plugin error (Example Kitchen-Sink Plugin): Can't locate > object method > >     "store" via package > "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" > >     at > > >  /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm > > > >     line 580. > > > >     Surely only Koha::Item can call SUPER. > > > >     Adding $self->SUPER::store() at the end of > Koha::Item->store() does > >     also > >     not work. > > > >     Is it because of "get_from_storage" ? > > > >     $self->get_from_storage->_after_item_action_hooks({ action => > >     $action }); > > > >     The _after_item_action_hooks method is called not on object $self > >     but on > >     a copy ? > > > >     Best regards, > > > >     Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > >      > I wouldn't add other hooks, they are > "_after_item_action_hooks" for > >      > creation and modification. > >      > "After item creation" should allow you to modify the item, > unless we > >      > need a "pre store" hook. > >      > I had a look at the code and I didn't find any problems. > >      > Fridolin, what did you try exactly, can you share the code? > >      > > >      > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > >      > > > >      > > >>> a > >     écrit : > >      > > >      >     Maybe you need some other hook. Ones that allows you > to make > >     changes > >      >     to the object right before it is stored instead of > this one, that > >      >     gets the 'just updated' object. > >      >     When I added 'after' hooks for biblios and items > actions, the > >     idea > >      >     was that they should act as triggers for other > actions: in my > >     case, > >      >     fill a zebraqueue-ish table my plugin uses. > >      > > >      >     El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > >      >     ( > >      > > >      >      > >      >>>) escribió: > >      > > >      >         Hi, > >      > > >      >         While testing new hook : > >      > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > >   > > >      > > > >   > > >   >> > >      > > >      >         I faced a problem : > >      >         How can I modify the current patron object ? > >      >         Since we are in the store() method of that object and > >     inside a > >      >         transation. > >      >         I tried to call $self->SUPER::store(); but does > not work. > >      > > >      >         Should we implement this possiblity or document > hooks to > >     say it is > >      >         impossible. > >      > > >      >         Thanks a lot for your help :D > >      > > >      >         Best regards, > >      > > >      >         -- > >      >         Fridolin SOMERS > >      > > >      >          > >      >>> > >      >         Software and system maintainer 🦄 > >      >         BibLibre, France > >      >         _______________________________________________ > >      >         Koha-devel mailing list > >      > Koha-devel at lists.koha-community.org > > >      > > >      >          > >      >> > >      > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > > >  > > >      > > > >   >> > >      >         website : https://www.koha-community.org/ > > >      > > >      >          > >      >> > >      >         git : https://git.koha-community.org/ > > >      > > >      >          > >      >> > >      >         bugs : https://bugs.koha-community.org/ > > >      > > >      >          > >      >> > >      > > >      > > >      > > >      >     -- > >      >     Tomás Cohen Arazi > >      >     Theke Solutions (http://theke.io > > > >      >>) > >      >     ✆ +54 9351 3513384 > >      >     GPG: B2F3C15F > >      >     _______________________________________________ > >      >     Koha-devel mailing list > >      > Koha-devel at lists.koha-community.org > > >      > > >      >      > >      >> > >      > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > > >  > > >      > > > >   >> > >      >     website : https://www.koha-community.org/ > > >      > > >      >      > >      >> > >      >     git : https://git.koha-community.org/ > > >      > > >      >> > >      >     bugs : https://bugs.koha-community.org/ > > >      > > >      >      > >      >> > >      > > > > >     -- > >     Fridolin SOMERS > >      >> > >     Software and system maintainer 🦄 > >     BibLibre, France > > > > -- > Fridolin SOMERS > > Software and system maintainer 🦄 > BibLibre, France > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From tomascohen at gmail.com Fri Mar 12 18:00:59 2021 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Fri, 12 Mar 2021 14:00:59 -0300 Subject: [Koha-devel] Plugin hooks on datas and store() In-Reply-To: <939a4246-05b7-31a7-8f08-0c7ebf900a10@biblibre.com> References: <7ffb631a-b712-8812-1c8e-791828888dd5@biblibre.com> <939a4246-05b7-31a7-8f08-0c7ebf900a10@biblibre.com> Message-ID: What are you actually trying to accomplish? Do you really need the post-store object? El vie., 12 mar. 2021 12:34, Fridolin SOMERS escribió: > Oh indeed, > > So maybe : > 1) call SUPER::store() > 2) call hook with $self > 3) call SUPER::store() incase $seft has changed > > What do you think ? > > 2) must call $seft->discard_changes right ? > > Le 12/03/2021 à 15:14, Jonathan Druart a écrit : > > So to have a "post_creation" hook that would be actually called *before* > > the item is effectively created, hum... :) > > > > > > Le ven. 12 mars 2021 à 13:47, Fridolin SOMERS > > > a > > écrit : > > > > Mmmm interesting. > > > > Why not send the $self object to plugin > > and call SUPER::store() after hook ? > > > > Best regards, > > > > > > Le 10/03/2021 à 09:22, Jonathan Druart a écrit : > > > From perlobj pod: > > > "The |SUPER| pseudo-class is resolved from the package where the > > call is > > > made. It is /not/ resolved based on the object's class." > > > > > > You can still call $item->_result->update. > > > > > > I suggest you open a bug report to add a no_trigger flag to > > > Koha::Object->store (like we did in Koha::Objects). > > > > > > Also spotted, at the end of store: > > > 193 my $result = $self->SUPER::store; > > > > > > 202 $self->get_from_storage->_after_item_action_hooks({ > > action => > > > $action }); > > > 203 > > > 204 return $result; > > > > > > That's wrong! > > > > > > Le mar. 9 mars 2021 à 09:32, Fridolin SOMERS > > > > > > > >> a > > > écrit : > > > > > > Yop > > > > > > I've tried with : > > > > > > sub after_item_action { > > > my ( $self, $params ) = @_; > > > warn "AFTER ITEM ACTION"; > > > > > > my $item = $params->{item}; > > > $item->itemnotes("Edited at " . localtime); > > > } > > > > > > Calling $item->SUPER::store() generates an error : > > > > > > Plugin error (Example Kitchen-Sink Plugin): Can't locate > > object method > > > "store" via package > > "Koha::Plugin::Com::ByWaterSolutions::KitchenSink" > > > at > > > > > > /mnt/git/koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm > > > > > > line 580. > > > > > > Surely only Koha::Item can call SUPER. > > > > > > Adding $self->SUPER::store() at the end of > > Koha::Item->store() does > > > also > > > not work. > > > > > > Is it because of "get_from_storage" ? > > > > > > $self->get_from_storage->_after_item_action_hooks({ action => > > > $action }); > > > > > > The _after_item_action_hooks method is called not on object > $self > > > but on > > > a copy ? > > > > > > Best regards, > > > > > > Le 08/03/2021 à 11:49, Jonathan Druart a écrit : > > > > I wouldn't add other hooks, they are > > "_after_item_action_hooks" for > > > > creation and modification. > > > > "After item creation" should allow you to modify the item, > > unless we > > > > need a "pre store" hook. > > > > I had a look at the code and I didn't find any problems. > > > > Fridolin, what did you try exactly, can you share the code? > > > > > > > > Le lun. 8 mars 2021 à 11:17, Tomas Cohen Arazi > > > > > > > > > > > > >>> a > > > écrit : > > > > > > > > Maybe you need some other hook. Ones that allows you > > to make > > > changes > > > > to the object right before it is stored instead of > > this one, that > > > > gets the 'just updated' object. > > > > When I added 'after' hooks for biblios and items > > actions, the > > > idea > > > > was that they should act as triggers for other > > actions: in my > > > case, > > > > fill a zebraqueue-ish table my plugin uses. > > > > > > > > El lun, 8 mar 2021 a las 5:11, Fridolin SOMERS > > > > ( > > > > > > > > > > > > > > > >>>) escribió: > > > > > > > > Hi, > > > > > > > > While testing new hook : > > > > > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 > > > > > > > > > > > > > > > > > > > > > > > > > >> > > > > > > > > I faced a problem : > > > > How can I modify the current patron object ? > > > > Since we are in the store() method of that object > and > > > inside a > > > > transation. > > > > I tried to call $self->SUPER::store(); but does > > not work. > > > > > > > > Should we implement this possiblity or document > > hooks to > > > say it is > > > > impossible. > > > > > > > > Thanks a lot for your help :D > > > > > > > > Best regards, > > > > > > > > -- > > > > Fridolin SOMERS > > > > > > > > > > > > > > > >>> > > > > Software and system maintainer 🦄 > > > > BibLibre, France > > > > _______________________________________________ > > > > Koha-devel mailing list > > > > Koha-devel at lists.koha-community.org > > > > > > > > > > > > > > > > >> > > > > > > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > > > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>> > > > > > > > > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>>> > > > > website : https://www.koha-community.org/ > > > > > > > > > > > > > > > > >> > > > > git : https://git.koha-community.org/ > > > > > > > > > > > > > > > > >> > > > > bugs : https://bugs.koha-community.org/ > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > -- > > > > Tomás Cohen Arazi > > > > Theke Solutions (http://theke.io > > > > > > > >>) > > > > ✆ +54 9351 3513384 > > > > GPG: B2F3C15F > > > > _______________________________________________ > > > > Koha-devel mailing list > > > > Koha-devel at lists.koha-community.org > > > > > > > > > > > > > > > > >> > > > > > > > > > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> > > > > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>> > > > > > > > > > < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel < > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>>> > > > > website : https://www.koha-community.org/ > > > > > > > > > > > > > > > > >> > > > > git : https://git.koha-community.org/ > > > > > > > > > > > > >> > > > > bugs : https://bugs.koha-community.org/ > > > > > > > > > > > > > > > > >> > > > > > > > > > > -- > > > Fridolin SOMERS > > > > > >> > > > Software and system maintainer 🦄 > > > BibLibre, France > > > > > > > -- > > Fridolin SOMERS > > > > Software and system maintainer 🦄 > > BibLibre, France > > > > -- > Fridolin SOMERS > Software and system maintainer 🦄 > BibLibre, France > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kohanews at gmail.com Sat Mar 13 20:25:19 2021 From: kohanews at gmail.com (Koha Newsletter) Date: Sat, 13 Mar 2021 20:25:19 +0100 Subject: [Koha-devel] Call for news - Newsletter March 2021 Message-ID: I'm collecting news for this month's newsletter. Send anything noteworthy to: kohanews (at) gmail (dot) com News criteria: -------------- * News items can be of any length. * Images are fine. * Anything and everything Koha. * Submit by the 26th of the month. For events: * Please include dates for past events. If I can't find dates I may not add it. * Announcements for future events with dates to be announced are fine, e. g. Kohacon. * For past events, one month back is the cut-off. If you are working on an interesting project or development related to Koha, please let me know and I'll include it in the development section. Thank you! Michael Kuhn Editor, Koha Community Newsletter -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor at tuxayo.net Mon Mar 15 21:54:22 2021 From: victor at tuxayo.net (Victor Grousset/tuxayo) Date: Mon, 15 Mar 2021 21:54:22 +0100 Subject: [Koha-devel] Time to translate: string freeze to prepare Koha 19.11.16 has begun Message-ID: Hi, saluton, hola, bonjour, String freeze is into effect as of now for the 19.11.x maintenance branch. The release is scheduled for around the 23th. This means it's the right time to head over to the translation platform: https://translate.koha-community.org/projects/ Reminder: if you add or change a translation in version 19.11, then you must also copy it to 20.05 and 20.11. Otherwise your work will be lost for future versions. Happy translating, -- Victor Grousset/tuxayo From dcook at prosentient.com.au Wed Mar 17 01:25:52 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Wed, 17 Mar 2021 11:25:52 +1100 Subject: [Koha-devel] Automated testing Koha-Shibboleth integration Message-ID: <023701d71ac4$1698e4f0$43caaed0$@prosentient.com.au> Hi all, Jonathan's comment about the possibility of a Koha-Shibboleth regression got me thinking (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27555#c3). When we do releases, are we testing the Koha-Shibboleth integration? I have some custom Shibboleth code for Koha, and when I'm testing it I use Keycloak (manually not automatically). I wonder if the community should run a Keycloak node for testing Koha's Shibboleth integration. I'm curious what people think. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcook at prosentient.com.au Wed Mar 17 04:44:44 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Wed, 17 Mar 2021 14:44:44 +1100 Subject: [Koha-devel] Automated testing Koha-Shibboleth integration In-Reply-To: References: <023701d71ac4$1698e4f0$43caaed0$@prosentient.com.au> Message-ID: <026501d71adf$def97ac0$9cec7040$@prosentient.com.au> I don’t have experience with CAS, but I’ve definitely used Keycloak for OpenID Connect and SAML 2. It actually looks like there is an unofficial CAS extension for Keycloak too: https://github.com/jacekkow/keycloak-protocol-cas. This is the Docker image I usually use for testing: https://hub.docker.com/r/jboss/keycloak/. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 From: Tomas Cohen Arazi Sent: Wednesday, 17 March 2021 11:41 AM To: David Cook Cc: koha-devel ; Renvoize, Martin Subject: Re: Automated testing Koha-Shibboleth integration it would be cool to have keycloak server to aid testers. This way CAS and Shibb bugs would move faster. El mar., 16 mar. 2021 21:26, > escribió: Hi all, Jonathan’s comment about the possibility of a Koha-Shibboleth regression got me thinking (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27555#c3). When we do releases, are we testing the Koha-Shibboleth integration? I have some custom Shibboleth code for Koha, and when I’m testing it I use Keycloak (manually not automatically). I wonder if the community should run a Keycloak node for testing Koha’s Shibboleth integration. I’m curious what people think. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lari.taskula at hypernova.fi Thu Mar 18 01:28:25 2021 From: lari.taskula at hypernova.fi (Lari Taskula) Date: Thu, 18 Mar 2021 02:28:25 +0200 Subject: [Koha-devel] Exporting patron related data in REST API Message-ID: Hi devs, I would appreciate your feedback on a couple of issues regarding Bug 20028 that attempts to exportall patron related personal data in one package. I'm having difficulties in choosing the best approach, so the help of fresh minds would be awesome. These are my questions. a) Code-wise, manually define what to include into the export, or automatically select all related objects with the help of DBIx relationships? 1. https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79381&action=diff and https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028#c11 2. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028#c21   I have written some proof of concept patches for the second approach of fetching related data by DBIx relationships. The idea behind this was that, assuming foreign keys are appropriately defined at database level, it would always return related data without us having to worry when a new patron-related database modification gets introduced. However, then we have to be sure we are not accidentally returning some unwanted columns. Explicitly defining what to include offers more straightforward control, but it's going to be a lot of objects (around 50, these are listed in the Bug), maintenance and the risk of data missing from the export after a database update. In terms of GDPR and good privacy practices in general it would not be nice if something was missing from the export. b) Terminology? What to do with REST API terminology for the response object (i.e. borrower vs patron)? A patron has many, many related objects, so how do we describe those objects in a way that satisfies our terminology requirements. We could use Koha-objects to_api(), or create a new to_public_api() for the purpose of public routes, but for some objects it's currently not possible (such as messaging preferences) because they are in development. Is it even in the scope of this Bug to worry about that? If we chose the manual path of explicitly defining what to export, like what was done in the original patch (see a.1.), terminology issues could perhaps be more easily tackled. If you have a moment, please check out the Bug, add some feedback and let me know which approach you'd prefer. Or perhaps you have even a better solution ;) Bug 20028: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028 -- Lari Taskula CEO, Hypernova Oy PL 16 80101 Joensuu, Finland -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomascohen at gmail.com Thu Mar 18 02:10:01 2021 From: tomascohen at gmail.com (Tomas Cohen Arazi) Date: Wed, 17 Mar 2021 22:10:01 -0300 Subject: [Koha-devel] Exporting patron related data in REST API In-Reply-To: References: Message-ID: Answering briefly because it is late. Will follow-up tomorrow. But prefered to post now so you can think about it while I sleep! Take a look at the patrons or better the orders routes and the x-koha-embed header. It will take the output of an object method and try to call ->to_api recursively. If the method matches the name of a dbic relationship it will allow filtering and prefetching the related things in the query. With this mindset, what you would want to do is (probably) add methods and list them in x-koha-embed. This is the 'you need to know what you want to include' approach. But it will finally be something hardcore in the calling page... Si not big deal in my opinion. About the public part (and add an alternative to the previous paragraph), to_api is designed so we can add more params that are passed to the recursive calls. Look for the public items route bug. There, I introduce a generic way for defining the to_api_public method to be called when required. I wasn't sure about 'public' to be honest. It fits, but I feel more attached to the idea of profiles. GDPR could be yet another profile. I'd say 'what to include' should be configurable in an admin page. My two cents. El mié., 17 mar. 2021 21:28, Lari Taskula escribió: > Hi devs, > > I would appreciate your feedback on a couple of issues regarding Bug 20028 > that attempts to export all patron related personal data in one package. > I'm having difficulties in choosing the best approach, so the help of fresh > minds would be awesome. > > These are my questions. > > a) Code-wise, manually define what to include into the export, or > automatically select all related objects with the help of DBIx > relationships? > 1. > https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79381&action=diff > and https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028#c11 > 2. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028#c21 > > I have written some proof of concept patches for the second approach of > fetching related data by DBIx relationships. The idea behind this was > that, assuming foreign keys are appropriately defined at database level, it > would always return related data without us having to worry when a new > patron-related database modification gets introduced. However, then we have > to be sure we are not accidentally returning some unwanted columns. > > Explicitly defining what to include offers more straightforward control, > but it's going to be a lot of objects (around 50, these are listed in the > Bug), maintenance and the risk of data missing from the export after a > database update. In terms of GDPR and good privacy practices in general it > would not be nice if something was missing from the export. > > b) Terminology? > What to do with REST API terminology for the response object (i.e. > borrower vs patron)? A patron has many, many related objects, so how do we > describe those objects in a way that satisfies our terminology > requirements. We could use Koha-objects to_api(), or create a new > to_public_api() for the purpose of public routes, but for some objects it's > currently not possible (such as messaging preferences) because they are in > development. Is it even in the scope of this Bug to worry about that? If we > chose the manual path of explicitly defining what to export, like what was > done in the original patch (see a.1.), terminology issues could perhaps be > more easily tackled. > > If you have a moment, please check out the Bug, add some feedback and let > me know which approach you'd prefer. Or perhaps you have even a better > solution ;) > > Bug 20028: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028 > > -- > Lari Taskula > CEO, Hypernova Oy > PL 16 > 80101 Joensuu, Finland > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcook at prosentient.com.au Thu Mar 18 04:02:48 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Thu, 18 Mar 2021 14:02:48 +1100 Subject: [Koha-devel] FW: [DISCUSS] The future of mod_perl In-Reply-To: References: Message-ID: <03af01d71ba3$2d5bf760$8813e620$@prosentient.com.au> Hi all, While the Koha community doesn’t work with mod_perl, I think that there are some of you that use mod_perl for Koha (or other Perl projects), so I thought that I’d share this here. At the moment, it seems like they have only 2 active PMC members. I only have 1 project that uses mod_perl, and it’s a project that will be easy to switch to starman, so I have no real “skin in the game” so to speak. But maybe one of you do. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 From: Sander Striker Sent: Thursday, 18 March 2021 6:41 AM To: dev at perl.apache.org; modperl at perl.apache.org Subject: [DISCUSS] The future of mod_perl Dear community members, As projects mature, they will naturally reach a point where activity reduces to a level such that the project is no longer sustainable. At Apache, projects reach this stage when there are not at least 3 active PMC members providing oversight. Projects that reach this stage are usually placed in the Attic [1] or absorbed by another Apache project willing to manage its releases. If you are interested in seeing mod_perl remain an active project, and are able to help maintain and provide oversight, please respond in this thread indicating that you are interested in performing the duties of a PMC member[2]. Cheers, Sander Striker Director, The Apache Software Foundation [1] https://attic.apache.org/ [2] https://www.apache.org/dev/pmc.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From fridolin.somers at biblibre.com Fri Mar 19 16:12:45 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Fri, 19 Mar 2021 16:12:45 +0100 Subject: [Koha-devel] Time to translate: string freeze to prepare March release Message-ID: <7c25b153-ad09-1d0b-49ef-fe2810180c33@biblibre.com> Hi, String freeze is into effect the 15th. The 20.11.x maintenance branch is preparing for 20.11.04 release. The release is scheduled for around the 23rd. This means it's the right time to head over to the translation platform: https://translate.koha-community.org/projects/ Happy translating 🌎🌍🌏 -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From paul.a at navalmarinearchive.com Mon Mar 22 23:37:33 2021 From: paul.a at navalmarinearchive.com (Paul A) Date: Mon, 22 Mar 2021 18:37:33 -0400 Subject: [Koha-devel] OPAC search by 952$e Message-ID: <6b9ecc89-60f9-390d-b4d1-6c425026dd6d@navalmarinearchive.com> Is it possible in OPAC to search by acqsource 952$e? (no problem in MySQL, admin, reports) -- this email for OPAC query. Background: charitable library, trying to define donor fonds publicly. Disclaimer: using Koha 3.8.24 for ten years or more. I know (some of you might remember me) that we "should upgrade." We are not a lending, nor public library, use Koha very successfully at for cataloguing only, and cannot get later versions to work anywhere near as fast for OPAC / zebra searches. New summer students, IT specialty, coming in this year will try again... Best regards, and please stay safe, Paul From ztajoli at gmail.com Tue Mar 23 07:38:50 2021 From: ztajoli at gmail.com (Zeno Tajoli) Date: Tue, 23 Mar 2021 07:38:50 +0100 Subject: [Koha-devel] OPAC search by 952$e In-Reply-To: <6b9ecc89-60f9-390d-b4d1-6c425026dd6d@navalmarinearchive.com> References: <6b9ecc89-60f9-390d-b4d1-6c425026dd6d@navalmarinearchive.com> Message-ID: Hi Paul, You need to add 952$e to Zebra config. You can start from here: https://wiki.koha-community.org/wiki/How_to_add_new_zebra_index https://wiki.koha-community.org/wiki/Understanding_Zebra_indexing Inside Zebra there are still data from 952, check how it works. Bye Zeno Tajoli On Mon, Mar 22, 2021 at 11:38 PM Paul A wrote: > Is it possible in OPAC to search by acqsource 952$e? (no problem in > MySQL, admin, reports) -- this email for OPAC query. > > Background: charitable library, trying to define donor fonds publicly. > > Disclaimer: using Koha 3.8.24 for ten years or more. I know (some of you > might remember me) that we "should upgrade." We are not a lending, nor > public library, use Koha very successfully at > for cataloguing only, and cannot > get later versions to work anywhere near as fast for OPAC / zebra > searches. New summer students, IT specialty, coming in this year will > try again... > > Best regards, and please stay safe, > Paul > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at bywatersolutions.com Tue Mar 23 22:02:45 2021 From: andrew at bywatersolutions.com (Andrew Fuerste-Henry) Date: Tue, 23 Mar 2021 16:02:45 -0500 Subject: [Koha-devel] Release of Koha 20.05.10 Message-ID: Hi all! The Koha community is pleased to announce the release of Koha 20.05.10. This is a bugfix/maintenance release. It includes 1 enhancements, 40 bugfixes. Full release notes are available here: https://koha-community.org/koha-20-05-10-released/ Thanks! Andrew Andrew Fuerste-Henry Educator (he/him/his) ByWater Solutions bywatersolutions.com Phone:(888)900-8944 <(888)%20900-8944> What is Koha? -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor at tuxayo.net Wed Mar 24 03:28:46 2021 From: victor at tuxayo.net (Victor Grousset/tuxayo) Date: Wed, 24 Mar 2021 03:28:46 +0100 Subject: [Koha-devel] Koha 19.11.16 released Message-ID: Hello! The Koha Community is happy to announce the release of Koha 19.11.16 The full release notes can be found at: https://koha-community.org/koha-19-11-16-released/ Debian packages will be available shortly. Thanks to everyone involved :) Cheers, -- Victor Grousset/tuxayo From fridolin.somers at biblibre.com Wed Mar 24 12:39:21 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Wed, 24 Mar 2021 12:39:21 +0100 Subject: [Koha-devel] Release of Koha 20.11.04 Message-ID: Hello everyone 🤗 The Koha community is proud to announce the release of Koha 20.11.04. It is a maintenance release. The full release notes are available here: https://koha-community.org/koha-20-11-04-released/ Debian packages should be available in a few days. Best regards 🤓 -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From dcook at prosentient.com.au Thu Mar 25 04:42:03 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Thu, 25 Mar 2021 14:42:03 +1100 Subject: [Koha-devel] Switching from SysV to Systemd for koha-common service Message-ID: <005001d72128$d1e3ba90$75ab2fb0$@prosentient.com.au> Hi all, I was just installing koha-common, as you do, and I noticed the following warning: Failed to enable unit: Unit /run/systemd/generator.late/koha-common.service is transient or generated. This is the product of the following command: "update-rc.d koha-common enable" I think I was able to work around it by running the following: "/lib/systemd/systemd-sysv-install enable koha-common" However, I'm thinking it is probably time to switch koha-common from SysV to Systemd. We'll lose a bit of functionality for the "status" option, but otherwise it shouldn't be too bad. I think we'll lose the "restart" as well as I think the systemd restart is a "stop" and "start". David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcook at prosentient.com.au Thu Mar 25 04:56:13 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Thu, 25 Mar 2021 14:56:13 +1100 Subject: [Koha-devel] /usr/share/koha/api/v1/app.pl slow to startup Message-ID: <005c01d7212a$cce212b0$66a63810$@prosentient.com.au> Hi all, Does anyone else notice that /usr/share/koha/api/v1/app.pl is slow to startup, especially when starting up many instances (for example when installing/upgrading koha-common)? I already have a bug open to improve the koha-upgrade-schema performance (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26596) for package install/upgrade. However with /usr/share/koha/api/v1/app.pl (and thus "/usr/share/koha/lib/Koha/REST/V1.pm") it seems trickier. Using --preload-app with Starman might be helpful as it might reduce the load (by preloading the app into the master process before forking). However, I think a lot of the work is done by the API startup when it's merging and validating the API schema. I'm not sure there's really any way around that. Maybe there are efficiencies to be gained but would need to do some profiling. Anyway, I suppose I'm just mostly interested to see if other people are also finding it painfully slow, especially for larger scale installations. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kohanews at gmail.com Sun Mar 28 23:55:38 2021 From: kohanews at gmail.com (Koha Newsletter) Date: Sun, 28 Mar 2021 23:55:38 +0200 Subject: [Koha-devel] Koha Community Newsletter: March 2021 Message-ID: The Koha Community Newsletter for March 2021 is here: https://koha-community.org/koha-community-newsletter-march-2021/ Many thanks to everyone who submitted articles and news to last month's newsletter! Please feel free to email me with any corrections or suggestions. -- Michael Kuhn Editor, Koha Community Newsletter -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor at tuxayo.net Mon Mar 29 18:25:15 2021 From: victor at tuxayo.net (Victor Grousset/tuxayo) Date: Mon, 29 Mar 2021 18:25:15 +0200 Subject: [Koha-devel] Second look needed on a few (2!) lines related to plugins Message-ID: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> Hi :) It's about Bug 25476 - Uploaded files can't be easily browsed via upload.pl There are two lines in the patch that are out of my knowledge to QA: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25476#c6 [% PROCESS plugin_pars %] [...] $plugin? ( public => 1 ): () Does this look familiar to anyone? Cheers, -- Victor Grousset/tuxayo From mtj at kohaaloha.com Tue Mar 30 01:31:08 2021 From: mtj at kohaaloha.com (Mason James) Date: Tue, 30 Mar 2021 12:31:08 +1300 Subject: [Koha-devel] Second look needed on a few (2!) lines related to plugins In-Reply-To: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> References: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> Message-ID: <0b274655-7c51-8e25-48ab-619cf77fcc83@kohaaloha.com> hiya, here's some info... https://docstore.mik.ua/orelly/perl3/prog/ch03_16.htm On 30/03/21 5:25 am, Victor Grousset/tuxayo wrote: > Hi :) > > It's about Bug 25476 - Uploaded files can't be easily browsed via upload.pl > > There are two lines in the patch that are out of my knowledge to QA: > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25476#c6 > > [% PROCESS plugin_pars %] > [...] > $plugin? ( public => 1 ): () > > Does this look familiar to anyone? > > Cheers, > From fridolin.somers at biblibre.com Tue Mar 30 09:08:21 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Tue, 30 Mar 2021 09:08:21 +0200 Subject: [Koha-devel] Second look needed on a few (2!) lines related to plugins In-Reply-To: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> References: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> Message-ID: Hi, In my opinion this syntax looks strange. I'd prefer : my $filter = { uploadcategorycode => $browsecategory }; $filter{public} = 1 if $plugin; $uploads = Koha::UploadedFiles->search($filter)->unblessed; Super cool enhancement BTW ;) Best regards, Le 29/03/2021 à 18:25, Victor Grousset/tuxayo a écrit : > Hi :) > > It's about Bug 25476 - Uploaded files can't be easily browsed via upload.pl > > There are two lines in the patch that are out of my knowledge to QA: > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25476#c6 > > [% PROCESS plugin_pars %] > [...] > $plugin? ( public => 1 ): () > > Does this look familiar to anyone? > > Cheers, > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From domm at plix.at Tue Mar 30 09:28:13 2021 From: domm at plix.at (Thomas Klausner) Date: Tue, 30 Mar 2021 09:28:13 +0200 Subject: [Koha-devel] Bug 28022 - MARC subfield 9 not honoring visibility Message-ID: Hi! Can anybody here maybe review / comment on my bug report & patch 28022 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28022 Here's the patch: https://github.com/domm/Koha/commit/d19abcc23d5793becdd5edca26c4bd2d47fcd33f Greetings, domm -- #!/usr/bin/perl http://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} From nicolas.legrand at bulac.fr Tue Mar 30 09:34:03 2021 From: nicolas.legrand at bulac.fr (Nicolas Legrand) Date: Tue, 30 Mar 2021 09:34:03 +0200 Subject: [Koha-devel] Bug 28022 - MARC subfield 9 not honoring visibility In-Reply-To: References: Message-ID: Hiya Thomas, Le mar. 30 mars 2021 à 09:28, Thomas Klausner a écrit : > Hi! > > Can anybody here maybe review / comment on my bug report & patch 28022 > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28022 > > > Here's the patch: > > https://github.com/domm/Koha/commit/d19abcc23d5793becdd5edca26c4bd2d47fcd33f Here is the doc explaining how to submit a patch for Koha : https://wiki.koha-community.org/wiki/Git_bz_configuration You have to install a utility (git bz) that uploads your patches to Bugzilla. Then other people will be able to test, comment or sign your patch, also using git bz. Regards, -- Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: From fridolin.somers at biblibre.com Tue Mar 30 10:08:10 2021 From: fridolin.somers at biblibre.com (Fridolin SOMERS) Date: Tue, 30 Mar 2021 10:08:10 +0200 Subject: [Koha-devel] Switching from SysV to Systemd for koha-common service In-Reply-To: <005001d72128$d1e3ba90$75ab2fb0$@prosentient.com.au> References: <005001d72128$d1e3ba90$75ab2fb0$@prosentient.com.au> Message-ID: <5788f577-0831-90cf-4696-444268910a3e@biblibre.com> Hi, Very good idea :D We at Biblibre have build a systemd unit for Starman and Zebra, it is quite simple. But we dont use several Koha. In ordre to implement for several Koha, I think we should use %i vars in systemd unit. Like it is in openvpn : https://github.com/OpenVPN/openvpn/blob/master/distro/systemd/openvpn-client%40.service.in It allows to call any unit (for example demo Koha) : systemctl start koha-common at demo. About restart : I see you can define a different kill signal than stop : https://www.freedesktop.org/software/systemd/man/systemd.kill.html#RestartKillSignal= But you may use "reload" action instead : https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecReload= We use reload for starman it is more soft (it acts like apache gracefull restart). I attach some files here : https://git.biblibre.com/biblibre/koha-nginx/src/branch/master/etc/systemd/system Feel free to ask for help. Best regards, Le 25/03/2021 à 04:42, dcook at prosentient.com.au a écrit : > Hi all, > > I was just installing koha-common, as you do, and I noticed the > following warning: > > Failed to enable unit: Unit > /run/systemd/generator.late/koha-common.service is transient or generated. > > This is the product of the following command: “update-rc.d koha-common > enable” > > I think I was able to work around it by running the following: > “/lib/systemd/systemd-sysv-install enable koha-common” > > However, I’m thinking it is probably time to switch koha-common from > SysV to Systemd. We’ll lose a bit of functionality for the “status” > option, but otherwise it shouldn’t be too bad. I think we’ll lose the > “restart” as well as I think the systemd restart is a “stop” and “start”. > > David Cook > > Software Engineer > > Prosentient Systems > > Suite 7.03 > > 6a Glen St > > Milsons Point NSW 2061 > > Australia > > Office: 02 9212 0899 > > Online: 02 8005 0595 > > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France From victor at tuxayo.net Tue Mar 30 17:48:43 2021 From: victor at tuxayo.net (Victor Grousset/tuxayo) Date: Tue, 30 Mar 2021 17:48:43 +0200 Subject: [Koha-devel] Second look needed on a few (2!) lines related to plugins In-Reply-To: <0b274655-7c51-8e25-48ab-619cf77fcc83@kohaaloha.com> References: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> <0b274655-7c51-8e25-48ab-619cf77fcc83@kohaaloha.com> Message-ID: <44ddc466-06b9-8915-f3cd-e8a420eb465c@tuxayo.net> On 21-03-30 01:31, Mason James wrote: > hiya, here's some info... > > https://docstore.mik.ua/orelly/perl3/prog/ch03_16.htm Indeed there is a trinary, but it's about if it makes sense to do "those things" related to plugins. Is that useful, is that valid, is that enough? Cheers, -- Victor Grousset/tuxayo From dcook at prosentient.com.au Wed Mar 31 00:20:05 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Wed, 31 Mar 2021 09:20:05 +1100 Subject: [Koha-devel] Second look needed on a few (2!) lines related to plugins In-Reply-To: References: <565e5e29-2ebc-2490-aaec-c5aa1e4def97@tuxayo.net> Message-ID: <02d401d725b2$d6242b60$826c8220$@prosentient.com.au> I wrote the patch close to a year ago so I have no idea why I used the syntax that I did. I think maybe I was copying what was already there for the search feature at the time. But I'm happy for people to change it! And thanks for the compliment. I do like this feature! David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel On Behalf Of Fridolin SOMERS Sent: Tuesday, 30 March 2021 6:08 PM To: koha-devel at lists.koha-community.org Subject: Re: [Koha-devel] Second look needed on a few (2!) lines related to plugins Hi, In my opinion this syntax looks strange. I'd prefer : my $filter = { uploadcategorycode => $browsecategory }; $filter{public} = 1 if $plugin; $uploads = Koha::UploadedFiles->search($filter)->unblessed; Super cool enhancement BTW ;) Best regards, Le 29/03/2021 à 18:25, Victor Grousset/tuxayo a écrit : > Hi :) > > It's about Bug 25476 - Uploaded files can't be easily browsed via > upload.pl > > There are two lines in the patch that are out of my knowledge to QA: > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25476#c6 > > [% PROCESS plugin_pars %] > [...] > $plugin? ( public => 1 ): () > > Does this look familiar to anyone? > > Cheers, > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France _______________________________________________ Koha-devel mailing list Koha-devel at lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/ From dcook at prosentient.com.au Wed Mar 31 00:35:22 2021 From: dcook at prosentient.com.au (dcook at prosentient.com.au) Date: Wed, 31 Mar 2021 09:35:22 +1100 Subject: [Koha-devel] Switching from SysV to Systemd for koha-common service In-Reply-To: <5788f577-0831-90cf-4696-444268910a3e@biblibre.com> References: <005001d72128$d1e3ba90$75ab2fb0$@prosentient.com.au> <5788f577-0831-90cf-4696-444268910a3e@biblibre.com> Message-ID: <02d501d725b4$f8abd230$ea037690$@prosentient.com.au> Hi Frido, You only have 1 Koha per server? That's amazing. I agree about using %i. With the koha-worker systemd service, we've done that. (Bug 26363 and 27844) I suppose the way to make a global koha-common would be to have individual systemd units for each of the individual services and then have koha-common as the parent service. I manage a different system where I control a few daemons via a parent systemd service and it works quite well. The only thing with that is that we'd have to re-write everything to use systemd heh. Not that I'm opposed to that, although - as Tomas noted - it would make things tougher to do in containers in the short-term. Sometimes, I wish that I had all the time and money to make these things happen. I am extra short on time at the moment, so no plans to work on this any time soon. David Cook Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595 -----Original Message----- From: Koha-devel On Behalf Of Fridolin SOMERS Sent: Tuesday, 30 March 2021 7:08 PM To: koha-devel at lists.koha-community.org Subject: Re: [Koha-devel] Switching from SysV to Systemd for koha-common service Hi, Very good idea :D We at Biblibre have build a systemd unit for Starman and Zebra, it is quite simple. But we dont use several Koha. In ordre to implement for several Koha, I think we should use %i vars in systemd unit. Like it is in openvpn : https://github.com/OpenVPN/openvpn/blob/master/distro/systemd/openvpn-client%40.service.in It allows to call any unit (for example demo Koha) : systemctl start koha-common at demo. About restart : I see you can define a different kill signal than stop : https://www.freedesktop.org/software/systemd/man/systemd.kill.html#RestartKillSignal= But you may use "reload" action instead : https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecReload= We use reload for starman it is more soft (it acts like apache gracefull restart). I attach some files here : https://git.biblibre.com/biblibre/koha-nginx/src/branch/master/etc/systemd/system Feel free to ask for help. Best regards, Le 25/03/2021 à 04:42, dcook at prosentient.com.au a écrit : > Hi all, > > I was just installing koha-common, as you do, and I noticed the > following warning: > > Failed to enable unit: Unit > /run/systemd/generator.late/koha-common.service is transient or generated. > > This is the product of the following command: “update-rc.d koha-common > enable” > > I think I was able to work around it by running the following: > “/lib/systemd/systemd-sysv-install enable koha-common” > > However, I’m thinking it is probably time to switch koha-common from > SysV to Systemd. We’ll lose a bit of functionality for the “status” > option, but otherwise it shouldn’t be too bad. I think we’ll lose the > “restart” as well as I think the systemd restart is a “stop” and “start”. > > David Cook > > Software Engineer > > Prosentient Systems > > Suite 7.03 > > 6a Glen St > > Milsons Point NSW 2061 > > Australia > > Office: 02 9212 0899 > > Online: 02 8005 0595 > > > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ git : > https://git.koha-community.org/ bugs : > https://bugs.koha-community.org/ > -- Fridolin SOMERS Software and system maintainer 🦄 BibLibre, France _______________________________________________ Koha-devel mailing list Koha-devel at lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/ From martin.renvoize at ptfs-europe.com Wed Mar 31 15:04:22 2021 From: martin.renvoize at ptfs-europe.com (Renvoize, Martin) Date: Wed, 31 Mar 2021 14:04:22 +0100 Subject: [Koha-devel] Bug 28022 - MARC subfield 9 not honoring visibility In-Reply-To: References: Message-ID: Hi Thomas, Welcome aboard the Koha devs. I'm afraid we don't accept github pull requests at this time. It's come up a few times, but to keep our workflows clear for the largest group of people we've stuck to Bugzilla and mailbox patches so far (They're easy to apply to all our other infrastructure for testing etc). Onto the patch itself. I've come across this exact case a month or so now.. in fact, I have a vague recollection of pointing it out to someone on IRC recently.. perhaps that was you. Your code looks mostly reasonable to me, but I'm also not close enough to how the linking all fits together to know what side effect it might have.. :(. If you're happy to give git-bz a try as Nicolas suggested, that would give us a head start in terms of onboarding fellow testers and devs.. if not let me know and I can extract your patch from github for you and submit it to BZ. *Martin Renvoize, MPhys (Hons)* Head of Development and Community Engagement *Phone:* +44 (0) 1483 378728 *Mobile:* +44 (0) 7725 985 636 *Email:* martin.renvoize at ptfs-europe.com www.ptfs-europe.com *Sign up for our newsletters here or by scanning the QR code* Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30 The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at info at ptfs-europe.com On Tue, 30 Mar 2021 at 08:34, Nicolas Legrand wrote: > Hiya Thomas, > > Le mar. 30 mars 2021 à 09:28, Thomas Klausner a écrit : > >> Hi! >> >> Can anybody here maybe review / comment on my bug report & patch 28022 >> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28022 >> >> >> Here's the patch: >> >> https://github.com/domm/Koha/commit/d19abcc23d5793becdd5edca26c4bd2d47fcd33f > > > Here is the doc explaining how to submit a patch for Koha : > > https://wiki.koha-community.org/wiki/Git_bz_configuration > > You have to install a utility (git bz) that uploads your patches to > Bugzilla. Then other people will be able to test, comment or sign your > patch, also using git bz. > > Regards, > > -- > Nicolas > _______________________________________________ > Koha-devel mailing list > Koha-devel at lists.koha-community.org > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : https://www.koha-community.org/ > git : https://git.koha-community.org/ > bugs : https://bugs.koha-community.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From domm at plix.at Wed Mar 31 16:59:43 2021 From: domm at plix.at (Thomas Klausner) Date: Wed, 31 Mar 2021 16:59:43 +0200 Subject: [Koha-devel] Bug 28022 - MARC subfield 9 not honoring visibility In-Reply-To: References: Message-ID: Hi! On Wed, Mar 31, 2021 at 02:04:22PM +0100, Renvoize, Martin wrote: > If you're happy to give git-bz a try as Nicolas suggested, that would give > us a head start in terms of onboarding fellow testers and devs.. if not let > me know and I can extract your patch from github for you and submit it to > BZ. ok, I'll do that (in the next few days, modulo Easter and the current Corona lockdown..) Thanks for the feedback, Thomas -- #!/usr/bin/perl http://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}