cubewise-code / bedrock

Bedrock is TM1 Best Practice assets built from years of TM1 experience
Other
79 stars 74 forks source link

Leaves hierarchy in processes "}bedrock.hier.leaves.orphan.check", "}bedrock.hier.leaves.orphan.check" #416

Closed wimgielis closed 1 month ago

wimgielis commented 1 month ago

Describe the bug The Leaves hierarchy can be given a name in TM1: vALLLEAVESHIERARCHYNAME = CellGetS( '}DimensionProperties', vDimension, 'ALLLEAVESHIERARCHYNAME' );

The 2 processes above contain the hardcoded default name of Leaves.

I only did a quick check, maybe other processes are affected too. At any rate, the word ALLLEAVESHIERARCHYNAME does not exist in the Bedrock repository.

The solution is probably not that hard, something along the lines of: cHierLeaves = CellGetS( '}DimensionProperties', vDimension, 'ALLLEAVESHIERARCHYNAME' ); If( cHierLeaves @= '' ); cHierLeaves = 'Leaves'; EndIf;

lotsaram commented 1 month ago

Hi @wimgielis I think this is an edgy edge case. Although it's possible to set another name for the leaves hierarchy, just as it's possible to set another name as the default hierarchy for a dimension other than the same named hierarchy, I really can't think of any good reason for doing either of these things (unless you are bored and just want to make your life more difficult.) In the v12 bedrock library this process isn't planned to exist as imbalances between the leaves hierarchy and the other hierarchies should be impossible. (Yes it should have been impossible in v11 also, but in v12 the DB simply won't load if it encounteres such an error as opposed to v11 whihc will just ignore it silently.) Also in v12 the }DimensionProperties cube no longer exists and so this check is no longer possible via TI.

wimgielis commented 1 month ago

Okay, agreed. Also for the other topic that was closed.