Closed
Bug 116819
Opened 24 years ago
Closed 23 years ago
Attach and Reassign in one fell swoop
Categories
(Bugzilla :: Creating/Changing Bugs, enhancement, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: jacob, Assigned: gerv)
Details
Attachments
(1 file, 4 obsolete files)
5.41 KB,
patch
|
justdave
:
review+
|
Details | Diff | Splinter Review |
Was talking to timeless this evening and he suggested that one of the options on
the create attachment page should be something along the lines of:
[ ] Reassign this bug to me
as often times when you're attaching a patch, you also want to take ownership of
the bug. I think that this should automatically set the bug's status to
ASSIGNED. And of course, it should only be an option for those with EditBugs
(ie, those that could assign it to themselves anyway).
Updated•23 years ago
|
Target Milestone: --- → Future
Assignee | ||
Comment 2•23 years ago
|
||
Now this _is_ a good idea.
Gerv
Assignee | ||
Comment 3•23 years ago
|
||
This should do the trick. I think this would be a much-used shortcut.
Gerv
Reporter | ||
Comment 4•23 years ago
|
||
The code looks strait forward, but I haven't tested it yet... I'll try to get to
that this evening (don't have time right now).
Assignee: myk → gerv
Target Milestone: Future → Bugzilla 2.18
Comment 5•23 years ago
|
||
Comment on attachment 99751 [details] [diff] [review]
Patch v.1
Oooh, great idea.
>Index: attachment.cgi
>+ SendSQL("SELECT short_desc, assigned_to FROM bugs
>+ WHERE bug_id = $::FORM{'bugid'}");
Nit: avoid line breaks in SQL statements (so they appear nicely in logs).
>+ $vars->{'bugassignee_id'} = $assignee_id;
>+ $vars->{'bugsummary'} = $bugsummary;
Note to self and others: clean up attachment.cgi/pm interfaces.
>+ SendSQL("UPDATE bugs SET assigned_to = $vars->{'user'}{'userid'},
>+ bug_status = 'ASSIGNED', resolution = ''
>+ WHERE bug_id = $::FORM{'bugid'}");
Same nit here.
You are missing the adding of entries to the bugs activity table to reflect
these changes.
>Index: template/en/default/attachment/create.html.tmpl
>+ <th>Reassignment:</th>
>+ <td>
>+ <em>If you want to assign this bug to yourself,
>+ check the box below.</em><br>
>+ <input type="checkbox" id="takebug" name="takebug" value="1">
>+ <label for="takebug">take bug</label>
Nit: "take" is funny when "reassign" was used before, and the whole thing is a
bit wordy, but so is everything else on that form, so I guess it's consistent.
Attachment #99751 -
Flags: review-
Assignee | ||
Comment 6•23 years ago
|
||
Nothing's as simple as it seems, is it? :-) Try this.
Gerv
Attachment #99751 -
Attachment is obsolete: true
Comment 7•23 years ago
|
||
Comment on attachment 100099 [details] [diff] [review]
Patch v.2
Software error:
Undefined subroutine &main::GetSQLData called at
/home/bugzilla/tip/attachment.cgi line 487, <STDIN> line 306.
Attachment #100099 -
Flags: review-
Assignee | ||
Comment 8•23 years ago
|
||
Joel: try this :-)
Gerv
Attachment #100099 -
Attachment is obsolete: true
Assignee | ||
Comment 9•23 years ago
|
||
CCing Joel.
Gerv
Comment 10•23 years ago
|
||
Comment on attachment 102551 [details] [diff] [review]
Patch v.3
>+ # Retrieve the bug summary (for displaying on screen) and assignee.
>+ SendSQL("SELECT short_desc, assigned_to FROM bugs
>+ WHERE bug_id = $::FORM{'bugid'}");
You missed a line-break-in-SQL here, as per myk's nit.
>+ SendSQL("select NOW()");
I forget, what is this for again?
>+ <th>Reassignment:</th>
>+ <td>
>+ <em>If you want to assign this bug to yourself,
>+ check the box below.</em><br>
>+ <input type="checkbox" id="takebug" name="takebug" value="1">
>+ <label for="takebug">take bug</label>
>+ </td>
>+ </tr>
>+ [% END %]
This should really be a single line saying:
[ ] Reassign this bug to me
It's less text on an already busy column, and the text to the checkbox is clear
enough for anybody to understand what it means. Thanks for using label, btw.
The only word I am unsure of is "me", since I'm not sure it is used anywhere
else. But it is better than "you" at any rate.
Attachment #102551 -
Flags: review-
Assignee | ||
Comment 11•23 years ago
|
||
> >+ SendSQL("select NOW()");
>
> I forget, what is this for again?
It's for timestamping the bugs_activity entry.
> This should really be a single line saying:
>
> [ ] Reassign this bug to me
It's done the way it is for consistency with the format of the other things on
that page. As Myk says: "the whole thing is a bit wordy, but so is everything
else on that form, so I guess it's consistent."
New patch this evening.
Gerv
Assignee | ||
Comment 12•23 years ago
|
||
Fixed nit. Looking for r= from kiko.
Gerv
Attachment #102551 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #102622 -
Attachment description: Patch v.1 → Patch v.4
Assignee | ||
Comment 13•23 years ago
|
||
kiko: ping? :-)
Gerv
Comment 14•23 years ago
|
||
Comment on attachment 102622 [details] [diff] [review]
Patch v.4
needs-work: The original assignee is not pushed on the forcecc stack when
calling processmail, so the original assignee never receives mail that the bug
has been taken from them.
Attachment #102622 -
Flags: review-
Comment 15•23 years ago
|
||
other than that this looks and performs beautifully, so if you can fix the
emailing to the original assignee, I think this is good to go.
Comment 16•23 years ago
|
||
I take that back, found one more thing.
The activity table has the user IDs of the old and new assignee instead of their
email address.
Comment 17•23 years ago
|
||
OK, maybe I should have finished testing before I posted. :)
Here's the entire list, for review (including the new stuff I just found) :
1. Original assignee doesn't receive email that they were removed from assigneeship
2. Original and new assignee are listed in the activity log as user IDs instead
of email addresses
3. Old status is |NEW| and new status is |'ASSIGNED'| in the activity log.
Notice the single-quotes around it.
4. Resolution is listed as changing from || to ||. (i.e. it didn't change - but
it's listed in the activity log anyway)
For most of the above reasons (2,3,4) shouldn't we be abstracting out the
activity log code from process_bug.cgi and using the same code from both places
a) to prevent stuff like this, and b) to maintain future compatibility in case
activity logging changes in the future?
Assignee | ||
Comment 18•23 years ago
|
||
I think this fixes all the issues Dave noticed. Yes, the activity logging
should be centralised - but probably when we do everything via a Bug.pm, where
it can all be done behind the scenes when you call $bug->write() :-)
Gerv
Attachment #102622 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #105169 -
Flags: review?(justdave)
Assignee | ||
Updated•23 years ago
|
Priority: -- → P1
Assignee | ||
Comment 20•23 years ago
|
||
Dave: ping? You have a long-standing review request here...
Gerv
Comment 21•23 years ago
|
||
and I had a long-standing deadline to meet yesterday, too. :) I still have a
few loose ends to tie up with that before Friday, so I may or may not get to
this before then (I probably will, not much left on my rush list), but this one
is at the top of my queue, so you're first :)
Comment 22•23 years ago
|
||
Comment on attachment 105169 [details] [diff] [review]
Patch v.5
r= justdave
Everything seems to work now :)
Attachment #105169 -
Flags: review?(justdave) → review+
Assignee | ||
Comment 24•23 years ago
|
||
Fixed.
Checking in attachment.cgi;
/cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v <-- attachment.cgi
new revision: 1.35; previous revision: 1.34
done
Checking in template/en/default/attachment/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/create.html.tmpl,v
<-- create.html.tmpl
new revision: 1.13; previous revision: 1.12
done
Gerv
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•