Support use of publication pattern templates

Description

Purpose:
In order to make it easier to create publication patterns we will introduce publication pattern templates (note this is completely separate functionality to the label templates that are part of publication patterns.

A publication pattern template will allow for the population of common publication patterns into the system (either via bootstrapping data or expert users creating them) and then allows them to be used to pre-populate all relevant fields when creating a publication pattern.

This story is to support the use of existing publication pattern templates in the UI, and is complementary to a backend user stories (TBA) to support the publication pattern templates.

The publication pattern template record is expected to consist of:

  • Name

  • Description

  • Example label

  • All the publication pattern props

Optional: Although not expected for immediate use, it is proposed that when a publication pattern template is used to create a publication pattern then the publication pattern template ID used could be stored on the publication pattern created.

The primary purpose of having the publication pattern templates is to make it as easy as possible for a user to create a publication pattern for a serial with minimal user input.

User story statement(s):

As a serials librarian
I want to be able to create a publication pattern from an existing template
so that I can easily create a publication pattern for serial record which follows a very standard or common publication pattern

Scenarios:

  1. Scenario:

    • Given the New publication pattern screen OR Edit publication pattern screen OR the Copy and deprecate publication pattern screen

    • When I view the screen

    • Then below the Status / Description fields I see a dropdown option to select a publication pattern template, with a default=”None”, the label “Pattern template (replaces content in the form below with pre-defined values) “ and infopopover with the text “Search for a pattern template name or description. Then select from the filter list to apply the template and fill out the form below with pre-defined values.”

    • Mock-up:

      image-20241203-150648.png

       

    • And I see another field to add a “Label template” (currently named “Template”)

      image-20241203-150923.png
  2. Scenario:

    • Given the publication pattern template dropdown

    • When the cursor is in the field

    • Then a list of available templates is displayed. The information displayed is:

      • Name

      • Description(?is this realistic in a drop down?)

      • Example issue label

      • Mock-up:

        image-20241203-150734.png
  3. Scenario:

    • Given the publication pattern template dropdown

    • When I type into the field

    • Then the list of templates is filtered based on the entered text being present in the name or description properties of the template

  4. Scenario:

    • Given the publication pattern template dropdown

    • When I select a template from the dropdown

    • Then the current publication pattern data is replaced by the data from the template. If there is already data in the New/Edit/Copy and deprecate publication pattern form being used, this will be completely cleared and the data from the publication pattern template will be used instead

Environment

None

Potential Workaround

None

CSP Approved

None

CSP Request Details

None

CSP Rejection Details

None

Attachments

3
  • 03 Dec 2024, 03:15 PM
  • 03 Dec 2024, 03:15 PM
  • 03 Dec 2024, 03:15 PM

Checklist

hide

Activity

Show:

Jack Golding February 4, 2025 at 1:06 PM

Just pushed up a fix to the issue you had within QA 2025-02-04

Owen Stephens February 4, 2025 at 11:49 AM

QA 2025-02-04: On edit or copy & deprecate views, changing the template does re-fill out the form, but the current template in use does not display on in the view so there is no way of knowing which template has been used (or clearing the form by clearing the template)

Owen Stephens January 21, 2025 at 2:37 PM

To create a model ruleset for a monthly publication

POST: to serials-management/modelRulesets endpoint with body:

{ "name": "Monthly/Volume/Issue", "description": "Pattern for a monthly publication with one volume per year and numbered issues with issues labelled using the pattern of year/volume/issue", "exampleLabel": "2024/19/1", "modelRulesetStatus": "Active", "serialRuleset": { "rulesetStatus": { "value": "active" }, "recurrence": { "timeUnit": { "value": "month" }, "period": "1", "rules": [ { "pattern": { "day": "1" }, "ordinal": 1, "patternType": "month_date" } ], "issues": "1" }, "patternType": "month_date", "templateConfig": { "rules": [ { "templateMetadataRuleType": "enumeration", "ruleType": { "templateMetadataRuleFormat": "enumeration_numeric", "ruleFormat": { "levels": [ { "units": "1", "format": { "value": "number" }, "sequence": { "value": "continuous" }, "index": 0 }, { "units": "12", "format": { "value": "number" }, "sequence": { "value": "reset" }, "index": 1 } ] } }, "index": 0 }, { "templateMetadataRuleType": "chronology", "ruleType": { "ruleLocale": "en", "templateMetadataRuleFormat": "chronology_year", "ruleFormat": { "yearFormat": { "value": "full" } } }, "index": 1 } ], "templateString": "{{chronology1.year}}/{{enumeration1.level1}}/{{enumeration1.level2}}" } } }

Jack Golding January 20, 2025 at 12:11 PM

Example POST:

{ "name": "Test", "description": "Test Description", "exampleLabel": " Example label", "modelRulesetStatus": { "value": "active" }, "serialRuleset": { "rulesetStatus": { "value": "active" }, "recurrence": { "timeUnit": { "value": "day" }, "period": "1", "issues": "1", "rules": [ { "ordinal": "1", "pattern": {}, "patternType": "day" } ] }, "templateConfig": { "chronologyRules": [ { "index": 0, "ruleLocale": "en", "templateMetadataRuleFormat": "chronology_month", "ruleFormat": { "monthFormat": { "value": "full" }, "yearFormat": { "value": "full" } } }, { "index": 1, "ruleLocale": "fr", "templateMetadataRuleFormat": "chronology_month", "ruleFormat": { "monthFormat": { "value": "full" }, "yearFormat": { "value": "full" } } }, ], "enumerationRules": [ { "index": 2, "templateMetadataRuleFormat": "enumeration_numeric", "ruleFormat": { "levels": [ { "units": "1", "format": { "value": "number" }, "sequence": { "value": "continuous" }, "index": 0 } ] } }, { "index": 3, "templateMetadataRuleFormat": "enumeration_numeric", "ruleFormat": { "levels": [ { "units": "1", "format": { "value": "number" }, "sequence": { "value": "continuous" }, "index": 0 }, { "units": "5", "format": { "value": "ordinal" }, "sequence": { "value": "reset" }, "index": 1 }, { "units": "5", "format": { "value": "roman" }, "sequence": { "value": "reset" }, "index": 2 } ] } } ], "templateString": "Vol: {{enumeration2.level1}} Iss: {{enumeration2.level2}} {{enumeration1.level1}} {{chronology1.month}} {{chronology1.year}} {{chronology2.month}} {{chronology2.year}}" }, "patternType": "month_date", "owner": { "id": "b7137675-0f33-4f16-8da9-7ebc17c504a3", }, "rulesetNumber": "sm-000000001-7" } }

Jack Golding January 15, 2025 at 11:24 AM

For reference the endpoints used for this will be /serials-management/modelRulesets, with support for GET, POST and DELETE requests, edits made to the rulesets should be done through the original replaceAndDelete/replaceAndDeprecate endpoints

Done

Details

Assignee

Reporter

Priority

Sprint

Development Team

Bienenvolk

Release

Sunflower (R1 2025)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created November 27, 2024 at 4:10 PM
Updated March 4, 2025 at 10:12 AM
Resolved February 17, 2025 at 11:07 AM
TestRail: Cases
TestRail: Runs

Flag notifications