trackerService does not handle documentTitle

Description
peterfriedrich
Posts: 40
Joined: Tue Jul 30, 2013 1:08 pm

trackerService does not handle documentTitle

Postby peterfriedrich » Tue Aug 14, 2018 6:51 am

Hi all,
I have a problem that $trackerService.queryWorkItems does not handle documentTilte correct if given as parameter.

I have a WorkItem called "wiStar" and a document "RequDoc NF V4_500".
The search query is: $rootQuery= type:wiStar AND documentTitle:("RequDoc NF V4_500")
The query works fine in WorkItem query on the Polarion Web GUI as well as you provide the query directly into
$trackerService.queryWorkItems( 'type:wiStar AND documentTitle:("RequDoc NF V4_500")', "id").

But if I do it like this, it fails!

#set ($rootQuery = "type:wiStar AND documentTitle:(\"RequDoc NF V4_500\")")
$trackerService.queryWorkItems($rootQuery)

What is the problem ?

Thanks for support in advance.
Peter

rpn
Posts: 23
Joined: Thu Oct 26, 2017 4:08 pm

Re: trackerService does not handle documentTitle

Postby rpn » Wed Aug 15, 2018 9:13 am

I don't know if this is configurable, but if I convert a document-title-query to text it shows as

Code: Select all

document.title:(MyDocumentTitle)

And I can use that without any escaping (even if the title contains spaces) in the trackerService.

By fails, you mean, that no workitems are found by the query, or what fails exactly?
No native speaker, sorry for my bad English.

peterfriedrich
Posts: 40
Joined: Tue Jul 30, 2013 1:08 pm

Re: trackerService does not handle documentTitle

Postby peterfriedrich » Wed Aug 15, 2018 10:21 am

Thanks for reply, rpn.
Fail means that not only the work items which belong to the given documents were found.

The example you mentioned works but in your exampöe the document name does not contain spaces!

In between I figured out that it failes, if the document's name containes one or more spaces in the name (id).

I have several documents which file name starts with "RequDoc NF V".


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 10 guests