[Bug 30642] New: We should record the renewal type (Automatic/Manual)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Bug ID: 30642 Summary: We should record the renewal type (Automatic/Manual) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Depends on: 30275 With bug 30275 we introduce more logging of renewals.. but we don't differentiate between automatic renewals and renewals by other means.. it could be helpful to do so. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30275 [Bug 30275] Checkout renewals should be stored in their own table -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Bug 30642 depends on bug 30275, which changed state. Bug 30275 Summary: Checkout renewals should be stored in their own table https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30275 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 144451 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144451&action=edit Bug 30642: Record renewal type A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |matt.blenkinsop@ptfs-europe | |.com Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144451|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Ignore patch above -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 144457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144457&action=edit Bug 30642: Record renewal type A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. The API has also been updated to reflect this new column and return the data when requested. The renewals modal view has also been updated to show what type the renewal was. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |lucas@bywatersolutions.com --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- This will be very helpful! I do encounter a problem when testing with automatic_renewals.pl. They are showing up as a "Manual" renewal type. Looking a Circulation.pm I see that my file name is "/kohadevbox/koha/misc/cronjobs/automatic_renewals.pl" not "automatic_renewals.pl". If I switch this it works: -my $renewal_type = $filename eq "automatic_renewals.pl" ? "Automatic" : "Manual"; +my $renewal_type = $filename =~ m/automatic_renewals.pl/ ? "Automatic" : "Manual"; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Thanks for the correction! I will update and recommit the patch :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144457|0 |1 is obsolete| | --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 144463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144463&action=edit Bug 30642: Record renewal type A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. The API has also been updated to reflect this new column and return the data when requested. The renewals modal view has also been updated to show what type the renewal was. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144457|1 |0 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 144457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144457 Bug 30642: Record renewal type Review of attachment 144457: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=30642&attachment=144457) ----------------------------------------------------------------- This is a great submission Matt. I agree with Lucas's comment, we'll need to use a regex to catch the file as the install process can put the file into different locations depending on the install type... but otherwise the code is working well. A few minor code review comments added too. ::: installer/data/mysql/atomicupdate/bug_30642-add_renewal_type.pl @@ +1,4 @@
+use Modern::Perl; + +return { + bug_number => "BUG_30642",
You only need the number here Matt ;P @@ +8,5 @@
+ my ($dbh, $out) = @$args{qw(dbh out)}; + + if( !column_exists( 'checkout_renewals', 'renewal_type' ) ) { + $dbh->do(q{ + ALTER TABLE checkout_renewals ADD COLUMN `renewal_type` varchar(9) NOT NULL AFTER `timestamp`
Thinking about it, this could be an ENUM rather than a varchar(9) perhaps? Also, as we're adding a 'NOT NULL' we probably need to deal with existing rows.. Especially as we've not added a DEFAULT.. perhaps 'DEFAULT 'MANUAL' and ENUM('AUTO','MANUAL'). ::: koha-tmpl/intranet-tmpl/prog/js/checkout_renewals_modal.js @@ +20,4 @@
}); }); function createLi(renewal) { + return '<li><span style="font-weight:bold">' + $datetime(renewal.timestamp) + '</span> ' + renewed + ' <span style="font-weight:bold">' + $patron_to_html(renewal.renewer) + '</span>' + renewed_type + ' <span style="font-weight:bold">' + renewal.renewal_type + '</span></li>';
This is interesting, I hadn't really considered it before today. I imagine 'auto' renewals don't have a renewal.renewer associated.. worth a little manual testing to see what happens there. Finally.. translations.. we'll need to think a little about this. With the ENUM change suggested above we could template out the descriptive string and use __('Manual') to expose the display strings to the translation system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA Summary|We should record the |We should record the |renewal type |renewal type |(Automatic/Manual) |(automatic/manual) --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi, just looking here for a moment - it seems like the patch might have been attached twice? Changing to failed QA for Martin's last comment. Please keep going! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144457|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #9 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 144499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144499&action=edit Bug 30642: (follow-up) Change sql and adapt for translations New column has now been changed to an enum in line with comments and the strings have been amended to be picked up for translation. The file koha-tmpl/intranet-tmpl/prog/en/includes/str/checkout_renewals.inc has been removed as the variables can be included within the javascript file. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144463|0 |1 is obsolete| | --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 144504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144504&action=edit Bug 30642: Record renewal type A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. The API has also been updated to reflect this new column and return the data when requested. The renewals modal view has also been updated to show what type the renewal was. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144499|0 |1 is obsolete| | --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 144505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144505&action=edit Bug 30642: (follow-up) Change sql and adapt for translations New column has now been changed to an enum in line with comments and the strings have been amended to be picked up for translation. The file koha-tmpl/intranet-tmpl/prog/en/includes/str/checkout_renewals.inc has been removed as the variables can be included within the javascript file. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144504|0 |1 is obsolete| | Attachment #144505|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 145518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145518&action=edit Bug 30642: Record renewal type A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. The API has also been updated to reflect this new column and return the data when requested. The renewals modal view has also been updated to show what type the renewal was. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 145519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145519&action=edit Bug 30642: (follow-up) Change sql and adapt for translations New column has now been changed to an enum in line with comments and the strings have been amended to be picked up for translation. The file koha-tmpl/intranet-tmpl/prog/en/includes/str/checkout_renewals.inc has been removed as the variables can be included within the javascript file. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 145520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145520&action=edit Bug 30642: (QA follow-up) Do not rely on script names in modules, add unit test Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- What y'all think about moving the column into an ENUM type? I can do it, and willing to push this ASAP. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- No issue at all with it being an ENUM.. makes sense to me :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #17 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Is it not already an ENUM? Martin raised it in his feedback and it was changed in the "(follow-up) Change sql and adapt for translations" patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Matt Blenkinsop from comment #17)
Is it not already an ENUM? Martin raised it in his feedback and it was changed in the "(follow-up) Change sql and adapt for translations" patch
It is and ENUM on the DB. What's missing is reflecting that on the API. It is currently defined as a nullable string. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #19 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Ah yes I see what you mean, missed that first time round! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145520|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145518|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145519|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146471 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146471&action=edit Bug 30642: Record renewal type A requirement has been requested to record whether a renewal was done manually or automatically. A column has been added to the checkout_renewals table in the database to record this and a check is now in place to determine whether the renewal was manual or automatic. The API has also been updated to reflect this new column and return the data when requested. The renewals modal view has also been updated to show what type the renewal was. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146472 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146472&action=edit Bug 30642: (follow-up) Change sql and adapt for translations New column has now been changed to an enum in line with comments and the strings have been amended to be picked up for translation. The file koha-tmpl/intranet-tmpl/prog/en/includes/str/checkout_renewals.inc has been removed as the variables can be included within the javascript file. Test plan: 1) In the database shell run "show columns from checkout_renewals;" and observe that there is currently no column for recording the type of renewal 2) Apply patch 3) In the shell run "dbic" and "perl installer/data/mysql/updatedatabase.pl" to update the database schema with the new column. 4) Create some checkouts 5) Renew some checkouts manually and observe in the database that there is now a column called "renewal_type" that will have recorded these as "Manual" 6) Create some checkouts that can be automatically renewed 7) Run the cron script in automatic_renewals.pl and observe that there are now also entries with a renewal_type of "Automatic" 8) Send a GET request to http://localhost:8081/api/v1/checkouts/1/renewals and observe that the renewal_type is now returned in the response 9) In the Item Details tab for a record, there is the "Current renewals" option which has a button to view renewals. Click on this and observe that the modal now displays the new information. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146473&action=edit Bug 30642: (QA follow-up) Do not rely on script names in modules, add unit test Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: Kyle, stop impersonating John Doe -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146474 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146474&action=edit Bug 30642: Make renewal_type an enum in spec and add test This patch makes the renewal_type an enum, to match the change on the DB. A test is added to account the fact the API is always setting 'Manual' request type. Bonus: small portion of code gets a tidy, should've been asked by QA. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146474|0 |1 is obsolete| | --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146476&action=edit Bug 30642: Make renewal_type an enum in spec and add test This patch makes the renewal_type an enum, to match the change on the DB. A test is added to account the fact the API is always setting 'Manual' request type. Bonus: small portion of code gets a tidy, should've been asked by QA. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #26 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #27 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146614 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146614&action=edit Bug 30642: (follow-up) Remove use of deleted file Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Follow-up required in stable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00,22.11.03 |23.05.00,22.11.03,22.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 --- Comment #29 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00,22.11.03,22.11.03 |23.05.00,22.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #30 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Aude Charillon <aude.charillon@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |Aude Charillon contact| | Status|RESOLVED |Needs documenting Resolution|FIXED |--- CC| |aude.charillon@ptfs-europe. | |com --- Comment #31 from Aude Charillon <aude.charillon@ptfs-europe.com> --- Reopening for documentation (agreed to be thorough and replace screenshot) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/684 Resolution|--- |FIXED CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com, | |kyle.m.hall@gmail.com Text to go in the| |This ensures that the type release notes| |of a renewal, automatic or | |manual, is stored in the | |new column `renewal_type` | |of the `checkout_renewals` | |table. Component|Architecture, internals, |Circulation |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30642 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This ensures that the type |**Sponsored by** *PTFS release notes|of a renewal, automatic or |Europe* |manual, is stored in the | |new column `renewal_type` |This ensures that |of the `checkout_renewals` |the type of a renewal, |table. |automatic or manual, is | |stored in the new column | |`renewal_type` of the | |`checkout_renewals` table. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org