It's all about the answers!

Ask a question

How to check specific type of RTC work item is available in Rational publishing engine.


Anjuri Kelaiya (3732) | asked Jul 31 '19, 9:09 a.m.

 I am using RPE(v2.0.1) and fetching RTC(v 6.0.5)workitems linked with the linktype resolves in the report. There are multiple type of work item exists under linktype resolves for e.g Chore, spike etc. I am filtering work items by querying on the particular "Type" and organizing data in different chapters based on work item type.


Requirement:
Now my requirement is to check the availability of particular work item Type(chore). If specific work item type is present under linktype resolves, fetch the data else mention <There are no specific work item Type>.

Problem:
I have tried using conditions as below.

Query: workitem/workItem/type
Condition: Name == "chore"
Fetch the data
---------------------------------------------------------------->It is fetching data properly

Condition: Name != "chore"
->There are no specific work item type available.
 
In my case second condition should be bypassed if chore is available but it displays "there are no work items" at the end of the report  in that scenario as well.

Please let me know if any other information required. 
Any help would be appreciated.

3 answers



permanent link
Subramanya Prasad Pilar (4.6k16) | answered Aug 05 '19, 2:14 p.m.
Hi Anjuri,

You can use a Text element with Script Expression (without condition):

var nameVal="";
if (name == "chore")
{
    nameVal= name;
}
else if (name != "chore")
{
    nameVal= "There are no specific work item type available.";
}
nameVal;

Comments
Anjuri Kelaiya commented Aug 05 '19, 2:48 p.m.

Thank you for your valuable response Subramanya.


I replicate the same thing in my template without condition but it is not  applying filter on the specific work item type and fetch all the defects, tasks along with the Chore and displays ""There are no specific work item type available." message even if specific type is available.


permanent link
Anjuri Kelaiya (3732) | answered Aug 28 '19, 1:35 a.m.

 Hello Subramanya


I have used  _count variable same as described in sample template %rpe_home%\templates\RTC to get the total count of particular workitem type. based on the total count, I have applied the condition in the container ( _count==0), print  "There are no workitem of specific type" inside text element. It is working as expected. 


permanent link
Lauren Vought (111) | answered Sep 25 '19, 5:56 p.m.
edited Sep 25 '19, 5:57 p.m.
Great stuff i was researching the same question,ill just wait for some answers here. thank you for sharing it.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.