I've been trying to adapt the 'tracker' view to my tastes. However, I am missing one crucial feature. Furthermore, I think it's pretty basic so I'm taking the liberty of posting it as a feature request.

When you create a view of nodes, you are offered in the field list 'Node: Last comment author', 'Node: Last comment time' and a few other comment-related fields. All nice and useful, but I see no way to actually create a link to the last comment. The 'Node: New comments' field sort of works if you're only going to use the link once, but if you want a permanent link, it's no good.

So, could we get a 'Node: Last comment view link'? Or perhaps the possibility if turning one of the existing fields into a link?

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

The last comment author and time come from a table called 'node_comment_statistics' that records this for easy lookup; what they don't record, however, is the actual location of the last comment. As such, the link you request is not actually retrievable, at least not easily. It might be retrievable in a difficult manner, but there's not enough benefit to this for me to put a lot of work into such a feature.

Daitaka’s picture

Thank you for your response.

I've filed a feature request for the comment module to store the last comment's cid in the node_comment_statistics table, so I hope to bother you again with this really soon :-)

Anonymous’s picture

I agree, this is really basic, and I was surprised when I realized I couldn't do it.
Is there an update to this in the Dev release possibly?

wuyang’s picture

Version: 6.x-2.0-rc1 » 6.x-2.6

right, I want this also, why not add extra column 'last_comment_cid' for table "node_comment_statistics", as this is the easist way to solve the problem.

Nick Brown’s picture

Status: Closed (won't fix) » Closed (duplicate)
Fogg’s picture

This might be dupe, but the other issue is only for drupal7, we would also like to see this in drupal6.

Any chances for that?

lucidus_neil’s picture

Here might be a way around this issue for drupal 6 people. Though not completely elegant, it serves as a good workaround for me. (In my case, I just wanted the last comment title to populate a field but the same process could likely work for cid). I added a cck field for Last Comment Title to my node type (which, in theory could be added to all node types pretty easily). I then created a rule that uses "Populate field" with the last comment title field on the node upon comment creation with the comment-title-raw. I suspect the same could be used with cid to create a link to the comment.

Ingumsky’s picture

I was really surprised there was no possibility to add a link to last comment in a post when I just started to use drupal back in 2008. 3 years have passed but nothing changed and I'm still puzzled with that... There're few steps to implement this functionality in your code:
1. Get number of (published) comments for a certain node;
2. Get number of comments per page (it can differ from on content type to another);
3. 1+2 = number of pages;
4. Get cid of the last comment;
5. Create a link like /node/[nid]?page=[page]#comment-[cid]
6 Profit!