Done
Details
Assignee
Owen StephensOwen StephensReporter
Owen StephensOwen StephensPriority
TBDSprint
NoneDevelopment Team
BienenvolkRelease
Sunflower (R1 2025)TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Owen Stephens
Owen StephensReporter
Owen Stephens
Owen StephensPriority
Sprint
None
Development Team
Bienenvolk
Release
Sunflower (R1 2025)
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created February 4, 2025 at 3:43 PM
Updated March 12, 2025 at 10:23 AM
Resolved March 12, 2025 at 10:22 AM
Overview:
We currently only store the textual enumeration labels, and not the reference data IDs. This means that when editing/copying and deprecating a publication pattern or using a template to fill out the publication pattern, if there is a textual enumeration the correct pick list and values are not added to the form correctly
To enable us to use the correct pick list and values, the relevant reference data category and reference data value IDs should be stored rather than the reference data labels as currently.
When using the values in the display template, the labels should still be used as currently. Note that when generating predicted pieces from the pattern, then the current labels from the reference data list should be used - so that if there are changes to the labels between setting up a pattern and using the pattern to generate pieces, then the current ones are used
Example scenario:
User sets up new ref data category and values for seasons:
Winter
Spring
Sumer
Autumn
User sets up a publication pattern (4 issues per year) with textual enumeration using these values, one per issue
User generates predicted piece set an notices the typo “Sumer” in the display labels
User corrects value in the reference data list
The existing predicted piece set display labels remain the same
The user generates a new predicted piece set
This new predicted piece set has the correct spelling
Missing refdata value handling
By using the reference data IDs we create a possibility that:
A specific reference data value is deleted when it has already been used in a publication pattern
A reference data category is delete when it has already been used in a publication pattern
We should ensure that:
In the case of existing predicted piece sets, it should still be possible to view these piece sets and use them to create receiving pieces. (the piece set does embed the ruleset, but it is not currently used for either the display or generation). Therefore in these cases we need to handle the absence of a refdata value or category elegantly
In the case of trying to generate predicted pieces, the user should not be able to create predicted pieces using a publication pattern that references a missing or incomplete (missing one or more values) reference data category
On selecting “Generate predicted pieces” the user should be warned via a modal that “The publication pattern contains a textual enumeration with missing values. This must be corrected by editing the publication pattern before predicted pieces can be generated”
In the case of viewing a publication pattern
If a category is missing then in the table of textual enumeration, for each row in the table in the “Label text” column, display the error “Unable to find the pick list used for this enumeration”
If a category is present, but there are values missing, for each row where the value is missing display the error “Unable to find the pick list value used for this enumeration”
In the case of editing/copying a publication pattern
If a value is missing, then the equivalent box in the textual enumeration label in the publication pattern form should still be included, but not populated. All other boxes on the form should fill out as expected
If a category is missing, then none of the boxes in the textual enumeration label publication pattern form that uses that category should be populated - but the boxes can still be displayed (i.e. the current behaviour on editing a publication pattern with a textual enumeration)
In the case of using a ruleset template
same behaviour as with editing/copying a publication pattern
Other info…
For reference only, this issue was originally reported as a bug as follows….
Steps to Reproduce:
Create a publication pattern template that uses a textual enumeration. Model ruleset JSON:
{ "name": "Quarterly with textual enumeration", "description": "Quarterly publication (one issue every three months) with month in the label using a textual enumeration", "exampleLabel": "March 2023", "modelRulesetStatus": "Active", "serialRuleset": { "rulesetStatus": { "value": "active" }, "recurrence": { "timeUnit": { "value": "month" }, "period": "3", "rules": [ { "pattern": { "day": "1" }, "ordinal": "2", "patternType": "month_date" } ], "issues": "1" }, "patternType": "month_date", "templateConfig": { "rules": [ { "templateMetadataRuleType": "enumeration", "ruleType": { "templateMetadataRuleFormat": "enumeration_textual", "ruleFormat": { "levels": [ { "units": "1", "value": "March", "index": 0 }, { "units": "1", "value": "June", "index": 1 }, { "units": "1", "value": "September", "index": 2 }, { "units": "1", "value": "December", "index": 3 } ], "refdataCategory": "Global.Month" } }, "index": 0 } ], "templateString": "{{enumeration1}}" } } }
Use the template to fill out a publication pattern
Expected Results:
The Global.Month refdata category is used as the pick list and the values March, June, September and December are used from that pick list as the textual enumeration labels
Actual Results:
These fields are left blank