It's all about the answers!

Ask a question

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


Khalid Shahzad (5012) | asked May 22 '19, 4:22 a.m.
edited May 28 '19, 9:30 a.m. by Muralidhar Rajagopal (10114)

 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>

4 answers



permanent link
Cherie Revells (18111) | answered May 28 '19, 4:46 p.m.
JAZZ DEVELOPER

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:




permanent link
Khalid Shahzad (5012) | answered May 29 '19, 5:40 a.m.

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




permanent link
Cherie Revells (18111) | answered May 30 '19, 1:04 p.m.
JAZZ DEVELOPER
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

permanent link
Khalid Shahzad (5012) | answered May 31 '19, 11:18 a.m.

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


Thanks

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.