Closed Bug 1149879 Opened 6 years ago Closed 6 years ago

bug-modal's editmode is broken for users without editbugs (Form field dup_id was not defined)

Categories

(bugzilla.mozilla.org :: User Interface, defect)

Production
x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

Attachments

(1 file, 1 obsolete file)

bug-modal's editmode is broken for users without editbugs.

some of the fields are not rendered correctly (the read-only view is incorrectly removed), and hitting submit results in:

> Form field dup_id was not defined
Attached patch 1149879_1.patch (obsolete) β€” β€” Splinter Review
- always display a "---" placeholder for unset values in edit mode when the user cannot change that field
- add the missing bug->check_can_change_field('resolution' ..) check when building the list of valid resolutions
- fix the hiding of the "duplicate of" elements when the resolution isn't initially visible
Attachment #8586595 - Flags: review?(dkl)
Comment on attachment 8586595 [details] [diff] [review]
1149879_1.patch

Review of attachment 8586595 [details] [diff] [review]:
-----------------------------------------------------------------

Most everything looks fine except one thing I just noticed which may have not been introduced by this issue.

When a bug is already marked RESOLVED/DUPLICATE and I click 'edit', it shows the drop down for status and resolution but still shows the 'Mark as duplicate' instead of the text field with the current duped id. If I then click on 'Mark as duplicate', I see the text field with the current dupe id. This should show by default for bugs already set to DUPLICATE. Can we go ahead and fix this as part this patch or file a new bug?

dkl
Flags: needinfo?(glob)
(In reply to David Lawrence [:dkl] from comment #2)
> When a bug is already marked RESOLVED/DUPLICATE and I click 'edit', it shows
> the drop down for status and resolution but still shows the 'Mark as
> duplicate' instead of the text field with the current duped id. If I then
> click on 'Mark as duplicate', I see the text field with the current dupe id.
> This should show by default for bugs already set to DUPLICATE. Can we go
> ahead and fix this as part this patch or file a new bug?

i'll fix that here, since i'm touching that code anyhow.
Flags: needinfo?(glob)
Attached patch 1149879_2.patch β€” β€” Splinter Review
- fixes duplicate visibility issue which was introduced by the first patch
Attachment #8586595 - Attachment is obsolete: true
Attachment #8586595 - Flags: review?(dkl)
Attachment #8587184 - Flags: review?(dkl)
Comment on attachment 8587184 [details] [diff] [review]
1149879_2.patch

Review of attachment 8587184 [details] [diff] [review]:
-----------------------------------------------------------------

Fixed. r=dkl
Attachment #8587184 - Flags: review?(dkl) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   3c87e9f..50a1473  master -> master
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: User Interface: Modal → User Interface
You need to log in before you can comment on or make changes to this bug.