Problem/Motivation
While discussing organisation of a sprint later this month with xjm we were talking about addition of Issue Summaries
During the conversation I thought that now that we are using BUEditor on drupal.org it would be possible to add a button to insert the Issue Summary code?
Several other core devs in #drupal-contribute seemed to think it was a good idea (webchick, davereid).
xjm: realityloop: that's an interesting thought!
daveried: I would love a BUEditor button for it
webchick: Yeah, tho BUEditor > Dreditor, since it's sitting right there for the clicking as opposed to requiring a browser extension you need to know about.
See also the dreditor issue: https://github.com/dreditor/dreditor/issues/253 which is closed in favor of this issue.
Proposed resolution
- Bring dreditor template button functionality into d.o
- Use the template as the default value for new issues
- (decide if to be done on this issue, or a follow-up) have a setting per project, that defaults to using the ... default template, or a custom template that the maintainers of projects can set. Or, set default value just for core for now?
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#54 | 1393226-54.follow-up.patch | 934 bytes | dww |
#44 | 1393226-44.patch | 2.17 KB | dww |
Issue fork drupalorg-1393226
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
xjmWe have a "bare" summary template at:
http://drupal.org/node/1326662
Comment #1.0
realityloopadded more context
Comment #2
xjmhttp://drupal-association.ideascale.com/a/dtd/Add-issue-summary-template...
Comment #3
dwwThe problem with adding this to bueditor is that it's a button that only makes sense if you're on node/(add|edit) for a project_issue node. That button doesn't make sense on comment bodies, nor book node pages, etc, etc. AFAICT from poking around in the bueditor admin interface, even though we could define separate editors with different sets of buttons, there's no reasonable way to say "only use this editor on node forms for nodes of type foo". You just get a "visibility" fieldset where you can use paths with wildcards.
Searching the bueditor issue queue uncovered this gem: #333583: Editor by content type (warning, it gets ugly). Apparently, there's a hidden way to get this working, after all. However, I don't have time to actually try this myself and verify if it all works as expected. But, if we move forward with this (which seems like a good idea) then I think we're going to want to define a second bueditor definition for issue nodes themselves and add this button there...
Cheers,
-Derek
Comment #4
dwwSee also #962900: Patch to use the editor branch 2 by content type
Comment #5
ufku CreditAttribution: ufku commentedThere are two solutions:
1- Two editors with different path visibility settings
The editor with the issue template button. (
Why the second path)The other (set as alternative editor)
2- Single editor with a conditional PHP button that checks if the current page is an issue page.
Button content:
Comment #6
YesCT CreditAttribution: YesCT commentedare issue summaries going in as part of the D7 upgrade maybe?
Comment #7
dww@YesCT: I'm not sure what you're asking. Please clarify your question. Do you mean a separate summary field on issue nodes on d.o? No, that's not currently slated to happen as part of the D7 upgrade.
Thanks,
-Derek
Comment #8
YesCT CreditAttribution: YesCT commentedWell, we have the issue summaries already. So my question was about having an easy way to get the issue summary template into that.
I thought that this might be being addressed as part of an issue with the D7 upgrade. So I was hoping for an update or a link to another issue.
Would this be best to wait on that upgrade and then try and see how to do this?
Comment #9
dwwIf you want to know how the D7 port of project issue is supposed to work, the best place to read is probably #1545922: [META] Issue page redesign.
No, there's not going to be a separate field for summaries, and there's not going to be a default summary template when you first create a new issue node. I think a bueditor button to inject a default template for folks that want that is still a reasonable idea, could be developed and deployed now, and wouldn't really have to be changed once d.o is upgraded to D7.
Cheers,
-Derek
Comment #10
YesCT CreditAttribution: YesCT commentedThanks Derek. :)
Comment #11
tim.plunkettI proposed #2006256: Configure the default body field on issue node creation to provide the "issue summary template", but was pointed here. I'm not as familiar with BU Editor or how d.o uses it, can someone point me to the repo where our settings/config are?
Comment #12
klonosI don't intent to derail the task of upgrading d.o to D7, but I'd like to take this chance to ask if it was ever considered to move to Spark once the upgrade is done. I'm asking because perhaps then putting effort to doing all this for BU Editor wouldn't make sense. Just saying.
Comment #12.0
klonosquotes from IRC
Comment #13
xjmComment #14
YesCT CreditAttribution: YesCT commentedComment #15
drummWould this work as the default value for the issue summary field?
Comment #16
YesCT CreditAttribution: YesCT commentedoooh. I think so.
[edit:]
A button might still be useful, for when editing old issues and (inserting) updating the issue summary.
Comment #17
drummWe should start exporting project* content types as Features, so we have a place to put this sort of thing in code, including Drupal.org-specific things like this. The patch for this issue should be an exported issue Feature.
Comment #18
YesCT CreditAttribution: YesCT commentedThis issue was submitted to the GSOC project https://groups.drupal.org/node/455978#project32
Comment #19
drummThis was done some time ago. Setting the default value will be straightforward.
Comment #20
YesCT CreditAttribution: YesCT commentedtagging since dreditor has the template buttons and we want to move that to d.o
Comment #21
markhalliwellI have outlined quite a few issues with how Dreditor currently does this and why "fixing" it is going to be problematic: https://github.com/dreditor/dreditor/issues/253#issuecomment-98425848
I would really prefer this be something that is moved over as a native
d.oproject_issue feature. The current mix of using a d.o node as "template" is very hack-ish.Considering that issue summary's are really part of project_issue (or at least any sort of "template" would be) I'm moving it over to that project. I think providing more of a generic "issue template" system that could be easily configurable on any project would be far more preferable (as core and contrib practices differ greatly).
Comment #22
markhalliwellAlso, when I say "issue template" system, I mean that each project should support multiple templates. Core currently has two templates used by Dreditor: Bare issue summary and Drupal 8 beta phase evaluation template.
Comment #23
YesCT CreditAttribution: YesCT commentedupdating the summary with the issue summary template. heh. using dreditor. heh.
Comment #24
YesCT CreditAttribution: YesCT commentedadding note about per project setting to the summary
Comment #25
clemens.tolboomTrying to add #1115636: Issue Macros and Templates into dreditor (started on April 4, 2011) that ended into a 'not the perfect solution' rejection. This issue (January 4, 2012) is old too. Why can't we decided to have just A 'working' solution?
In that effort I used (child pages) of https://www.drupal.org/node/1120672 to get to projects which was lame.
This would not much deviate from current Dreditor injection I guess but could do the job.
Comment #26
dwwThis isn't going to work just as a default value for the body field, since we need different templates (or none) for different projects.
Comment #27
clemens.tolboom@dww what would not work with a node type 'template' with entity reference to a project?
https://www.drupal.org/api-d7/node.json?type=project_template&field_project=3060
should do the job I guessComment #28
clemens.tolboomCurrent templates are:
Bare issue summary template
https://www.drupal.org/node/1326662
https://www.drupal.org/api-d7/node/1326662.json
Remaining tasks template
https://www.drupal.org/node/2272209
https://www.drupal.org/api-d7/node/2272209.json
Drupal 8 beta phase evaluation template
https://www.drupal.org/node/2373483
https://www.drupal.org/api-d7/node/2373483.json
Comment #29
dwwI just meant in terms of fixing this issue by means of a patch to the Feature module that defines our project_issue node type on d.o directly via the core Field API settings for this field instance. Surely we can form_alter() the node form and provide a #default_value by dereferencing an entity reference on the corresponding project node. I'm just saying this will require custom code, not merely Field API settings.
Anyway, the closer this comes to reality, the more sure I am that it isn't something project_issue itself wants to be in the business of providing. Project_issue is already complex enough (and then some). I don't see any reason to make this any harder by trying to make it generic enough to satisfy other possible audiences of this module. If people are really excited about this, let's find a reasonable way to support it on d.o. If it turns out to be generally useful and other people want something similar, we can use the lessons learned and perhaps generalize it later.
Thanks,
-Derek
Comment #30
joshuamiI'm tagging this to show up in related work. I agree that we could role this as a D.o specific feature.
Comment #31
drummDo we want the same template all the time? In my experience for the drupalorg project, the template is a bit too heavy, and could use a link to https://www.drupal.org/node/1018084 and a deployment section.
The template could be a field on projects, like the list of components. Then the issue body would default to the value of the project's field.
Comment #32
tvn CreditAttribution: tvn at Drupal Association commentedWe definitely do not. Indeed, the core template is often not too helpful for Drupal.org specific issues. Even between D.o issues - D.o customizations, Webmasters and Content could use quite different templates. Field on projects sounds good. Now some of the projects could use different templates per Component or Category, but that adds complexity..
Comment #33
YesCT CreditAttribution: YesCT commentedper project template (with a sane default) would be great!
(and per project settings have been asked for on other issues, like response templates, and the issue about the needs tags/meta data which for a while was bubbling up suggested/official tags. so that would be a nice pattern to get established.
Comment #34
markhalliwellFYI, this issue needs to get flushed out and implemented on d.o relatively soon.
Firefox is/will be forcing our hand in Dreditor: https://github.com/unicorn-fail/dreditor/issues/256.
I have made the decision to simply remove the Issue Summary templates in Dreditor all together instead of trying to keep this weird relationship between d.o stored templates and Dreditor injection: https://github.com/unicorn-fail/dreditor/issues/262.
Comment #35
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commentedComment #36
markhalliwellIt appears CKE will be providing these templates now...
Now all we really needs is field(s) on a project that can store these templates to be injected into CKE.
Comment #37
mpp CreditAttribution: mpp at AmeXio commentedIf I may propose two suggestions here:
Comment #38
dww"Bump". ;) This bubbled back up to the top of my consciousness since a recent change broke the 'Insert template' Dreditor button and now my life is miserable again. I looked at trying to add a 'Template' BUEditor button (before re-finding this issue) and now see that 8-years-ago-me was right and nothing's changed in the meanwhile. So I don't think that's going to be a good solution on its own.
We've got 1000s of issues without a proper summary, so we don't just need this when creating new issues. The dreditor functionality to be able to insert the template into an existing issue is golden.
Yes, the exact templates could be customized across projects. That's be slick. But anything is better than nothing. I'd be happy with a not-quite-perfect template that you have to remove a few things from, if that's the best we can do in a reasonable timeframe.
Comment #39
mpp CreditAttribution: mpp at AmeXio commentedA lot of time has passed indeed and while nothing changed on the d.o issue queue a lot has changed with regards to open source project management.
Shouldn't we focus on moving towards a system that is more suited to manage issues?
I'd love to use gitlab issues, they offer templates.
Comment #40
dwwThis topic came up in #3157348: Meeting of the Bug Smash Initiative 2020-07-21 just now. We have a lot of bug reports without steps to reproduce. I suggested instead of more complex bespoke weirdness, we could simply use the core 'default value' feature of the body field on issue nodes so all new issues start life with a proper issue summary template. I thought I'd need to propose it here as an alternate, simple initial fix. Then I saw it's already mentioned in the summary:
So, as a bare minimum, let's start there. ;) We can patch the feature that defines our issue node type and already have an improvement. Let's not have perfect be the enemy of better.
Thanks,
-Derek
Comment #41
g-brodieiI'd like to support this method on adding a default template value to the issue summary mentioned by @dww above on #40 as well, for its simplicity and may be helpful in decreasing misinformation issues in the future.
Comment #42
Kristen Pol+1000 :)
See also my old issue for adding steps to reproduce:
#2281761: Add "Steps to reproduce" section to "Bare issue summary template" for dreditor and default value for new issues
Comment #43
dwwThis incorporates the latest from #2281761: Add "Steps to reproduce" section to "Bare issue summary template" for dreditor and default value for new issues, too.
I made this patch on https://project-drupal.dev.devdrupal.org if anyone wants to try it there:
https://project-drupal.dev.devdrupal.org/node/add/project-issue/drupal
I notice we can probably remove the middle sentence from this help text, too:
Comment #44
dwwLike so.
Comment #45
quietone CreditAttribution: quietone as a volunteer commentedI would really like the template to be the default. It is something we can do now and get immediate benefit.
+1
Comment #46
alexpottYes please - it's really annoying that Dreditor's insert template button is broken and this is a better solution that will not be as fragile.
Comment #49
drummThis is now deployed on Drupal.org.
Comment #50
Kristen PolHurray!!! Thanks everyone. :)
Comment #51
dwwFantastic, thanks!
I opened #3161070: Provide mechanism for per-project default issue summary templates to address the lingering concerns about per-project templates. RFC there for the proposed resolution. If folks are happy, should be pretty easy to get that working, too.
Cheers,
-Derek
Comment #52
jhodgdonThis may need a bit of a tweak. After the commit, the default message at the top of the node/add/project-issue page says:
t('Learn <a href="/node/3156235">how to report an issue</a>. Others can also change the summary.'
This is a bit confusing, because the part about using the issue summary template was taken out, so the "Others can also change the summary" kind of doesn't make sense?
Comment #53
jhodgdonMaybe just take out the "Others can also change the summary" bit? The link goes to this page now:
https://www.drupal.org/community/contributor-guide/reference-information...
and it gives info about all of the issue fields, including the summary...
Comment #54
dww#53 makes great sense to me.
Comment #55
jhodgdon+1. OK, technically I didn't test it, but it looks right to me.
Comment #57
dwwCool. Committed and pushed to 7.x-3.x. Needs deployment.
Thanks,
-Derek
Comment #58
drummThat’s now deployed, too.
Comment #59
dwwGreat, thanks again!
-Derek