It's all about the answers!

Ask a question

Is it possible to create queries during runtime using Plan Java client


Karthik Krishnan (8846121163) | asked Mar 07 '13, 5:10 a.m.
edited Mar 07 '13, 5:11 a.m.
I tried executing the (Thanks to @Rschoon for pointers) shared and personal queries 
Now I want to create query during run time, example I want to query with given ID
I am wondering if it's possible to create Queries during runtime via the Plain Java API client.




Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Mar 07 '13, 2:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 Hi Karthik,

As far as I know you can create a query from an expression. See http://rsjazz.wordpress.com/2012/11/19/using-expressions-for-automation/ and you can also save it. There are also some useful comments on the post above or that hat post: http://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/
Karthik Krishnan selected this answer as the correct answer

Comments
Karthik Krishnan commented Mar 08 '13, 9:51 a.m.

 Thanks Ralph, one question though


In your example (http://rsjazz.wordpress.com/2012/11/19/using-expressions-for-automation/ ), how can I get the WorkItemTypeID ? 

Assuming I want to take all defects, how can I find this ID?  I believe this ID is the Type ID


Ralph Schoon commented Mar 08 '13, 10:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi, you look it up in the process configuration of the project.
If you have something like the display name, you would have to use the API to get all available work item types in the API and iterate them to compare the display name with the string you have. 


Karthik Krishnan commented Mar 08 '13, 11:01 a.m.

Thanks Ralph. What I need is to query work items of type "Issue" using the Expressions


1
Ralph Schoon commented Mar 08 '13, 11:13 a.m. | edited Mar 08 '13, 11:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It should be easy enough to open the project area, go to the process configuration tab, find the Configuration Data>Work Items section, select Types and Attributes, select the issue work item and look up the type name like in the picture below. This depends on the process template you use.


Karthik Krishnan commented Mar 08 '13, 11:31 a.m.

 Thanks Ralph. I was trying this programatically with the help of https://jazz.net/forum/questions/93841/how-to-get-workitems-list-of-specific-type


Now after your reply, I am able to get it working.

Many thanks for your time & help


Ralph Schoon commented Mar 08 '13, 11:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Glad you got it working.

showing 5 of 6 show 1 more comments

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.