You can use this business rule to fetch more information of a work item from CLM system such as Rational® Team Concert.
=XPathValueFetcher('CALM link attribute',"URL parameters","XPath expression","Label","true")
| Parameter | Description |
|---|---|
| CALM link attribute | The CALM link attribute that defines the link to a specific project area in a Jazz™ Team Server |
| URL parameters | The URL parameter to query the required work item information. |
| XPath expression | Specify the expression to navigate to the required element and the computation that needs to be done from the value that is retrieved. |
| Label | Specify a string label such as Status or Planned For. The value is retrieved from the expression. |
| true | Displays the last run time of the business rule. |
| run_at | With this parameter, you can determine a specific time to update the business rule. You cannot use both "update_interval=" and "run_at=" at the same time. For the expression "run_at=8,7,3", the business rule runs once a week at 8:00 am, and will start running in three days. The numbers in the parameter represent start_at, days_between_runs, and days_before_first_run. You can customize this parameter according to your need. For example, you can use "run_at=8" that runs the business rule at 8:00 am or "run_at=8,7" that runs business rule once a week at 8:00 am. You can use this parameter for all of the business rules. |
| update_interval | With this parameter, you can
specify the interval between the two runs. For the expression "update_interval=1h",
the interval time between the execution of two business rules is set
to one hour. You can use this parameter for all of the business rules.
Note: You
must set a logical value to this parameter. For example, setting interval
as one second or one minute affects the performance of the product.
|
=XPathValueFetcher('Work Items', "/?oslc_cm.properties=rtc_cm%3Astate%7B*%7D", "//rtc_cm:state/dc:title[text()]", "State", "run_at=1")
=(XPathValueFetcher('Work Items',"/?oslc_cm.properties=rtc_cm%3AprogressTracking%7B*%7D","//oslc_pl:workCompleted[text()]","run_at=1")) / ( 1000*60*60 )
=(XPathValueFetcher('Work Items',"/?oslc_cm.properties=rtc_cm%3AprogressTracking%7B*%7D","//oslc_pl:effortRemaining[text()]","run_at=1")) / ( 1000*60*60 ) + 'Actual Effort'
=XPathValueFetcher('Requirements',"/ds:dataSource/ds:artifact/ds:collaboration/ds:attributes/attribute:objectType/attribute:customAttribute[@attribute:name='Status']/@attribute:literalName","/ds:dataSource/ds:artifact/ds:collaboration/ds:attributes/attribute:objectType/attribute:customAttribute[@attribute:name='Status']/@attribute:literalName, /ds:dataSource/ds:artifact/ds:collaboration/ds:attributes/attribute:objectType/attribute:customAttribute[@attribute:name='Difficulty']/@attribute:literalName","Status, Difficulty","update_interval=3")
=(XPathValueFetcher('Work Items',"/rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.children/?oslc_cm.properties=rtc_cm:timeSpent","sum(//rtc_cm:timeSpent[text()])","run_at=1")) / ( 1000*60*60 )
=(XPathValueFetcher('Work Items',"/rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.children/?oslc_cm.properties=rtc_cm:estimate","sum(//rtc_cm:estimate[text()])","run_at=1")) / ( 1000*60*60 )