At the end of a long issue that is almost ready to be committed, there are follow-up issues to be created. Could dreditor add a "create follow-up issue" link that would open up a create issue page and fill in some values... like have the same version, project, etc And put a "follow-up to [#nnnn]" in the description? Of course the human has to make a nice title and add more info to the description.

Comments

yesct’s picture

Title: Add a create follow-up issue link which fills in values » Add a create follow-up issue link which fills in values (clone an issue)
attiks’s picture

just testing the patch

attiks’s picture

Assigned: Unassigned » attiks
attiks’s picture

Status: Active » Needs review
StatusFileSize
new3.42 KB
attiks’s picture

StatusFileSize
new3.49 KB
attiks’s picture

StatusFileSize
new4.66 KB

link back added
uses the issue summary

gábor hojtsy’s picture

This is a wonderful suggestion IMHO :) Good for managing followups to big issues.

+++ b/dreditor.user.jsundefined
@@ -2295,6 +2295,42 @@ Drupal.behaviors.dreditorIssuesFilterFormReset = function (context) {
+      var project = $('#edit-project-info-project-title').val();
+      if (project == 'Drupal core') {
+		project = 'drupal';
+	  }
+      var w = window.open('//drupal.org/node/add/project-issue/' + project, '_blank');

Is there some info that is not the title in the page? Most project machine names do not equal their name :/

attiks’s picture

StatusFileSize
new4.61 KB

#7 fixed, thanks for the tip

yesct’s picture

The patch from #6 works great.
To test it (or use it)
git clone --recursive --branch master http://git.drupal.org/project/dreditor.git
cd dreditor
curl -O http://drupal.org/files/i1803622-6.patch
git checkout -b i1803622-6
git apply i1803622-6.patch

then drag that dreditor to the chrome settings (like the dreditor install instructions)

the button

dred-s01-clonebutton-2012-11-05_1956.png

the new issue

dred-s02-filledoutform-2012-11-05_1959.png

yesct’s picture

Status: Needs review » Reviewed & tested by the community

code looks good too.
the patch has some white space changes, but the end of the patch with the new functionality is straightforward.

attiks’s picture

StatusFileSize
new84.68 KB

for easy testing a patched version

yesct’s picture

this has been working really well for me.

sometimes it wont clone (like for this issue: #1903888: Add 'cancellation' check when results reported to qa.d.o) maybe something with a character in the project name?

happy to keep using as is, just adding that info.

larowlan’s picture

Works as advertised!

yesct’s picture

this issue doesn't clone, also has strange project name #493074: Back-link to the commit as a comment on the related issue.

attiks’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.89 KB

#12 + #14 the page is taking too long to load, in the script is a timeout of 3 seconds, attached a new version but needs testing in different browsers.

yesct’s picture

I've been using the new version and its working well. No more blanks . Time out issue might be fixed. ( I didn't try those same issues though).

kristen pol’s picture

Works great! Thanks :) I won't mark RTBC because there is a "needs accessibility review" tag. But... would be awesome if this got in asap.

kristen pol’s picture

Status: Needs review » Needs work

Ok... it would be *great* to have the tags *not* be collapsed because we won't often want to change these and we forget because they are collapsed ;) 3 of us had this issue so far in the sprint today. Thanks!

attiks’s picture

Status: Needs work » Needs review
Issue tags: -Needs accessibility review
StatusFileSize
new2.96 KB

Should work

kristen pol’s picture

Status: Needs review » Reviewed & tested by the community

Yeah! Tested and works great :) Thanks!

yesct’s picture

Status: Reviewed & tested by the community » Needs work

1.

+++ b/dreditor.user.jsundefined
@@ -2320,6 +2320,41 @@ Drupal.behaviors.dreditorIssuesFilterFormReset = function (context) {
+    // Attach a button

need a period at end of sentence.

2.

+++ b/dreditor.user.jsundefined
@@ -2320,6 +2320,41 @@ Drupal.behaviors.dreditorIssuesFilterFormReset = function (context) {
+      // open new window

not a sentence.

I suggest:
// Open a new window.

I found someone at the sprint to make a new patch. Patch coming.

jan-e’s picture

Status: Needs work » Needs review
StatusFileSize
new1.01 KB
new2.96 KB

New patch and interdiff with the suggested changes by YesCT in #21

attiks’s picture

Status: Needs review » Reviewed & tested by the community

#22 Thanks, back to RTBC

yesct’s picture

Status: Reviewed & tested by the community » Needs work

I've been using this and found that I often forget to change the title.
An empty title would be better.

attiks’s picture

#24 I mostly just change the title, maybe we should look into adding settings to dreditor, but I rather do this in a separate issue.

If more people wants the title blanked out, I don't mind changing it.

klonos’s picture

Perhaps prepend "[Follow-up]: " to the title by default

kristen pol’s picture

I think either empty or #26 suggestion for title is fine.

yesct’s picture

Let's go with empty and open a follow-up for personalize settings.

markhalliwell’s picture

Status: Needs work » Needs review
StatusFileSize
new2.36 KB

Removed the prefilled title. Made the page scroll to the fields by using url hash. Focused on title. Removed issue summary since there will be a button for that and is not always needed. Let me know if we need to work on this more or if it's RTBC.

yesct’s picture

does the issue summary template button replace the issue summary, or get appended on the end of it? hmm. I should check.

markhalliwell’s picture

StatusFileSize
new1.34 KB
new2.32 KB

New position of button

yesct’s picture

Assigned: attiks » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new255.94 KB

I like this and it works well.
clone.png

code looks good at quick glance.
If we need another review, please say what we need, otherwise.... rtbc.

yannickoo’s picture

+++ b/dreditor.user.jsundefined
@@ -2715,6 +2715,41 @@ Drupal.behaviors.dreditorIssuesFilterFormReset = function (context) {
+      var w = window.open('//drupal.org/node/add/project-issue/' + project + '#edit-rid-wrapper', '_blank');

Here you are using a protocol relative URL ...

+++ b/dreditor.user.jsundefined
@@ -2715,6 +2715,41 @@ Drupal.behaviors.dreditorIssuesFilterFormReset = function (context) {
+            var matches = window.location.href.match('^https?://drupal.org/node/([0-9]+)');

... and here we have HTTPS only, is there are reason for that? Just asking :)

star-szr’s picture

StatusFileSize
new857 bytes
new1.95 KB

Thanks for taking a look @yannickoo. The RegEx there actually makes the s in https optional by adding a question mark after it.

Making the docblock for this behavior a bit clearer and (hopefully) fixing up indentation - no functional changes.

Tested and working well on Chrome and Firefox.

yannickoo’s picture

We could use HTTPS in every place because drupal.org redirects you automatically to the HTTPS version.

attiks’s picture

#35 We do now, but nobody knows what the future will bring, although I think this will not change, better to support all protocols.

Screenshot looks neat

markhalliwell’s picture

Status: Reviewed & tested by the community » Fixed

I'm happy with #32 and #34.

Thanks everyone! Committed 89418ac :)

Status: Fixed » Closed (fixed)

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