Since issue summary is editable by anyone, and edits are in fact encouraged, we don't want to highlight original issue author on the issue summary itself, for not to tie them to a later state of summary too much. And also for making it more obvious that issue summaries can be edited by anyone.

However, we do want to have a clearly visible historical record of who opened an issue and what was the original state of it. Since comments represent the whole history of changes to the issue, it makes sense to have this record of the starting point as a first comment.

Proposed resolution

When an issue is created, generate an automated comment:

'opened an issue' could also link to the first revision of the issue. This would eliminate the need to keep "Original post by X" section of the issue summary.

Comment should be styled similar to the other automated comments we have e.g. on code commit or test results. There should be no email notification when the comment is created.

CommentFileSizeAuthor
#8 automated-comment.png8.05 KBtvn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Seems like a good idea.

YesCT’s picture

some (old dreditor pattern?) credited the issue creator after | in the commit message. Now that we can change the summary, it is not quite as clear who to credit, but seems related to #2230579: [meta] Allow crediting reviewers (and other non-coders) as first-class contributors

YesCT’s picture

Related issues:
YesCT’s picture

Related issues:

oops.

joshuami’s picture

Issue tags: +drupal.org profile improvements, +d.o issue workflow
YesCT’s picture

YesCT’s picture

something similar got mentioned in #2474609: Not possible to credit people who didn't comment in an issue
that a comment could be automatically made when a committer filled in a field to add people for commit credit purposes...

tvn’s picture

Issue summary: View changes
FileSize
8.05 KB
drumm’s picture

Assigned: Unassigned » drumm
drumm’s picture

Something to work around with this is that _node_revision_access() checks for more than one revision existing. If there is just one revision, the "an issue" link goes to 403. The access check is complex enough, I'm not sure about overriding it.

tvn’s picture

Well technically we don't need to have that link right when the issue is created. The original state of issue summary is right there in front of the reader. Now, when the first (non automatic, actual user) comment happens - we get 2nd revision of the issue and the state of issue summary could be different. That's when it is useful to start showing the link. So can we do something at this time?

E.g. initial "webchick created an issue" comment has no links. When issue is first edited, we inject "See original issue" or some such link after 'webchick created an issue'.

drumm’s picture

Status: Active » Needs review

  • drumm committed 2180175 on 2449489-initial-comment
    Issue #2449489: Automatically generate comment when an issue is created
    
tvn’s picture

Can we change 'See original issue' to 'See original summary'? Too many 'issue' in one line, also the issue is the same, summary changes. Otherwise love it!

  • drumm committed 802281f on 2449489-initial-comment authored by tvn
    Issue #2449489 by tvn: Automatically generate comment when an issue is...
drumm’s picture

Sure, committed that change.

drumm’s picture

Status: Needs review » Fixed
Issue tags: +needs drupal.org deployment

  • drumm committed 2180175 on 7.x-3.x, dev
    Issue #2449489: Automatically generate comment when an issue is created
    
  • drumm committed 802281f on 7.x-3.x, dev authored by tvn
    Issue #2449489 by tvn: Automatically generate comment when an issue is...
drumm’s picture

This will initially double-count the initial comment and the issue posted in the Credit & committing fieldset. The simple way to stop this is to not count the node if it was created after this is deployed to production. Since we don't have that time yet, it will be deployed shortly afterward.

drumm’s picture

Status: Fixed » Needs work

I was developing this with comment render caching turned off. That cache needs to be busted when the initial comment is updated.

  • drumm committed e4846fa on 7.x-3.x, dev
    Issue #2449489: Automatically generate comment when an issue is created...
drumm’s picture

Status: Needs work » Fixed

Updating the comment's changed timestamp is a good way to do that.

drumm’s picture

Status: Fixed » Needs work

Now in production, #2545608: Request for 'confirmed' role. This hit another edge case, the confirm button is showing.

  • drumm committed 2db56e4 on 7.x-3.x, dev
    Issue #2449489: Automatically generate comment when an issue is created...
  • drumm committed d99023f on 7.x-3.x, dev
    Issue #2449489: Automatically generate comment when an issue is created...
drumm’s picture

Status: Needs work » Fixed

That and #19 are ready to deploy.

drumm’s picture

Issue tags: -needs drupal.org deployment

This is all deployed now.

alexpott’s picture

Imo this needs to be rolled back as it is responsible for losing attribution. This comment will be credited to Chapter Three because the last comment I made on d.o was credited to them. I think if I create a new issue the saved attribution will disappear :(

alexpott’s picture

As I expected creating a new issue loses default comment attribution on that issue. I think this should be rolled back as it is new behaviour - #2545886: Provide comment attribution options for the initial automatic issue comment

ciss’s picture

This messes with the reply count, though, as new issues will automatically have 1 reply listed in issue lists. Or is this what #19 referred to?

drumm’s picture

#19 is only about the Credit & committing fieldset.

markhalliwell’s picture

Ironically, this issue was opened to address not being able to see the "new" underneath user pictures for new issues... which this issue didn't actually do (#2446889-15: Display 'new' indicator next to user picture of new users). Half tempted to re-open, but will defer to creating a new issue if that is more desirable.

drumm’s picture

Let's do a followup issue. A mockup would be appreciated - do we keep some of the system-message-like styling, or none of it?

markhalliwell’s picture

Ok, I created #2552835: Improve automatically generated issue creation comment. I don't think a mockup is necessary per se. The comment should just be from the user who originally opened the issue. The system message user does not have the picture or the new/confirm meta information a normal user comment would have (nor would it make sense to include that for the system message I think).

kattekrab’s picture

Can we change "created an issue" to "reported this issue" ?

markhalliwell’s picture

Status: Fixed » Active

Actually this entire issue should be reverted once #2553355: Add "Reported by" and "Created" date to the sidebar on issue pages is in. There is no need to have duplicate information. It also didn't address the original point of this issue.

joshuami’s picture

I still think we need that first comment as mentioned in #2553355: Add "Reported by" and "Created" date to the sidebar on issue pages. It really does give us a good way to quickly confirm a valid user and a way to trigger a comment for issue credits with a small change.

markhalliwell’s picture

It really does give us a good way to quickly confirm a valid user and a way to trigger a comment for issue credits with a small change.

No. That commit list can easily be modified to simply include the OP (issue author/reporter) as an option. We don't have to "rely" on a comment to add this user to the generated list.

drumm’s picture

That commit list can easily be modified to simply include the OP (issue author/reporter) as an option.

Except not volunteer/organization/customer. Those are fields on comments. While those aren't exposed yet, the initial comment does get us closer to being able to fill out the whole credit form when creating an issue.

hestenet’s picture

FWIW the automatically generated comment does also add a quick link to the original issue summary (which IS the actual voice of the reporter) and does so in chronological context. I think that helps preserve the original reporter's voice (which some here find valuable) in a way that's compatible with removing the authored by line so that the summary itself is more easily understood to be collaborative.

markhalliwell’s picture

Except not volunteer/organization/customer. Those are fields on comments.

If the user decides to engage with the issue, they would have the opportunity to change this in the comment yes?

When a user initially creates an issue, they are modifying the issue summary... not a comment. I don't see how determining the "volunteer/organization/customer" status upon issue creation would ever be possible unless the initially issue summary was also the initial comment. That just sounds like a recipe for disaster and confusion.

joshuami’s picture

Including the issue reporter in the credit UI without a comment is not as easy as it would seem. The data model associates credits to comments. To add issue credits without a comment of some sort is going to require quite a bit of rework. To accommodate crediting users that are not involved in the issue thread but contributed (such as a face-to-face conversation at a sprint) will require adding a system comment as well.

@drumm gave this a lot of thought when we were working out a model. Comments were the best way to trace the history of how much participation a person had in the issue.

markhalliwell’s picture

FWIW the automatically generated comment does also add a quick link to the original issue summary

That could easily be added as a link post rendering of the issue summary itself. It is static information and would never change, it doesn't need to be a comment.

tim.plunkett’s picture

The "See original summary." part is awesome. I'd love to keep this feature just for that.

tvn’s picture

I do not think this should be reverted even after adding metadata to the sidebar.

Comment stream represents a history of all changes to the issue / issue summary. Initial state of the summary is a first step and makes total sense to have it as a part of the stream. In addition to that we can use it to make the original reporter a 'proper' participant of the issue as all the commenters by displaying their userpic in that comment, along with the new label and confirm button, their credit attribution, and being able to award them credit even if they never commented on the issue.

To have less clutter we could consider displaying the 'new' label only on this comment and not display it in the sidebar metadata. The pattern for displaying new user status is label below userpic (with the confirm button below if they aren't confirmed yet). Proposed way to display it in the sidebar looks more like new content (e.g. new comment or issue) pattern.

kattekrab’s picture

Can we change "created an issue" to "reported this issue" ?

markhalliwell’s picture

Status: Active » Fixed

@kattekrab, I agree.

I've re-opened #2552835: Improve automatically generated issue creation comment to address follow-ups to this issue. Marking this one as fixed.

Status: Fixed » Closed (fixed)

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

YesCT’s picture

#2580851: no indicator for credit attribution for comments that are automatically generated when an issue is created

we have a bug. attribution for automatic first comment... should be able to be set when opening the issue, or default to nothing.