If you're using project_issue 2.x with IFAC, and you click the delete link on a comment to an issue to delete it, on the confirmation page you get this text:
"Any replies to this comment will be lost. This action cannot be undone."

Since issue comments are always set to be replies to the parent issue and not another comment, this statement is technically accurate, but users may not know this. I think that ideally we would change this text if the comment is to an issue, but I'm not sure if that's possible. I thought I'd bring this up in case anyone cares.

Feel free to 'won't fix' or 'by design' this issue.

Comments

dww’s picture

a) Yes, I do care (a little), since it is misleading and needlessly scary. I only say "a little" since people normally shouldn't be deleting comments, but in cases of spam, etc, it's perfectly legit.

b) It should be east/possible to change this via hook_form_alter(), by seeing if we're 1) on the delete-a-comment confirm form and 2) if the nid in the form (or, worst-case hack, we get the comment id and have to look up which nid it belongs to), and see if that nid points to a project_issue node. A little dprint() debugging in project_issue_form_alter() would quickly reveal what's in that form already and how to get the info we need.

aclight’s picture

It looks like the cid is in the final form because the action points to it (eg. /comment/delete/646154). I'll take a look at some point to see if hook_form_alter() gets the $cid directly or not, but at worse we can just parse out the cid from the action and go from there.

dww’s picture

Assigned: Unassigned » dww

cid isn't really what we want -- we mostly want the nid. Happily, I just looked, and the $form array contains a 'comment' row, which is the $comment object, which itself contains the nid. So, this is easy. I'm rolling a patch right now, i'll post once i'm done testing (a few minutes).

dww’s picture

Status: Active » Needs review
StatusFileSize
new873 bytes

Yup, works like a charm. ;)

dww’s picture

StatusFileSize
new853 bytes

Actually, even better -- no need to stash $nid in a separate variable -- that was a hold-over from while i was dvm()'ing a lot. ;)

aclight’s picture

Untested, but code looks good to me.

hunmonk’s picture

Status: Needs review » Reviewed & tested by the community

code looks good. works as expected.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.