It's all about the answers!

Ask a question

Can we show all comments for a work item in a single report.


Ashok Sonawane (9413) | asked Jun 15 '15, 7:45 a.m.
 Hi All,

When we add a comment attribute in a work item query it shows only last or latest comment in a report..

Is it possible that we can generate all the comments that were added in a work item in a single report in RTC.

Accepted answer


permanent link
Donald Nong (14.4k313) | answered Jul 07 '15, 2:23 a.m.
What "report" do you have in mind? If you are building reports by using the Reportable REST API, you can do it with the following URI. It shows all the comments of work item 67, and commentCount indicates how many comments present.
/ccm/rpt/repository/workitem?fields=workitem/workItem[id=67]/(id|summary|commentCount|comments/*)
Ashok Sonawane selected this answer as the correct answer

Comments
Ashok Sonawane commented Jul 21 '15, 2:57 a.m.

 Hello Donald,


Sorry for late response.

Actully, I run the URI you mentioned in my machine.
ccm/rpt/repository/workitem?fields=workitem/workItem[id=246]/(id|summary|commentCount|comments/*) 

After running, workitem was downloaded to my machine, but I am not able to open that work item.

Can you pls guide me further.

Thanks.


Donald Nong commented Jul 21 '15, 5:06 a.m.

Not sure why you got to "download" the output. The URL should display content in XML format in your browser (IE, Firefox or Chrome). Since it's in XML format, you will need to use other tools, such as RPE, to make it into a pretty and readable "report" format.


Ashok Sonawane commented Jul 24 '15, 4:22 a.m. | edited Jul 24 '15, 4:27 a.m.

 still not able to read that file....


Am able to open it in XML reader...but it is showing blank....why is it so i am not getting


Donald Nong commented Jul 26 '15, 7:51 p.m.

Can't really help any further if you don't give more details of what you're doing, since it works for me without much extra settings.


Ashok Sonawane commented Jul 27 '15, 1:45 a.m.

 Actually.... 

1: I'd added comment atribute in a work item
2: Entered multiple comments
3:Run the simple report in RTC with column 'Comments'

This report shows the latest comment or last comment that was added.
But I want all the comment to be shown,that were added.

Is it possible??


Donald Nong commented Jul 27 '15, 2:26 a.m.

You still did not tell us what "report" it was. But if it was a report based on a work item query, then the answer is no - you can only show the last comment. If you run a work item query with the "comments" attribute added as a column to display, the column title will clearly say "last comment".


Ashok Sonawane commented Jul 31 '15, 1:25 a.m.

 Ohhhh....


Donald, can you pls help me to understand what exactly do you mean by 'Reportable REST API' ?

Thank you.


Ashok Sonawane commented Jul 31 '15, 1:49 a.m.

 Donald,


I tried as you mentioned about Rest API, 
Now, I am able to see all the comments with the work item,but in XML format.

How can I fetch all the comments(only), in report format.

Thank You.


Donald Nong commented Jul 31 '15, 2:30 a.m. | edited Jul 31 '15, 2:31 a.m.

If you just want comments only, change the field selection from "(id|summary|commentCount|comments/) to "(comments/) in the REST URL (in my original answer).
If you want to transform the XML content into a "report" format, you need a separate tool such as Rational Publishing Engine - the browser does not do that.
http://www-03.ibm.com/software/products/en/ratipublengi


Ashok Sonawane commented Jul 31 '15, 2:55 a.m.

 Thank you Donald,


I will try with Rational Publishing Engine and will get back to you.

showing 5 of 10 show 5 more comments

2 other answers



permanent link
Hakki Bozkurt (1631024) | answered Jun 15 '15, 8:25 a.m.

i am searching for you in rtc in this topic:

query give just last comment. but maybe you can try reports menu in rtc.


Comments
Ashok Sonawane commented Jun 16 '15, 1:30 a.m.

 Yes Hakki, Reports in RTC only shows latest comment , but the customer requires to see all the comments in a single report.


Hakki Bozkurt commented Jul 03 '15, 7:25 a.m.

Hi Ashok,

I did more research on this topic. I think its will cover what you want.

please check the linked image. http://prntscr.com/7ob1ib

we see just lastest comment in query b'cas its must be has little area i think.
but can i click "view full result set in printable format" button (top right corner in the page) i can see all comment for each workitems.

I hope its usefull for you. Thanks.


Ashok Sonawane commented Jul 21 '15, 2:44 a.m.

 Yes Hakki.


But it is not meeting with the clients requirement.

Thanks.


permanent link
Mastanaiah Mannem (3410) | answered Dec 09 '15, 5:03 a.m.

Yes we can get whole comments from work item through Query. When exporting query results to CSV then you have to select required fields including with Comment field. It will import all the comments from work item in CSV but it will visible only latest comment if you see on spreadsheet. But if you double click on it then will show the whole comments

Hope this information will help you :)


Comments
Ashok Sonawane commented Dec 09 '15, 5:08 a.m.

 Pls find above selected answer.


Thanks for the reply.

Your answer


Register or to post your answer.