Adding a patch when filing a bug prevents filling in a requestee (e.g. for review?)

VERIFIED FIXED

Status

()

P1
normal
VERIFIED FIXED
12 years ago
7 years ago

People

(Reporter: bugzilla-mozilla, Assigned: reed)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
To reproduce:
1. Go to https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla
2. Select a component (important!). If a component is already set, select another one.
3. Click add an attachment
4 [review]. Change review to ?
5. Try to fill in a requestee.

Step 5 fails if you've selected a (different) component.

Comment 1

12 years ago
Confirming! Probably it displays the requestee field, but then forgets to remove the "disabled" bit on it.
(Assignee)

Comment 2

12 years ago
Need to replace lines 125-127 of template/en/default/bug/create/create.html.tmpl with:
                // Also hide the requestee field, if it exists.
                inputElement = document.getElementById("requestee_type-" + id).style;
                if (inputElement) inputElement.display = "none";
Assignee: justdave → reed
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED

Comment 3

12 years ago
(In reply to comment #2)
> Need to replace lines 125-127 of
> template/en/default/bug/create/create.html.tmpl with:
>                 // Also hide the requestee field, if it exists.
>                 inputElement = document.getElementById("requestee_type-" +
> id).style;
>                 if (inputElement) inputElement.display = "none";
> 

This looks incorrect to me. If the requestee field doesn't exist, then document.getElementById() is undefined and so you cannot consider its 'style' attribute. You probably have to write:

  inputElement = document.getElementById("requestee_type-" + id);
  if (inputElement) inputElement.style.display = "none";
(Assignee)

Comment 4

12 years ago
You're correct... I hadn't tested it yet (was in the progress of testing).

Should be:
                // Also hide the requestee field, if it exists.
                inputElement = document.getElementById("requestee_type-" + id);
                if (inputElement) inputElement.style.display = "none";
(Assignee)

Comment 5

12 years ago
Created attachment 249974 [details] [diff] [review]
patch - v1

This should fix it.

Comment 6

12 years ago
justdave, could you fix this bug on b.m.o? That's pretty irritating as you have to go back to the attachment page to set the requestee correctly.
Priority: -- → P1
Patch applied in production.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 8

12 years ago
Doesn't work at all. Now no requestee field is displayed at all.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
OK fixed for real now.  There were some inconsistent uses of requesteeField vs requesteeField.parentNode (to get the <span> with the parens).  Straightened those out so the places that meant to get the <span> got the <span> and the places that meant to get the <input> got the <input>, and everything seems hunkydorey.
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → FIXED

Comment 10

12 years ago
Yup! Works fine now. Thanks!
Status: RESOLVED → VERIFIED
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.