Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Report Builder - LQE: How can I add Custom Attribute for Creation Date.

 I am able to find Defect Age under Report Builder - RDW using following Custom Expression: 


DAYS(CURRENT DATE)-DAYS($Work Item:Creation Date$)
 

But same does not work under Report Builder - LQE then getting error as below:
 
####################################################################################
 
Your custom expression contains invalid syntax. Review and correct the SPARQL syntax.
 

CRRGW5605E An com.hp.hpl.jena.query.QueryParseException error occurred when validating the input SPARQL string, caused by Lexical error at line 32, column 12. Encountered: "(" (40), after : "S".
 
######################################################################################
 

Can someone provide me complete Custom Expression statement to find Defect Age under LQE? <o:p> </o:p>

Appreciate in advance. 

Thanks
<o:p> </o:p>

0 votes



4 answers

Permanent link

The following custom expression will calculate the difference between the dates:

(xsd:date(now()) - xsd:date($Work Item:Creation Date$))

The results will show a duration in the format documented here:

The result isn't very user-friendly.  It is possible to get the day portion out of the duration, but doing something like this:
but the work item was open for more than a month it will not include the number of months open.

FYI - the SPARQL date/time functions are documented here:
and the xpath functions are documented here:



1 vote


Permanent link

Hi Cherie <o:p> </o:p>

Appreciate your response here. But it returns answer in Alpha-Numeric i.e. P21DT0H0M0S. I am looking answer in Number or Integer which tells me the Age of Defect. <o:p> </o:p>

Can you provide some expression which gives me answer in Integer or Number like DAYS(CURRENT DATE)-DAYS($Work Item:Creation Date$) in RDW which gives answer in Integer / Number.

 Thanks



0 votes


Permanent link
Khalid,

At this point, it is not possible to do this.  The format returning in native SPARQL is this ugly duration format - P21DT0H0M0S.

We are currently in the process of figuring out how to make Report Builder capable of handling this better.

I think the best you could do is to make use of the something like this:
to get an *estimate* of the number of days.  This will not be exact because the above formula is saying that each month has 30 days which is not true.

I hope this helps.

Cherie

0 votes


Permanent link

It did not work but I will be keep trying to explore more options. Appreciate your input.


Thanks

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020
× 360
× 28

Question asked: May 22 '19, 4:22 a.m.

Question was seen: 3,934 times

Last updated: May 31 '19, 11:18 a.m.

Confirmation Cancel Confirm