From bug 24002: commit 3d3336ed6607d80b72502075ebf9567cf48e1709 Bug 24002: Incorrect DATE value: '00-00-0000' in C4/Serials.pm The changes from this patch are like: - year(IF(serial.publisheddate="00-00-0000",serial.planneddate,serial.publisheddate)) as year, + year(IF(serial.publisheddate IS NULL,serial.publisheddate,serial.planneddate)) as year, This is stilly, if publisheddate is null we do not want to return it. It comes from a wrong copy/paste from the other commits: - ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC"; + ORDER BY IF(publisheddate IS NULL,planneddate,publisheddate) DESC"; ="00-00-0000" vs <>"0000-00-00"
Created attachment 99147 [details] [review] Bug 24677: (bug 24002 follow-up) Incorrect DATE value: '00-00-0000' in C4/Serials.pm Oops, wrong copy/paste here! The column order changes was not expected. From bug 24002: commit 3d3336ed6607d80b72502075ebf9567cf48e1709 Bug 24002: Incorrect DATE value: '00-00-0000' in C4/Serials.pm The changes from this patch are like: - year(IF(serial.publisheddate="00-00-0000",serial.planneddate,serial.publisheddate)) as year, + year(IF(serial.publisheddate IS NULL,serial.publisheddate,serial.planneddate)) as year, This is stilly, if publisheddate is null we do not want to return it. It comes from a wrong copy/paste from the other commits: - ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC"; + ORDER BY IF(publisheddate IS NULL,planneddate,publisheddate) DESC"; ="00-00-0000" vs <>"0000-00-00" Test plan: Eyeball the previous patches from bug 24002 and notice that the changes in the commit listed previously are wrong
Created attachment 99174 [details] [review] Bug 24677: (bug 24002 follow-up) Incorrect DATE value: '00-00-0000' in C4/Serials.pm The patch applies smoothly on master and does what is supposed to do.
Can we get a test plan please?
The serial's year need to be the planneddate if publisheddate is null. The changes is obvious when you read the previous commit and this patch.
Created attachment 99187 [details] Test case Test plan: - receive some back issues (of past years) - see that they are aggregated under current year (i.e. 2020) - apply the patch - check that the attribution of volumes/issues to years is OK now
Ooops, I pushed the followup added to bug 24002 before I realized this one existed. Closing as fixed.
(In reply to Martin Renvoize from comment #6) This needs to be backported. I think we should reopen it for Rmaints.
Reopened and I will alert them to it personally in Monday.
I'll push this to 19.11.x soon. joy (In reply to Martin Renvoize from comment #8) > Reopened and I will alert them to it personally in Monday.
Pushed to 19.11.x branch for 19.11.04
missing dependency for 19.05.x, no backport