Closed Bug 357400 Opened 19 years ago Closed 19 years ago

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

Categories

(Bugzilla :: Administration, task)

2.23.3
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: mkanat)

References

()

Details

(Whiteboard: [blocker will fix])

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.
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.
mkanat fixed this problem as part of bug 350307. Reassigning to him.
Assignee: administration → mkanat
Depends on: 350307
Whiteboard: [blocker will fix]
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.