restrict queries from com.ibm.team.workitem.query.QueryDescriptor table
I want to Display only epic related queries from the com.ibm.team.workitem.query.QueryDescriptor table in the report parameter.
Say suppose there are 5 queries in the table and out of which 3 are involved with epics and 2 are involved with other other workitems.
Say suppose there are 5 queries in the table and out of which 3 are involved with epics and 2 are involved with other other workitems.
is there any parameter that i can add in for restricting the displaying queries from the table.
One answer
If I'm not mistaken, you're talking about reports when you mention the "table". In this case, I'm afraid you're out of luck (unless someone proves me wrong).
<br>
You use reportable REST API to generate the data source in your reports, and for the particular filter that you want (work item type is task), it is buried in the attribute value and can't be used in filtering. Take the built-in query "Done Tasks" in the JKE Banking sample project, you can get its data by accessing
<br>
https://clm:9443/ccm/rpt/repository/generic?fields=generic/com.ibm.team.workitem.query.QueryDescriptor[name="Done+Tasks"]/*
<br>
and the result is below. The "work item type is task" condition is highlighted, and you can see it's part of the value of attribute <internalExpression>. According to the reportable REST API specification, it appears that when you try to filter on an attribute, such as <internalExpression>, you cannot do "like" (sub string matching). All you can do is "equal", "great than" and etc.
<br>
<blockquote>
<?xml version="1.0" encoding="UTF-8" ?>
<br>
<generic Version="1.0.0" rel="next" href="https://clm:9443/ccm/rpt/repository/generic?fields=generic%2Fcom.ibm.team.workitem.query.QueryDescriptor%5Bname%3D%22Done%20Tasks%22%5D%2F*&id=_B_VcgCRYEeS27JEFFlkqmw&size=100&pos=100">
<br>
<com.ibm.team.workitem.query.QueryDescriptor>
<br>
<name>Done Tasks</name>
<br>
<uniqueId>0f2449091ff66e27df9d42f85a32ddf2</uniqueId>
<br>
<reportableUrl>https://clm:9443/ccm/rpt/repository/generic/com.ibm.team.workitem.query.QueryDescriptor/itemId/_AV_CsGLBEeOj4c1n9GOJ3Q</reportableUrl>
<br>
<itemType>com.ibm.team.workitem.query.QueryDescriptor</itemType>
<br>
<stateId>_AXW7t2LBEeOj4c1n9GOJ3Q</stateId>
<br>
<itemId>_AV_CsGLBEeOj4c1n9GOJ3Q</itemId>
<br>
<contextId>__yFrcGLAEeOj4c1n9GOJ3Q</contextId>
<br>
<modified>2013-12-12T11:04:44.395+1100</modified>
<br>
<mergePredecessor />
<br>
<predecessor />
<br>
<description />
<br>
<b><internalExpression></b><?xml version="1.0" encoding="UTF-8"?><query>< select /><where><and><condition operator="is"><attribute name="projectArea"/><value content="__yFrcGLAEeOj4c1n9GOJ3Q" type="projectArea"/></condition><and><or><b><condition operator="is"><attribute name="workItemType"/><value content="task" type="type"/></condition></b></or><or><condition operator="is"><attribute name="internalState"/><variable arguments="closed" type="state"/></condition></or></and></and></where></query><b></internalExpression> </b>
<br>
<serializationVersion>XML</serializationVersion>
<br>
<queryType>com.ibm.team.workitem.workItemType</queryType>
<br>
<tags />
<br>
<id>com.ibm.team.workitem.queries.predefined.doneTasks</id>
<br>
<internalHasParameters>false</internalHasParameters>
<br>
<modifiedBy />
<br>
<projectArea />
<br>
<creator />
<br>
<internalAssociations />
<br>
<itemHistory />
<br>
</com.ibm.team.workitem.query.QueryDescriptor>
<br>
</generic>
</blockquote>
<br>
You use reportable REST API to generate the data source in your reports, and for the particular filter that you want (work item type is task), it is buried in the attribute value and can't be used in filtering. Take the built-in query "Done Tasks" in the JKE Banking sample project, you can get its data by accessing
<br>
https://clm:9443/ccm/rpt/repository/generic?fields=generic/com.ibm.team.workitem.query.QueryDescriptor[name="Done+Tasks"]/*
<br>
and the result is below. The "work item type is task" condition is highlighted, and you can see it's part of the value of attribute <internalExpression>. According to the reportable REST API specification, it appears that when you try to filter on an attribute, such as <internalExpression>, you cannot do "like" (sub string matching). All you can do is "equal", "great than" and etc.
<br>
<blockquote>
<?xml version="1.0" encoding="UTF-8" ?>
<br>
<generic Version="1.0.0" rel="next" href="https://clm:9443/ccm/rpt/repository/generic?fields=generic%2Fcom.ibm.team.workitem.query.QueryDescriptor%5Bname%3D%22Done%20Tasks%22%5D%2F*&id=_B_VcgCRYEeS27JEFFlkqmw&size=100&pos=100">
<br>
<com.ibm.team.workitem.query.QueryDescriptor>
<br>
<name>Done Tasks</name>
<br>
<uniqueId>0f2449091ff66e27df9d42f85a32ddf2</uniqueId>
<br>
<reportableUrl>https://clm:9443/ccm/rpt/repository/generic/com.ibm.team.workitem.query.QueryDescriptor/itemId/_AV_CsGLBEeOj4c1n9GOJ3Q</reportableUrl>
<br>
<itemType>com.ibm.team.workitem.query.QueryDescriptor</itemType>
<br>
<stateId>_AXW7t2LBEeOj4c1n9GOJ3Q</stateId>
<br>
<itemId>_AV_CsGLBEeOj4c1n9GOJ3Q</itemId>
<br>
<contextId>__yFrcGLAEeOj4c1n9GOJ3Q</contextId>
<br>
<modified>2013-12-12T11:04:44.395+1100</modified>
<br>
<mergePredecessor />
<br>
<predecessor />
<br>
<description />
<br>
<b><internalExpression></b><?xml version="1.0" encoding="UTF-8"?><query>< select /><where><and><condition operator="is"><attribute name="projectArea"/><value content="__yFrcGLAEeOj4c1n9GOJ3Q" type="projectArea"/></condition><and><or><b><condition operator="is"><attribute name="workItemType"/><value content="task" type="type"/></condition></b></or><or><condition operator="is"><attribute name="internalState"/><variable arguments="closed" type="state"/></condition></or></and></and></where></query><b></internalExpression> </b>
<br>
<serializationVersion>XML</serializationVersion>
<br>
<queryType>com.ibm.team.workitem.workItemType</queryType>
<br>
<tags />
<br>
<id>com.ibm.team.workitem.queries.predefined.doneTasks</id>
<br>
<internalHasParameters>false</internalHasParameters>
<br>
<modifiedBy />
<br>
<projectArea />
<br>
<creator />
<br>
<internalAssociations />
<br>
<itemHistory />
<br>
</com.ibm.team.workitem.query.QueryDescriptor>
<br>
</generic>
</blockquote>