From 30a4049a81926036c7d8bc59c71c8493f57545b6 Mon Sep 17 00:00:00 2001 From: Emma Humphries Date: Wed, 8 Mar 2017 20:58:56 -0800 Subject: Bug 1343845 - bug status summary does not work when logged out Move the block of code which updates the Readable Bug Status field above the point where we return from the anonymous function in the case of no login session. --- extensions/BugModal/web/bug_modal.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'extensions/BugModal/web') diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index 7a608cbe9..27d8eb01b 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -449,6 +449,11 @@ $(function() { $.scrollTo($(this).attr('href').substr(1)); }); + // Update readable bug status + var rbs = $("#readable-bug-status"); + var rbs_text = bugzillaReadableStatus.readable(rbs.data('readable-bug-status')); + rbs.text(rbs_text); + if (BUGZILLA.user.id === 0) return; // @@ -775,9 +780,6 @@ $(function() { var other = $(that.attr('id') == 'dup_id' ? '#bottom-dup_id' : '#dup_id'); other.val(that.val()); }); - var rbs = $("#readable-bug-status"); - var rbs_text = bugzillaReadableStatus.readable(rbs.data('readable-bug-status')); - rbs.text(rbs_text); // add see-also button $('.bug-urls-btn') -- cgit v1.2.3-24-g4f1b