Created attachment 170927 [details] Incorrect number on generated issue Discovered while testing Bug 35646 To Replicate 1. Follow Bug 35646 and create a numbering pattern for {MonthName} {Year}. 2. Test the pattern for a 1/month frequency, subscription start date on the first day of the month. See that the numbering pattern increments correctly for the month names and year. 3. Find a serial in the catalog and add a new subscription. 4. On the second page of the subscription configuration, select the numbering pattern for MonthName Year. 5. Test the prediction pattern and see everything increments correctly. 6. Save the subscription. 7. Receive. See the the first issue displays correctly for the month name and year. 8. Mark the issue as arrived and generate the next issue. See the next issue does not have the correct month name and year. (image attached). 9. Mark the next issue Arrived and generate the third issue. The date published and number continue to increment incorrectly. Possibly connected to bug 20653, though this example is not irregular.
Created attachment 171498 [details] [review] Bug 37796: Pass correct publication date when generating the next serial form the serial collection page This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers To test: 1 - On the serial used in previous patch go to 'Serial collection' 2 - Generate next issue 3 - Confirm the numbering is correctly generated after this patch
Created attachment 171499 [details] [review] Bug 37796: Adjust unit tests
Created attachment 171500 [details] [review] Bug 37796: Adjust GetNextSeq unit test file The crux of the change here was adding an extra param to the call, but when it died I had no idea where it did. Taking the liberty to tidy, move to subtests, and add diag
Created attachment 177654 [details] Serial numbering pattern when receiving I tested this and the numbering pattern still seems to be off. When the prediction pattern is tested in the subscription it appears to be correct, but when receiving it is still one month off. I also tested this with a daily subscriptions and the generated issues were one day off. Attached screen shot of the generated issues for the month/year subscription.
We would appreciate any updates on this as well.
I had the same issue as Esther.
Created attachment 185723 [details] [review] Bug 37796: Pass correct publication date when generating the next serial form the serial collection page Before this patch, we pass the previous issue date to generate the next seq - this works for the pattern as we are incrementing. When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers. To test: 0 - Follow the plan to recreate from the initial bug description and recreate 1 - Apply patch 2 - On the serial used in previous patch go to 'Serial collection' 3 - Generate next issue 4 - Confirm the numbering is correctly generated after this patch
Without this patch, the predicted pattern before saving the serial shows the correct month and year values for all expected issues. But after saving the subscription and receiving an issue, the pattern fails to progress correctly. With this patch, the predicted pattern before saving is incorrect, showing the current month and year for all predicted values. However, after saving the subscription and receiving an issue, the pattern DOES progress correctly.
Created attachment 186532 [details] [review] Bug 37796: (follow-up) Correct call in showpredictionpattern.pl
Created attachment 186537 [details] [review] Bug 37796: Pass correct publication date when generating the next serial form the serial collection page Before this patch, we pass the previous issue date to generate the next seq - this works for the pattern as we are incrementing. When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers. To test: 0 - Follow the plan to recreate from the initial bug description and recreate 1 - Apply patch 2 - On the serial used in previous patch go to 'Serial collection' 3 - Generate next issue 4 - Confirm the numbering is correctly generated after this patch Signed-off-by: Wesley Owen <wesleyowen@churchofjesuschrist.org>
Created attachment 186538 [details] [review] Bug 37796: (follow-up) Correct call in showpredictionpattern.pl Signed-off-by: Wesley Owen <wesleyowen@churchofjesuschrist.org>
Looking here
What happens where, is not that trivial in the Serials module.. The commit message says: "When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date" GetNextSeq used planneddate before: - my $dt = dt_from_string($planneddate); + my $dt = dt_from_string($nextpublisheddate); But the planneddate passed was $expected->{publisheddate} coming from the GetNextExpected sub. Which uses: $nextissue->{$_} //= strftime( '%Y-%m-%d', localtime ); Could you please explain how this went wrong previously? The planneddate comes from a date field in the serial table or is defaulted to a ISO date. Wondering if we solve the issue in the right place?
Changing status. Please provide feedback