Bug 16289

Summary: Abbreviated formatting for numbering patterns
Product: Koha Reporter: Karl Holten <kholten>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, f.demians, katrin.fischer, kholten, koha, kyle, sandboxes
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 17245    
Attachments: Bug 16289) Abbreviated formatting for numbering patterns
Bug 16289: Abbreviated formatting for numbering patterns
Bug 16289: Abbreviated formatting for numbering patterns
Bug 16289: Refactore code and add tests

Description Karl Holten 2016-04-18 20:15:04 UTC
Our consortium uses abbreviations for our serials formatting. Existing formatting options for numbering patterns use the full month, day and season. Staff would like additional options for abbreviations.

This development would create the option to select three letter abbreviations for:
Day (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
Month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)
Season (Spr, Sum, Fal, Win)
Comment 1 Karl Holten 2016-04-18 20:44:27 UTC Comment hidden (obsolete)
Comment 2 Koha Team University Lyon 3 2016-06-04 14:17:14 UTC
yes, it works as describe. Abbreviated versions are well displayed in the test pattern, according to the day, month, and season.
Comment 3 Biblibre Sandboxes 2016-06-04 14:20:18 UTC
Patch tested with a sandbox, by sonia bouis <sonia.bouis@univ-lyon3.fr>
Comment 4 Biblibre Sandboxes 2016-06-04 14:20:42 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-06-06 19:47:28 UTC
Created attachment 52098 [details] [review]
Bug 16289: Abbreviated formatting for numbering patterns

To test:

1) Go to Serials -> Manage numbering patterns
2) Create .New Numbering Pattern.
3) Type in a name of 'Day, Month, Season' and a numbering formula of '{X} {Y} {Z}'.
4) Set up the X field as following: add 1, every 1, set back to 1, when more than 30.
5) Select the formatting for X. There should be six options available instead of the original three. Use the formatting 'Name of Day (abbreviated)'.
5) Set up the Y field to add 1 every 30 reset back to 1 when more than 12. Use the formatting option 'Name of month (abbreviated)'.
6) Set up the Z field to add 1 every 90 reset back to 1 when more than 4. Use the formatting option 'Name of season (abbreviated)'.
8) Select a frequency of 1/day.
9) Select a first issue publication date of Jan 1, 2016.
10) Set X to begin with 5 and have an inner counter of 5. Set Z to begin with 3 and have an inner counter of 10.
11) Click the 'Test Pattern' button.
12) Abbreviated versions of the day, month and season should appear in the test pattern.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2016-06-06 19:47:33 UTC
Created attachment 52099 [details] [review]
Bug 16289: Refactore code and add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Kyle M Hall 2016-06-10 18:10:41 UTC
Pushed to master for Koha 16.11, thanks Karl, Jonathan!
Comment 8 Frédéric Demians 2016-06-15 07:11:57 UTC
I'm tempted to push this enhancement to 16.05 in order to avoid master/stable code divergence, and since template & code modification seems limited. Any objection from anyone?
Comment 9 Karl Holten 2016-06-15 15:50:14 UTC
No objections here!
Comment 10 Katrin Fischer 2016-07-11 21:51:28 UTC
Looking at this code and some of otherthe code related to seasonal patterns, I believe the abbreviated seasons are not translatable/translated.
Comment 11 Kyle M Hall 2016-07-13 13:18:45 UTC
(In reply to Katrin Fischer from comment #10)
> Looking at this code and some of otherthe code related to seasonal patterns,
> I believe the abbreviated seasons are not translatable/translated.

Can you expand on that? Is this due to us not using localized DateTimes?
Comment 12 Katrin Fischer 2016-07-13 14:11:25 UTC
There is a problem witht he way seasonal translations are generated - it only applies to that I think - months, days etc. should probably be ok. If you take a look at the templates, you might see what I mean.
Comment 13 Katrin Fischer 2016-09-25 08:31:55 UTC
Bug 17245 fixes the problem I meant - thx again Rafal!