Commit 3318edcf authored by Matt Tyson's avatar Matt Tyson Committed by Byron Jones

Bug 1036242: "TypeError: bug_status is undefined" when creating a bug

r=glob,a=glob
parent 961fb4f7
...@@ -46,11 +46,15 @@ function validateEnterBug(theform) { ...@@ -46,11 +46,15 @@ function validateEnterBug(theform) {
_errorFor(attach_desc, 'attach_desc'); _errorFor(attach_desc, 'attach_desc');
focus_me = attach_desc; focus_me = attach_desc;
} }
// bug_status can be undefined if the bug_status field is not editable by
// the currently logged in user.
if (bug_status) {
var check_description = status_comment_required[bug_status.value]; var check_description = status_comment_required[bug_status.value];
if (check_description && YAHOO.lang.trim(description.value) == '') { if (check_description && YAHOO.lang.trim(description.value) == '') {
_errorFor(description, 'description'); _errorFor(description, 'description');
focus_me = description; focus_me = description;
} }
}
if (YAHOO.lang.trim(short_desc.value) == '') { if (YAHOO.lang.trim(short_desc.value) == '') {
_errorFor(short_desc); _errorFor(short_desc);
focus_me = short_desc; focus_me = short_desc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment