Closed Bug 504467 Opened 11 years ago Closed 10 years ago

When filing a bug without a template, bmo's custom "flags" should select "---" rather than the first value

Categories

(bugzilla.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dveditz, Unassigned)

References

(Depends on 1 open bug)

Details

For people who can set the custom blocking1.9.1 flag, the default value on a new bug is "needed" instead of "---".
Sam, if you're wondering why there are so many "needed" bugs to triage this might be why :-)
Blocks: 502769
The Thunderbird bugs in the needed list are certainly victims of this bug. Argh.
I can't reproduce this...
STR

1. https://bugzilla.mozilla.org/enter_bug.cgi?product=Core

if you're in the group that can set "needed" then blocking1.9.1 will be "needed" instead of "---"
This is just a bug with custom fields in general.
Assignee: nobody → create-and-change
No longer blocks: 502769
Component: Bugzilla: Other b.m.o Issues → Creating/Changing Bugs
OS: Mac OS X → All
Product: mozilla.org → Bugzilla
QA Contact: other-bmo-issues → default-qa
Hardware: x86 → All
Summary: blocking1.9.1 field defaults to "needed" → When filing a bug, custom fields should select the default value rather than the first value
Target Milestone: --- → Bugzilla 3.4
Version: other → 3.2.4
Target Milestone: Bugzilla 3.4 → Bugzilla 3.2
<tbody class="expert_fields">
  [% USE Bugzilla %]

  [% FOREACH field = Bugzilla.active_custom_fields %]
    [% NEXT UNLESS field.enter_bug %]
    [% SET value = ${field.name}.defined ? ${field.name} : "" %]
    <tr>
      [% INCLUDE bug/field.html.tmpl
        bug = default, field = field, value = value, editable = 1,
        value_span = 3 %]
    </tr>
  [% END %]
</tbody>


....

This line doesn't make sense to me:
[% SET value = ${field.name}.defined ? ${field.name} : "" %]

???

Why not just set the value to "---", as that's the default, no?
(In reply to comment #6)
> Why not just set the value to "---", as that's the default, no?

No, custom fields have no default values, see bug 351899. But I agree that '---' should be selected by default anyway. Max?
This is currently intentional, while we don't have default values, so that people can fake their own default values. The right solution here is to implement bug 351899, and let custom fields actually specify defaults.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
(In reply to comment #7)
> (In reply to comment #6)
> > Why not just set the value to "---", as that's the default, no?
> 
> No, custom fields have no default values, see bug 351899. But I agree that
> '---' should be selected by default anyway. Max?

'---' is a required field in custom fields, so that's what I'm calling 'default'. I can't change its name at all.

The issue here is that show_bug.cgi works fine when '---' is not the top value in the sort list, but when enter_bug.cgi is used, the top value ('needed') is selected instead. We shouldn't be doing two separate things.

Also, nobody has yet to explain what the point of this line is:
[% SET value = ${field.name}.defined ? ${field.name} : "" %]
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(In reply to comment #9)
> '---' is a required field in custom fields, so that's what I'm calling
> 'default'. I can't change its name at all.

  That's right, and that's what bug 351899 will fix, so if you want this fixed, you should fix that. I'd rather fix the cause than the symptom.

> The issue here is that show_bug.cgi works fine when '---' is not the top value
> in the sort list,

  That's because it's already been selected.

> Also, nobody has yet to explain what the point of this line is:
> [% SET value = ${field.name}.defined ? ${field.name} : "" %]

  Perhaps some field.names don't have variables associated with them? And if it's not set then TT will continue to use the previous value.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → WONTFIX
Yeah, no.

These fields need to default to '---'.  However that's done doesn't matter, but this bug is still valid until going to enter_bug defaults the fields to ---/whatever.  Otherwise drivers are going to be driven crazy.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
A trivial way to fix this issue yourself is to set '---' with the lowest sortkey (or said differently: when you add new values, give them a higher sortkey).
Okay, this sounds like an issue for the Mozilla developers specific to bmo, so it should go into a different product and component.

To be clear: ANYBODY WHO WANTS THIS FIXED UPSTREAM SHOULD FIX BUG 351899. (This is because many other installations may consider the current behavior to actually be correct.) However, a workaround on bmo for this specific bug should be simple enough.
Assignee: create-and-change → nobody
Component: Creating/Changing Bugs → Bugzilla: Other b.m.o Issues
Product: Bugzilla → mozilla.org
QA Contact: default-qa → other-bmo-issues
Target Milestone: Bugzilla 3.2 → ---
Version: 3.2.4 → other
Summary: When filing a bug, custom fields should select the default value rather than the first value → When filing a bug without a template, bmo's custom "flags" should select "---" rather than the first value
Depends on: 351899
All current custom fields on b.m.o. have "---" set as the value with the lowest sortkey. Therefore, this bug as written is not a problem. As Max has said that the more general upstream fix is bug 351899, this bug is a FIXED (in that, someone must have fixed it by changing some sortkeys).

Gerv
Status: REOPENED → RESOLVED
Closed: 11 years ago10 years ago
Resolution: --- → FIXED
Component: Bugzilla: Other b.m.o Issues → General
Product: mozilla.org → bugzilla.mozilla.org
You need to log in before you can comment on or make changes to this bug.