Report Builder - LQE: How can I add Custom Attribute for Creation Date.
Khalid Shahzad (50●1●2)
| asked May 22 '19, 4:22 a.m.
edited May 28 '19, 9:30 a.m. by Muralidhar Rajagopal (101●1●4) I am able to find Defect Age under Report Builder - RDW using following Custom Expression:
Appreciate in advance.
|
4 answers
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:
<http://www.w3.org/2005/xpath-functions#days-from-duration>(xsd:date(now()) - xsd:date($Work Item:Creation Date$))
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:
|
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 |
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:
<http://www.w3.org/2005/xpath-functions#months-from-duration>(now() - $Defect:Creation Date$)*30 + <http://www.w3.org/2005/xpath-functions#days-from-duration>(now() - $Defect:Creation Date$)
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
|
It did not work but I will be keep trying to explore more options. Appreciate your input.
Thanks
|
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.