Created On:  11 February 2011


Hierarchy Index field is not sorted in the Requirement_Info table after a Datamart extract. How do I sort the hierarchy Index field in the Requirement_Info table?


To sort the Hierarchy Index field in the Requirement Info table, please download the Java code attached to this incident and the config.txt file.

To run the code we recommend downloading and installing the Eclipse IDE.   The code takes the parameters Server, Username, Password, Project and Baseline from the config.txt.  Edit this txt file and input your server name or ip address, username and password for CaliberRM. 

When inserting the Project name in config.txt please not that if there are any spaces in the project name you must include an astrix (*) in each space.  For example:

"New Caliber Project" should be input into the config.txt file as "New*Caliber*Project".

Insert the baseline that you want to base the Datamart extract on.

You will also need to change the URL in the code so that it references you Microsoft Access Driver.  To ensure the program can access and read this driver you need to open your RMMSA.mdb, select Tools>Security>User and Group Permissions and select MSysObjects from the objects list and give all the permission options.

Firstly run your datamart extract, then run the Java code in eclipse.  The code will create a new table in your MS Access database called "Hierarchy_Index".  The next step is to setup up a query using the RequirementInfo table and Hierarchy_Index table and create a relationship between the Requirement ID's  and sort by Hierarchy_Index Ascending:

You can add all the fields from the RequirementInfo table except the Hierarchy_Index field which you get from the Hierarchy_Index table.  Run this query and the Hierarchy Index field will now be sorted correctly and will correspond to the correct Hierarchy number in the Hierarchy Field.

This issue is planned to be resolved in a future patch however for now you can use the above method as a workaround.
Incident #2498128