User story #2425
closedUser story #2424: Duplicate identical sections can be input in directives causing broken reporting
Silently drop duplicated identical sections when saving a PI
Description
This is a subtask of #2424, and it's aim is to avoid having several identical sections in a multi-valued sectioned PI. It must be fixed on the 2.3 branch.
Specifications:- When saving a PI in the Scala code of rudder, for each multi-valued section in that PI's PT, check if any two sections contain identical configuration
- Sections containing identical configuration are defined as having all the variables (mandatory and optional) with the same values exactly (case sensitive)
- If any two values of section are identical, silently drop one so that the saved PI has only unique section values
- If an existing PI is saved with no changes compared to the currently saved state, this check should still be performed, to make sure we can easily remove duplicates in existing PI
Updated by François ARMAND over 12 years ago
- Status changed from 2 to In progress
- Assignee changed from Nicolas CHARLES to François ARMAND
Updated by François ARMAND over 12 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
Applied in changeset 3843cbf289be9d29b50ec6936708a1a0d5916973.
Updated by Nicolas CHARLES over 12 years ago
- % Done changed from 100 to 50
Trying this correction on Package management works great, however on download a file from the shared folder, it prevents me from saving a new section (even if it is vastly different, the new one are dropped at savetime)
Updated by François ARMAND over 12 years ago
- Status changed from Pending technical review to In progress
Confirmed.
Updated by François ARMAND over 12 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 50 to 100
Applied in changeset c2f956e0d5728bc537769c6158320021ada56957.
Updated by Nicolas CHARLES over 12 years ago
- Status changed from Pending technical review to 10
This is valid, thank you Francois !
Updated by Jonathan CLARKE over 12 years ago
- Status changed from 10 to Released
This looks good to me.
I note that the type of variables is not taken into account when comparing (ie, the integer 0120 is considered different from the integer 120). But I don't think that this denatures the original purpose of this user story, and I'm told it's not trivial to change :)