Description
Nick Clemens (kidclamp)
2016-11-23 14:31:26 UTC
Created attachment 65099 [details] [review] Bug 17672 - Items table should have a damaged_on column This patchset adds a 'damaged_on' column to store the date an item is marked damaged, analogous to withdrawn_on and itemlost_on To test: 1 - Apply patch 2 - Mark an item damaged via moredetail.pl (Items tab on left in details) 3 - Note the damaged on date apears below 4 - Unmark the item, the date is removed 5 - Go to the edit items screen (from top bar 'Edit->edit items') 6 - Mark item damaged - check db or moredetails.pl to see damaged_on date 7 - Unmark item damaged - confirm date is removed 8 - prove t/db_dependent/Items.t Created attachment 65100 [details] [review] Bug 17672 - Schema updates I haven't seen how withdrawn_on and itemlost_on behave, but I would think it could be useful to store the date the status was changed no matter what it changed to. Why not store the date if you're setting it to 0? (In reply to Owen Leonard from comment #3) > I haven't seen how withdrawn_on and itemlost_on behave, but I would think it > could be useful to store the date the status was changed no matter what it > changed to. Why not store the date if you're setting it to 0? I think this would be a change in behaviour - currently these or more like the onloan column - info if the criteria is met, blank otherwise. Changing this would impact reports etc. I do think it would be a good change, but should be on a new bug Created attachment 65551 [details] [review] [SIGNED-OFF] Bug 17672 - Items table should have a damaged_on column This patchset adds a 'damaged_on' column to store the date an item is marked damaged, analogous to withdrawn_on and itemlost_on To test: 1 - Apply patch 2 - Mark an item damaged via moredetail.pl (Items tab on left in details) 3 - Note the damaged on date apears below 4 - Unmark the item, the date is removed 5 - Go to the edit items screen (from top bar 'Edit->edit items') 6 - Mark item damaged - check db or moredetails.pl to see damaged_on date 7 - Unmark item damaged - confirm date is removed 8 - prove t/db_dependent/Items.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 65552 [details] [review] [SIGNED-OFF] Bug 17672 - Schema updates Signed-off-by: Owen Leonard <oleonard@myacpl.org> Since we see the date at which the item was damaged on the moredetail.pl, should we also see this information in the header table of the additem.pl page along the status? Just pitching the idea out there. Everything worked fine, though I had to bump up the number of tests from 12 to 13 in order to make it work on the current master. Created attachment 68937 [details] [review] Bug 17672 - Items table should have a damaged_on column This patchset adds a 'damaged_on' column to store the date an item is marked damaged, analogous to withdrawn_on and itemlost_on To test: 1 - Apply patch 2 - Mark an item damaged via moredetail.pl (Items tab on left in details) 3 - Note the damaged on date apears below 4 - Unmark the item, the date is removed 5 - Go to the edit items screen (from top bar 'Edit->edit items') 6 - Mark item damaged - check db or moredetails.pl to see damaged_on date 7 - Unmark item damaged - confirm date is removed 8 - prove t/db_dependent/Items.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Created attachment 68938 [details] [review] Bug 17672 - Schema updates Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Created attachment 68939 [details] [review] Bug 17672 - Dumping Items.t expected tests from 12 to 13 Hi Tomas, started on this one not noticing your QA contact at first then saw it's from December. Grabbing this one :) Created attachment 71912 [details] [review] k Created attachment 71913 [details] [review] Bug 17672: Add damaged_on to items and deleteditems tables This patchset adds a 'damaged_on' column to store the date an item is marked damaged, analogous to withdrawn_on and itemlost_on To test: 1 - Apply patch 2 - Mark an item damaged via moredetail.pl (Items tab on left in details) 3 - Note the damaged on date apears below 4 - Unmark the item, the date is removed 5 - Go to the edit items screen (from top bar 'Edit->edit items') 6 - Mark item damaged - check db or moredetails.pl to see damaged_on date 7 - Unmark item damaged - confirm date is removed 8 - prove t/db_dependent/Items.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 71914 [details] [review] Bug 17672: Fixing Items.t expected tests from 12 to 13 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Works nicely, QA tools and tests pass :) I fixed patch subjects and changed the database update message a little to describe the change. Pushed to master for 18.05, thanks to everybody involved! It broke the misc4dev tools: C4::Installer::load_sql returned the following errors while attempting to load /home/vagrant/misc4dev/data/sql/marc21/1611/after_17196/items.sql: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at /usr/share/perl5/DBIx/RunSQL.pm line 273. (In reply to Jonathan Druart from comment #17) > It broke the misc4dev tools: > C4::Installer::load_sql returned the following errors while attempting to > load /home/vagrant/misc4dev/data/sql/marc21/1611/after_17196/items.sql: > DBD::mysql::st execute failed: Column count doesn't match value count at row > 1 at /usr/share/perl5/DBIx/RunSQL.pm line 273. Doesn't this mean misc4dev needs an update? Not sure what is needed here (In reply to Nick Clemens from comment #18) > (In reply to Jonathan Druart from comment #17) > > It broke the misc4dev tools: > > C4::Installer::load_sql returned the following errors while attempting to > > load /home/vagrant/misc4dev/data/sql/marc21/1611/after_17196/items.sql: > > DBD::mysql::st execute failed: Column count doesn't match value count at row > > 1 at /usr/share/perl5/DBIx/RunSQL.pm line 273. > > Doesn't this mean misc4dev needs an update? Not sure what is needed here I think Jonathan is asking you to provide a fix for misc4dev he. (In reply to Tomás Cohen Arazi from comment #19) > I think Jonathan is asking you to provide a fix for misc4dev he. Nope, I would have asked explicitly in that case :) I let a note here to let you know and added a keyword to not forget. New commit added to misc4dev. commit 05f342d6a850e2a89b2d49a9ce1bcb35c411d787 Fix items.sql since bug 17672 damaged_on has been added and so we must list the columns Enhancement, not backported for 17.11 |