Bookmarkable new bug templates do not include estimated hours or alias fields

RESOLVED FIXED in Bugzilla 3.6

Status

()

Bugzilla
Creating/Changing Bugs
--
enhancement
RESOLVED FIXED
13 years ago
8 years ago

People

(Reporter: A. Karl Kornel, Assigned: standard8)

Tracking

2.20
Bugzilla 3.6
Bug Flags:
approval +

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.57
Build Identifier: 

When creating a bookmarkable template of a filled-out new bug form, the Alias and Estimated Time 
fields are not filled in when the template URL is invoked

Reproducible: Always

Steps to Reproduce:
1. In the New Bug page, fill in the alias and estimated time fields with non-default values.  Remember 
the bug as a bookmarkable template.
2. Follow the link returned.
Actual Results:  
Fields were filled in as expected, except for the alias and estimated time fields, which where set to their 
default values.

Expected Results:  
Fields should have been filled in as expected

Yes, I'm aware that the alias field may not have much of a place in a bookmarkable template, however I 
don't know of anything that says "the alias is not included when creating a bookmarkable template".
(Reporter)

Updated

13 years ago
Version: unspecified → 2.20

Comment 1

13 years ago
This seems like an easy fix. I wonder why it was not included in bug 283361 
I looked at the patch in attachment 175356 [details] [diff] [review] but I am not sure how a similar patch would effect the estimated hours field. I do not understand what bugzilla does when that field is not present in the URL. When that field is returned to bugzilla empty bugzilla complains so if it was not in the URL the user would need to manually enter in 0.0 or get an error every time. 

Comment 2

12 years ago
The alias must be unique; having it saved is non-sense. And having a predefined estimated hours field doesn't make much more sense. How can you estimate the time required "by default" without knowing the task you have to do?

Strongly suggesting WONTFIX.
I actually want to have alias support, for the following scenario:

I have a bunch of bugs that I file whenever we take a new localization for Firefox, and I use aliases of the form "fx20-ab-CD" etc in order to find them easily. Now I can automate most of this pretty easily, but I can't set the alias. Which is sad, because it helps me tremendously to actually set the dependencies of the bugs right away.
This does still affect even the latest version so confirming. I can also see why somebody would want both fields predefined in certain cases.
Assignee: query-and-buglist → create-and-change
Status: UNCONFIRMED → NEW
Component: Query/Bug List → Creating/Changing Bugs
Ever confirmed: true
(Assignee)

Comment 5

9 years ago
Created attachment 398375 [details] [diff] [review]
Proposed fix for alias case

I'm most interested in the alias case (I'm have a similar case to Alex in comment 3) - therefore here's the patch for the alias part. I may do the estimated hours, but I'd like to get feedback on this first as it is my first bugzilla patch.

This patch does two things:

1) Enables 'alias' in the list of parameters to be passed to enter_bug.cgi. This means I can create a link such as:

http://path/enter_bug.cgi?short_desc=Tracking bug&alias=Tracker

2) Disables 'alias' being a parameter added to the values for the bookmarkable template.

This will mean that when a user tries to create a bug template, alias won't be saved and hence when they then use that template they won't get a duplicate alias in there. I think this would address the concerns of those that have mentioned it on this bug.

I've run the built in test scripts, and tested this on a local bugzilla and it seems to work fine.
Assignee: create-and-change → bugzilla
Attachment #398375 - Flags: review?(LpSolit)
(Assignee)

Comment 6

9 years ago
Oh, I also excluded the alias from the clone case as I don't think that case should be handled either (due to the requirement for them to be unique).
(Assignee)

Comment 7

9 years ago
Frédéric: ping for review/comment?

Comment 8

9 years ago
Comment on attachment 398375 [details] [diff] [review]
Proposed fix for alias case

>+#                 Mark Banner <bugzilla@standard8.plus.com>

(My personal feeling about the contributors list is that a contributor is someone who made a significant contribution to the file, not just adding a line or two. Now, I think I cannot forbird anyone to add his name to this list when altering a file. But I'm just remembering a "contributor" who fixed a typo in a comment and added his name to the list... I removed his name is that case.)



>Index: post_bug.cgi

>+    # If we're creating a template, there is no point in including the alias
>+    # as that is meant to be unique.
>+    $vars->{'url'} = $cgi->canonicalise_query('token', 'alias');

I think that's exactly what this bug is about, letting you save the alias for further reuse. Here, you are excluding it.



>Index: template/en/default/bug/create/create.html.tmpl

>+      <input name="alias" size="20"
>+             value="[% alias FILTER html %]">

You can write this on a single line.
Attachment #398375 - Flags: review?(LpSolit) → review-

Updated

9 years ago
Severity: normal → enhancement
(Assignee)

Comment 9

9 years ago
(In reply to comment #8)
> >Index: post_bug.cgi
> 
> >+    # If we're creating a template, there is no point in including the alias
> >+    # as that is meant to be unique.
> >+    $vars->{'url'} = $cgi->canonicalise_query('token', 'alias');
> 
> I think that's exactly what this bug is about, letting you save the alias for
> further reuse. Here, you are excluding it.

That was on purpose given the previous discussion on this bug about not allowing alias at all - especially your comment 2. However I've removed it in the updated version of the patch.
(Assignee)

Comment 10

9 years ago
Created attachment 411398 [details] [diff] [review]
Fix alias and estimated hours

Addresses the comments from the previous review and also adds in the estimated hours field to be able to be remembered and cloned.
Attachment #398375 - Attachment is obsolete: true
Attachment #411398 - Flags: review?(LpSolit)

Comment 11

9 years ago
Comment on attachment 411398 [details] [diff] [review]
Fix alias and estimated hours

>Index: enter_bug.cgi

>+# Ensure the estimated time has a default value
>+if (!$vars->{'estimated_time'}) {
>+    $vars->{'estimated_time'} = '0.0';
>+}

This is not needed. post_bug.cgi knows what to do if no time is passed. This must be removed on checkin.


r=LpSolit
Attachment #411398 - Flags: review?(LpSolit) → review+

Updated

9 years ago
Status: NEW → ASSIGNED
Flags: approval+
Target Milestone: --- → Bugzilla 3.6

Comment 12

9 years ago
Checking in enter_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v  <--  enter_bug.cgi
new revision: 1.175; previous revision: 1.174
done
Checking in template/en/default/bug/create/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl,v  <--  create.html.tmpl
new revision: 1.102; previous revision: 1.101
done
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 13

9 years ago
Any reason to not also take this for 3.4?

Comment 14

9 years ago
(In reply to comment #13)
> Any reason to not also take this for 3.4?

Yes, it's an enhancement. :)

Updated

8 years ago
Keywords: relnote

Comment 15

8 years ago
Added to the release notes in bug 547466.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.