Bug 24722 - reserves.priority must be NOT NULL
Summary: reserves.priority must be NOT NULL
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 11:05 UTC by Jonathan Druart
Modified: 2020-03-18 10:10 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24722: Enforce NOT NULL constraint on reserves.priority (1.49 KB, patch)
2020-02-25 11:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: Enforce NOT NULL constraint on reserves.priority (1.48 KB, patch)
2020-02-25 11:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: Add test (1.81 KB, patch)
2020-02-25 11:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: DBIC changes (1.32 KB, patch)
2020-02-25 11:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: Enforce NOT NULL constraint on reserves.priority (1.55 KB, patch)
2020-02-25 16:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24722: Add test (1.87 KB, patch)
2020-02-25 16:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24722: DBIC changes (1.38 KB, patch)
2020-02-25 16:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24722: Add atomicupdate file (975 bytes, patch)
2020-02-26 12:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: Enforce NOT NULL constraint on reserves.priority (1.60 KB, patch)
2020-03-16 21:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24722: Add test (1.93 KB, patch)
2020-03-16 21:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24722: DBIC changes (1.44 KB, patch)
2020-03-16 21:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24722: Add atomicupdate file (1.01 KB, patch)
2020-03-16 21:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24722: Same change for old_reserves.priority (2.10 KB, patch)
2020-03-17 08:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: reserves.priority must default to 1 at DB level (3.14 KB, patch)
2020-03-18 10:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24722: reserves.priority must default to 1 at DB level (3.08 KB, patch)
2020-03-18 10:10 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-02-25 11:05:10 UTC
`priority` smallint(6) default NULL
but it cannot be null
Comment 1 Jonathan Druart 2020-02-25 11:08:17 UTC
Created attachment 99572 [details] [review]
Bug 24722: Enforce NOT NULL constraint on reserves.priority

This field is never NULL and must always be equal to an integer.
Comment 2 Jonathan Druart 2020-02-25 11:23:22 UTC
Created attachment 99576 [details] [review]
Bug 24722: Enforce NOT NULL constraint on reserves.priority

This field is never NULL and must always be equal to an integer.
Comment 3 Jonathan Druart 2020-02-25 11:23:25 UTC
Created attachment 99577 [details] [review]
Bug 24722: Add test
Comment 4 Jonathan Druart 2020-02-25 11:26:46 UTC
Created attachment 99578 [details] [review]
Bug 24722: DBIC changes
Comment 5 Martin Renvoize 2020-02-25 16:47:31 UTC
Created attachment 99595 [details] [review]
Bug 24722: Enforce NOT NULL constraint on reserves.priority

This field is never NULL and must always be equal to an integer.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-02-25 16:47:34 UTC
Created attachment 99596 [details] [review]
Bug 24722: Add test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2020-02-25 16:47:37 UTC
Created attachment 99597 [details] [review]
Bug 24722: DBIC changes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2020-02-25 16:49:44 UTC
Good call.. I should have raised that before pushing the bug that fixed the priority not being set for SIP transactions..

Signing off.
Comment 9 Jonathan Druart 2020-02-26 12:21:07 UTC
Created attachment 99642 [details] [review]
Bug 24722: Add atomicupdate file
Comment 10 Katrin Fischer 2020-03-16 21:25:11 UTC
This seems ok. Only wondering: should we be changing old_reserves as well? The table still has:
  `priority` smallint(6) default NULL, -- where in the queue the patron sits
Comment 11 Katrin Fischer 2020-03-16 21:25:53 UTC
Created attachment 100822 [details] [review]
Bug 24722: Enforce NOT NULL constraint on reserves.priority

This field is never NULL and must always be equal to an integer.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2020-03-16 21:25:56 UTC
Created attachment 100823 [details] [review]
Bug 24722: Add test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2020-03-16 21:26:00 UTC
Created attachment 100824 [details] [review]
Bug 24722: DBIC changes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2020-03-16 21:26:03 UTC
Created attachment 100825 [details] [review]
Bug 24722: Add atomicupdate file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Jonathan Druart 2020-03-17 08:04:54 UTC
Created attachment 100860 [details] [review]
Bug 24722: Same change for old_reserves.priority
Comment 16 Jonathan Druart 2020-03-17 08:05:17 UTC
(In reply to Katrin Fischer from comment #10)
> This seems ok. Only wondering: should we be changing old_reserves as well?
> The table still has:
>   `priority` smallint(6) default NULL, -- where in the queue the patron sits

Yes of course, thanks!
Comment 17 Martin Renvoize 2020-03-18 08:40:30 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 18 Jonathan Druart 2020-03-18 10:09:04 UTC
Created attachment 100945 [details] [review]
Bug 24722: reserves.priority must default to 1 at DB level

https://bugs.koha-community.org/show_bug.cgi?id=22821
Comment 19 Jonathan Druart 2020-03-18 10:10:31 UTC
Created attachment 100946 [details] [review]
Bug 24722: reserves.priority must default to 1 at DB level