When adding a new custom field, a sortkey of 0 is ignored

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Administration
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Frédéric Buclin, Assigned: Max Kanat-Alexander)

Tracking

2.23.3
Bugzilla 3.0

Details

(Whiteboard: [blocker will fix], URL)

(Reporter)

Description

12 years ago
That's because Bugzilla::Field::create_or_update() has:

        $sortkey ||= $dbh->selectrow_array(
            "SELECT MAX(sortkey) + 100 FROM fielddefs") || 100;

So it sees a sortkey of 0 as undefined(?) and chooses another one. I agree to do that if the sortkey is undefined, but not if it's defined and set to 0.
(Assignee)

Comment 1

12 years ago
If we fix this, we should also set the default sortkey on editfields.cgi to blank, instead of 0, so that fields get the default sortkey correctly if the user doesn't set a sortkey.
(Reporter)

Comment 2

12 years ago
mkanat fixed this problem as part of bug 350307. Reassigning to him.
Assignee: administration → mkanat
Depends on: 350307
Whiteboard: [blocker will fix]
(Reporter)

Updated

12 years ago
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.