Bug 36330 - Fix typo: reseve
Summary: Fix typo: reseve
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Alex Buckley
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2024-03-15 13:17 UTC by Magnus Enger
Modified: 2024-06-13 23:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the spelling of "reserve" in Koha source code comments (was spelled incorrectly as "reseve").
Version(s) released in:
24.11.00


Attachments
Bug 36330: Change 'reseve' to 'reserve' (577.98 KB, patch)
2024-03-21 23:45 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 36330: Change 'reseve' to 'reserve' (4.98 KB, patch)
2024-03-21 23:50 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 36330: Change 'reseve' to 'reserve' (5.02 KB, patch)
2024-03-22 16:22 UTC, David Nind
Details | Diff | Splinter Review
Bug 36330: Follow up, change comments in the DB (2.66 KB, patch)
2024-06-06 13:20 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 36330: Follow up, change comments in the DB (2.71 KB, patch)
2024-06-07 23:42 UTC, David Nind
Details | Diff | Splinter Review
Bug 36330: Follow up, change comments in the DB (2.74 KB, patch)
2024-06-10 06:29 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 36330: Change 'reseve' to 'reserve' (5.10 KB, patch)
2024-06-12 14:04 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36330: Follow up, change comments in the DB (2.82 KB, patch)
2024-06-12 14:04 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2024-03-15 13:17:41 UTC
$ grep -rn "reseves" *
installer/data/mysql/updatedatabase.pl:4907:    print "Upgrade to $DBversion done (Added system preference ExpireReservesMaxPickUpDelay, system preference ExpireReservesMaxPickUpDelayCharge, add reseves.charge_if_expired)\n";
misc/cronjobs/holds/cancel_expired_holds.pl:37:This script calls C4::Reserves::CancelExpiredReserves which will find and cancel all expired reseves in the system.
magnus@bilbo ~/code/kohaclone (master)$ grep -rn "reseve" *
installer/data/mysql/kohastructure.sql:2233:  `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reseve (optional)',
installer/data/mysql/kohastructure.sql:2236:  `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reseve, this field will be ''yes'', otherwise it will be ''no''',
installer/data/mysql/updatedatabase.pl:4907:    print "Upgrade to $DBversion done (Added system preference ExpireReservesMaxPickUpDelay, system preference ExpireReservesMaxPickUpDelayCharge, add reseves.charge_if_expired)\n";
Koha/Schema/Result/CourseItem.pm:155:new shelving location for the item to have while on reseve (optional)
Koha/Schema/Result/CourseItem.pm:180:if at least one enabled course has this item on reseve, this field will be 'yes', otherwise it will be 'no'
misc/cronjobs/holds/cancel_expired_holds.pl:37:This script calls C4::Reserves::CancelExpiredReserves which will find and cancel all expired reseves in the system.
Comment 1 Alex Buckley 2024-03-21 23:45:55 UTC Comment hidden (obsolete)
Comment 2 Alex Buckley 2024-03-21 23:50:05 UTC Comment hidden (obsolete)
Comment 3 David Nind 2024-03-22 16:22:30 UTC
Created attachment 163718 [details] [review]
Bug 36330: Change 'reseve' to 'reserve'

Test plan:
1. git grep 'reseve'. Notice there are instances of 'reseve'
2. Apply patch
3. Repeat step 1, there should be no instances of 'reseve'

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Marcel de Rooy 2024-03-29 09:33:48 UTC
diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm
index 53a62686e4..435c2db64e 100644
--- a/Koha/Schema/Result/CourseItem.pm
+++ b/Koha/Schema/Result/CourseItem.pm
@@ -152,7 +152,7 @@ a place to store the holdingbranch when item is on course reserve
   is_nullable: 1
   size: 80

-new shelving location for the item to have while on reseve (optional)
+new shelving location for the item to have while on reserve (optional)


This is not allowed.
You should provide a dbrev to update the tables for the adjusted comments in kohastructure.
After that provide a DBIx schema update patch or leave it to the RM.
Comment 5 Magnus Enger 2024-06-06 13:20:04 UTC
Created attachment 167543 [details] [review]
Bug 36330: Follow up, change comments in the DB

This patch updates the comments of course_items.location and
course_items.enabled to say "reserve" instead of "reseve".

To test in ktd:
- sudo koha-mysql kohadev
- Run: "SHOW CREATE TABLE course_items;"
- Verify the comments of "location" and "enabled" contains
  "reseve" instead of "reserve"
- Make a note of the definitions of these two columns
- Run the atomicupdate: "sudo koha-upgrade-schema kohadev"
- Log into the database again and run the same command as above
- Verify the comments now say "reserve" instead of "reseve"
- Make sure the column definitions are otherwise identical to
  the ones you saw before the upgrade. Only the spelling of
  "reserve" in the comment should be changed.
Comment 6 Magnus Enger 2024-06-06 13:20:59 UTC
First patch is signed off, I have provided a followup that updates the comments in the database.
Comment 7 David Nind 2024-06-07 23:42:42 UTC
Created attachment 167591 [details] [review]
Bug 36330: Follow up, change comments in the DB

This patch updates the comments of course_items.location and
course_items.enabled to say "reserve" instead of "reseve".

To test in ktd:
- sudo koha-mysql kohadev
- Run: "SHOW CREATE TABLE course_items;"
- Verify the comments of "location" and "enabled" contains
  "reseve" instead of "reserve"
- Make a note of the definitions of these two columns
- Run the atomicupdate: "sudo koha-upgrade-schema kohadev"
- Log into the database again and run the same command as above
- Verify the comments now say "reserve" instead of "reseve"
- Make sure the column definitions are otherwise identical to
  the ones you saw before the upgrade. Only the spelling of
  "reserve" in the comment should be changed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2024-06-07 23:44:10 UTC
(In reply to Magnus Enger from comment #6)
> First patch is signed off, I have provided a followup that updates the
> comments in the database.

Now signed off.

I did notice an extra line with "0E0" for the database update - not sure if this is an issue or not:

updatedatabase
DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl  [23:38:45]: Bug 36330 - Fix typo 'reseve' in COMMENTs for table  course_items
	0E0
	Comment for course_items.location was updated.
	Comment for course_items.enabled was updated.
Comment 9 Magnus Enger 2024-06-10 06:29:26 UTC
Created attachment 167600 [details] [review]
Bug 36330: Follow up, change comments in the DB

This patch updates the comments of course_items.location and
course_items.enabled to say "reserve" instead of "reseve".

To test in ktd:
- sudo koha-mysql kohadev
- Run: "SHOW CREATE TABLE course_items;"
- Verify the comments of "location" and "enabled" contains
  "reseve" instead of "reserve"
- Make a note of the definitions of these two columns
- Run the atomicupdate: "sudo koha-upgrade-schema kohadev"
- Log into the database again and run the same command as above
- Verify the comments now say "reserve" instead of "reseve"
- Make sure the column definitions are otherwise identical to
  the ones you saw before the upgrade. Only the spelling of
  "reserve" in the comment should be changed.

Signed-off-by: David Nind <david@davidnind.com>

Removed unnecessary line of debug output. 2024-06-10 Magnus Enger
Comment 10 Magnus Enger 2024-06-10 06:30:34 UTC
(In reply to David Nind from comment #8)
> (In reply to Magnus Enger from comment #6)
> > First patch is signed off, I have provided a followup that updates the
> > comments in the database.
> 
> Now signed off.
> 
> I did notice an extra line with "0E0" for the database update - not sure if
> this is an issue or not:
> 
> updatedatabase
> DEV atomic update
> /kohadevbox/koha/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.
> pl  [23:38:45]: Bug 36330 - Fix typo 'reseve' in COMMENTs for table 
> course_items
> 	0E0
> 	Comment for course_items.location was updated.
> 	Comment for course_items.enabled was updated.

That line was left over from testing, sorry about that. I have updated the signed off patch and removed that line. Hope that is OK.
Comment 11 David Nind 2024-06-10 21:50:29 UTC
Thanks Magnus!
Comment 12 Matt Blenkinsop 2024-06-12 14:04:07 UTC
Created attachment 167663 [details] [review]
Bug 36330: Change 'reseve' to 'reserve'

Test plan:
1. git grep 'reseve'. Notice there are instances of 'reseve'
2. Apply patch
3. Repeat step 1, there should be no instances of 'reseve'

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 13 Matt Blenkinsop 2024-06-12 14:04:10 UTC
Created attachment 167664 [details] [review]
Bug 36330: Follow up, change comments in the DB

This patch updates the comments of course_items.location and
course_items.enabled to say "reserve" instead of "reseve".

To test in ktd:
- sudo koha-mysql kohadev
- Run: "SHOW CREATE TABLE course_items;"
- Verify the comments of "location" and "enabled" contains
  "reseve" instead of "reserve"
- Make a note of the definitions of these two columns
- Run the atomicupdate: "sudo koha-upgrade-schema kohadev"
- Log into the database again and run the same command as above
- Verify the comments now say "reserve" instead of "reseve"
- Make sure the column definitions are otherwise identical to
  the ones you saw before the upgrade. Only the spelling of
  "reserve" in the comment should be changed.

Signed-off-by: David Nind <david@davidnind.com>

Removed unnecessary line of debug output. 2024-06-10 Magnus Enger

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 14 Martin Renvoize 2024-06-13 13:32:50 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant