Query for workitems with dedicated linked WI types

Description
gcueppers
Posts: 16
Joined: Tue Feb 26, 2008 2:24 pm
Location: Aachen, Germany
Contact:

Query for workitems with dedicated linked WI types

Postby gcueppers » Tue Sep 06, 2011 10:58 am

Hello,

how is ist possible to query for linkedWorkItems which have a special type?
I want to see all closed issues with resolution=CR but only if a workitem of type changerequest is linked to that issue.

Actually I only found the linkedWorkItems:<WI ID>. Can I add some kind of sub-query like linkedWorkItems:type=changerequest?

Thanks in advance and kind regards,
GUIDO
kind regards,
Guido

SorrowEyes
Posts: 16
Joined: Fri Nov 05, 2010 6:57 pm

Re: Query for workitems with dedicated linked WI types

Postby SorrowEyes » Thu Sep 08, 2011 3:59 pm

I am not quite sure I understand your question.

But, tried the following query string (it is case sensitive):
linkedWorkItems:<WI_ID> AND resolution:CR AND type:changerequest

Polly
Posts: 9
Joined: Wed Jan 05, 2011 10:51 am

Re: Query for workitems with dedicated linked WI types

Postby Polly » Mon Sep 19, 2011 8:36 am

I think this is not possible to do with standard query functionality. But you should be able to do it by using a customized wiki page.

woecki
Posts: 43
Joined: Tue Mar 30, 2010 8:55 am

Re: Query for workitems with dedicated linked WI types

Postby woecki » Thu Sep 22, 2011 6:54 am

agree with polly. as far as i understand what you want to do is a subquery, something we all know from relational database systems. as polarion stores data ... differerently you cannot "join". everytime we had similar requirements we implemented it via a wiki page and some velocity scripting (eg. load all x into array and for each check if there are linked y. pretty render-time-intensive). but if we missed something i would be highly interested to learn :-).
br woecki

gcueppers
Posts: 16
Joined: Tue Feb 26, 2008 2:24 pm
Location: Aachen, Germany
Contact:

Re: Query for workitems with dedicated linked WI types

Postby gcueppers » Thu Sep 22, 2011 8:52 am

Ok, I agree and I know how to implement it in a wiki.

I hoped to have the query result in the {workitems} macro to generate an easy link into the query result for working on the selected items.

Thanks and kind regards,
Guido
kind regards,

Guido

gcueppers
Posts: 16
Joined: Tue Feb 26, 2008 2:24 pm
Location: Aachen, Germany
Contact:

Re: Query for workitems with dedicated linked WI types

Postby gcueppers » Mon Jun 24, 2013 12:08 pm

Is there an update with actual implemented Polarion releases like the SQLquery?
kind regards,

Guido

popelakm
Posts: 2
Joined: Tue Jun 25, 2013 2:47 pm

Re: Query for workitems with dedicated linked WI types

Postby popelakm » Tue Jun 25, 2013 2:50 pm

gcueppers wrote:Is there an update with actual implemented Polarion releases like the SQLquery?


Hi gcueppers,

Polarion now offers a SQL layer that you can use to create a join queries. You can find more about Database here http://almdemo.polarion.com/polarion/sdk//index.html#db and of course feel free to use constructed query in your {workitems} table macros.

Sandro_F
Posts: 19
Joined: Wed Jan 19, 2011 8:40 am

Re: Query for workitems with dedicated linked WI types

Postby Sandro_F » Thu Jun 27, 2013 10:57 am

You can check this extension:

http://extensions.polarion.com/polarion ... ion=PE-550

Regards,
Sandro

gcueppers
Posts: 16
Joined: Tue Feb 26, 2008 2:24 pm
Location: Aachen, Germany
Contact:

Re: Query for workitems with dedicated linked WI types

Postby gcueppers » Thu Jun 27, 2013 11:14 am

Thanks for the tipp. I allready saw the extension. Great idea and great realization.

Nevertheless I am looking for some hints on the adequate SQL statement, because my Polarion Server is hosted and it will take too much time to get a new Extensions installed. My first try was the following, but I do not get the correct results:

Code: Select all

{workitems: sqlQuery=
SELECT
  WI.C_PK
FROM
  WORKITEM WI, PROJECT PRJ
WHERE
  WI.FK_URI_PROJECT = PRJ.C_URI AND
  PRJ.C_ID = 'myproject' AND
  WI.C_TYPE = 'programmingticket' AND
  EXISTS (
    SELECT
      REL.C_PK
    FROM
      WORKITEM REL,
      STRUCT_WORKITEM_LINKEDWORKITEMS LINK
    WHERE
      LINK.FK_URI_WORKITEM = WI.C_URI AND
      LINK.FK_P_WORKITEM = REL.C_PK AND
      REL.C_TYPE = 'release'
)
}


To make sure:
I want to get all WIs (type = programmingticket) which are linked to any WIs (type = release).
What am I doing wrong?

Thanks in advance!
kind regards,

Guido


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 5 guests