bedrock.hier.create.fromattribute process not working properly with default params
nicolasbisurgi opened this issue · 1 comments
nicolasbisurgi commented
Describe the bug
}bedrock.hier.create.fromattribute fails when both pSrcHier and pTgtHier are empty.
These parameters are both flagged as optionals and they both have empty default values. I run the same process with a value inside pTgtHier and it works perfect.
To Reproduce
Steps to reproduce the behavior:
4048 [1c7] INFO 2023-09-07 06:24:57.277 TM1.Process Process "set_virtual_hierarchies" executed by user "Admin"
4048 [1c7] INFO 2023-09-07 06:24:57.278 TM1.Process Process "}bedrock.hier.create.fromattribute" run from process "set_virtual_hierarchies" by user "Admin"
4048 [1c7] INFO 2023-09-07 06:24:57.281 TM1.TILogOutput Process:}bedrock.hier.create.fromattribute run with parameters pDim:location, pSrcHier:, pTgtHier:, pAttr:Region, pTopNode:WorldWide, pPrefix:, pSuffix:, pSkipBlank: 0.000, pUnallocated:Undefined <pAttr>.
4048 [1c7] ERROR 2023-09-07 06:24:57.281 TM1.TILogOutput User:Admin Process:}bedrock.hier.create.fromattribute ErrorMsg:Source and target Herarchy can not be the same
4048 [1c7] ERROR 2023-09-07 06:24:57.281 TM1.Process Process "}bedrock.hier.create.fromattribute": : Execution was aborted by ProcessQuit Function.
4048 [1c7] ERROR 2023-09-07 06:24:57.284 TM1.Process Process "set_virtual_hierarchies": finished executing with errors. Error file: <TM1ProcessError_20230907062457_28104048_set_virtual_hierarchies.log>
Expected behavior
When adding a value for the target hierarchy:
1556 [1c7] INFO 2023-09-07 06:25:54.647 TM1.Process Process "set_virtual_hierarchies" executed by user "Admin"
1556 [1c7] INFO 2023-09-07 06:25:54.648 TM1.Process Process "}bedrock.hier.create.fromattribute" run from process "set_virtual_hierarchies" by user "Admin"
1556 [1c7] INFO 2023-09-07 06:25:54.651 TM1.TILogOutput Process:}bedrock.hier.create.fromattribute run with parameters pDim:location, pSrcHier:, pTgtHier:Region, pAttr:Region, pTopNode:WorldWide, pPrefix:, pSuffix:, pSkipBlank: 0.000, pUnallocated:Undefined <pAttr>.
1556 [1c7] INFO 2023-09-07 06:25:54.662 TM1.TILogOutput Process:}bedrock.hier.create.fromattribute successfully created the Region hierarchy in the location dimension.
1556 [1c7] INFO 2023-09-07 06:25:54.662 TM1.Process Process "}bedrock.hier.create.fromattribute": finished executing normally, elapsed time 0.01 seconds
1556 [1c7] INFO 2023-09-07 06:25:54.662 TM1.Process Process "set_virtual_hierarchies": finished executing normally, elapsed time 0.01 seconds
Screenshots
If applicable, add screenshots to help explain your problem.
Version
- OS: [e.g. Windows Server 2106]
- TM1 Server Version: [e.g. 11.4]
Additional context
Add any other context about the problem here.
lotsaram commented
Agree this is a bug (minor one). Would be fixed by changing
IF( Trim ( pSrcHier ) @= Trim ( pTgtHier ));
to
IF( Trim ( pSrcHier ) @= Trim ( pTgtHier ) & pTgtHier @<>'');