If you add items when receiving serials the itemnumber is not put in the serial table even though there is a field for it. This field should be populated.
Created attachment 9118 [details] [review] Bug 7718 - itemnumber not populated in the serial table Modify subroutine C4::Serials::AddItem2Serial to not only add a line to serialitems, but also to update the itemnumber in the serial itself.
Assuming this patch is pushed to master, is there any reason we should not phase out the serialitems table?
(In reply to comment #2) > Assuming this patch is pushed to master, is there any reason we should not > phase out the serialitems table? Yes, serials:items is a 1:many relationship. It seems to me that the correct solution here is not to populate serial.itemnumber, but rather to remove it so that no one thinks that they should be using it.
I agree, removing the column instead of filling it is a better solution
Created attachment 15031 [details] [review] Bug 7718 - Remove itemnumber column from serials table Remove the column 'itemnumber' from the table 'serial'. This is a 1 to many relationship, and this reference does not make sense. The 'serialitems' table handles the relationship between the 'items' table and the 'serial' table.
This patch recycles the database upgrade description from another update ("Add IDreamBooks enhanced content") and lacks a test plan.
Created attachment 15071 [details] [review] Bug 7718 - Remove itemnumber column from serials table Remove the column 'itemnumber' from the table 'serial'. This is a 1 to many relationship, and this reference does not make sense. The 'serialitems' table handles the relationship between the 'items' table and the 'serial' table. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Verify serial.itemnumber has been removed from the database
The test plan needs to provide enough information for the tester to confirm that the removal of the column does not break anything.
Created attachment 15073 [details] [review] [SIGNED-OFF] Bug 7718 - Remove itemnumber column from serials table Remove the column 'itemnumber' from the table 'serial'. This is a 1 to many relationship, and this reference does not make sense. The 'serialitems' table handles the relationship between the 'items' table and the 'serial' table. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Verify serial.itemnumber has been removed from the database Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Column removed. No errors.
(In reply to comment #8) > The test plan needs to provide enough information for the tester to confirm > that the removal of the column does not break anything. I did a check. Can't found any SELECT, DELETE or INSERT that references itemnumber column from serial table. But I may be wrong.
QA comment: This patch removes a useless (since the table serialitems exist) column. I agree with Bernardo, I did not find any occurrence of this column. Marked as Passed QA.
Created attachment 18304 [details] [review] Bug 7718 - Remove itemnumber column from serials table Remove the column 'itemnumber' from the table 'serial'. This is a 1 to many relationship, and this reference does not make sense. The 'serialitems' table handles the relationship between the 'items' table and the 'serial' table. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Verify serial.itemnumber has been removed from the database Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Column removed. No errors. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Kyle! As a historical note, the serialitems table was added back in 2008. There was an upgrade concern that apparently prevented serial.itemnumber from being removed at the time that serialitems was added, but the code behind that that used to put a comma-separated list of itemnumbers into serial.itemnumber has long since been removed.
(In reply to comment #3) > Yes, serials:items is a 1:many relationship. It seems to me that the correct > solution here is not to populate serial.itemnumber, but rather to remove it > so that no one thinks that they should be using it. Jared: Could you tell me how I can create more than one item for one serial record? It just looks like a 1:1 relationship. Note that the table name serial is somewhat misleading. It actually is some kind of "subscription item". The relation between calling AddItem2Serial and NewIssue is not very clear in the current Koha code. If this is just 1:1, it would not have been a bad idea to remove the serialitems table? If it is not, I am even more interested.. Thanks.