| Summary: | Add option for 2 digit month to serial patterns | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
| Component: | Serials | Assignee: | Nick Clemens (kidclamp) <nick> |
| Status: | Failed QA --- | QA Contact: | Lisette Scheer <lisette> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | caroline.cyr-la-rose, david, lisette |
| Version: | Main | Keywords: | Manual |
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Crowdfunding committed: | 0 |
| Crowdfunding contact: | Patch complexity: | --- | |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This adds some new placeholders to be used within the numbering pattern of a subscription: {Day2} and {Month2}. They will be automatically replaced with the corresponding 2 digit value derived from the publication date of the issue when its received.
|
Version(s) released in: | |
| Circulation function: | |||
| Bug Depends on: | 35646 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 41387: Add option for 2 digit month to serials
Bug 41387: Add 2 digit day option as well Bug 41387: Add option for 2 digit month to serials Bug 41387: Add 2 digit day option as well |
||
Created attachment 190214 [details] [review] Bug 41387: Add option for 2 digit month to serials To test: 0 - Apply patch 1 - Setup a new numbering pattern Serials->Manage numbering patterns + New numbering pattern 2 - In the numbering formula enter: {X} {Y} {Z} {Year} {Month} {Month2} {Day} {MonthName} {DayName} 3 - Populate X/Y/Z in the table as you wish, these should be unaffected by patch 4 - Set a Frequency / First issue plublication date / Subscription length 5 - Click 'Test pattern' 6 - Confirm the dates in the Number match the publication date values 7 - Try with different frequencies to confirm they match 8 - Save the pattern 9 - Create a new subscription and use the new pattern 10 - Confirm it works as expected Created attachment 190215 [details] [review] Bug 41387: Add 2 digit day option as well While adding 2 digit months, let's add 2 digit days as well. These are necessary to ensure correct sorting, that is the reason for this request To test: 0 - Apply patch 1 - Setup a new numbering pattern Serials->Manage numbering patterns + New numbering pattern 2 - In the numbering formula enter: {X} {Y} {Z} {Year} {Month} {Month2} {Day} {Day2} {MonthName} {DayName} 3 - Populate X/Y/Z in the table as you wish, these should be unaffected by patch 4 - Set a Frequency / First issue plublication date / Subscription length 5 - Click 'Test pattern' 6 - Confirm the dates in the Number match the publication date values 7 - Try with different frequencies to confirm they match 8 - Save the pattern 9 - Create a new subscription and use the new pattern 10 - Confirm it works as expected Created attachment 190274 [details] [review] Bug 41387: Add option for 2 digit month to serials To test: 0 - Apply patch 1 - Setup a new numbering pattern Serials->Manage numbering patterns + New numbering pattern 2 - In the numbering formula enter: {X} {Y} {Z} {Year} {Month} {Month2} {Day} {MonthName} {DayName} 3 - Populate X/Y/Z in the table as you wish, these should be unaffected by patch 4 - Set a Frequency / First issue plublication date / Subscription length 5 - Click 'Test pattern' 6 - Confirm the dates in the Number match the publication date values 7 - Try with different frequencies to confirm they match 8 - Save the pattern 9 - Create a new subscription and use the new pattern 10 - Confirm it works as expected Signed-off-by: David Nind <david@davidnind.com> Created attachment 190275 [details] [review] Bug 41387: Add 2 digit day option as well While adding 2 digit months, let's add 2 digit days as well. These are necessary to ensure correct sorting, that is the reason for this request To test: 0 - Apply patch 1 - Setup a new numbering pattern Serials->Manage numbering patterns + New numbering pattern 2 - In the numbering formula enter: {X} {Y} {Z} {Year} {Month} {Month2} {Day} {Day2} {MonthName} {DayName} 3 - Populate X/Y/Z in the table as you wish, these should be unaffected by patch 4 - Set a Frequency / First issue plublication date / Subscription length 5 - Click 'Test pattern' 6 - Confirm the dates in the Number match the publication date values 7 - Try with different frequencies to confirm they match 8 - Save the pattern 9 - Create a new subscription and use the new pattern 10 - Confirm it works as expected Signed-off-by: David Nind <david@davidnind.com> Tests are failing. There was a merge error as well.
* Proving /kohadevbox/koha/t/db_dependent/Serials.t FAIL
# Failed test 'GetNextSeq correctly calculates numbering from next published date'
# at /kohadevbox/koha/t/db_dependent/Serials.t line 733.
# got: '2026 13 13 Friday 2 02 February'
# expected: '1970 1 01 Sunday 11 11 November'
# Failed test 'GetNextSeq correctly calculates numbering from next published date, leap year'
# at /kohadevbox/koha/t/db_dependent/Serials.t line 740.
# got: '2026 13 13 Friday 2 02 February'
# expected: '2024 29 29 Thursday 2 02 February'
# Looks like you failed 2 tests of 4.
# Failed test 'test numbering pattern with dates in GetSeq GetNextSeq'
# at /kohadevbox/koha/t/db_dependent/Serials.t line 745.
# Looks like you failed 1 test of 65.
|
The manual says: Numbering formula: this is what is used to create the number for each issue. You can use placeholders for up to three variables {X}, {Y}, and {Z} (which can be defined below), as well as predetermined variables: {Day} will be replaced by the date (two digits) {Month} will be replaced by the month number (two digits) {Year} will be replaced by the year (four digits) {DayName} will be replaced by the name of the day of the week https://koha-community.org/manual/23.11/en/html/serials.html#adding-serial-numbering-pattern-label But we actually replace the month with a single digit, we should have an option for 2