Closed Bug 1149440 Opened 9 years ago Closed 9 years ago

"Can't call method "assigned_to" without a package or object reference" error updating bug when "After changing a bug" is set to "Show next bug in my list"

Categories

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

Production
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gerv, Assigned: glob)

References

()

Details

STR:

* View https://bugzilla.mozilla.org/show_bug.cgi?id=1149400
* Do _not_ click the Edit button
* Type in comment
* Click "needinfo"
* Put the following text in Needinfo box: 
  "arun@mozilla.com, pindivineelreddy@gmail.com, mary@mozilla.com"
* Click Save Changes

Expected: Changes saved and normal web page results
Actual: Changed saved, but error given: "Can't call method "assigned_to" without a package or object reference"

Clicking "Edit" before submitting seems to avoid this, although it's not certain (what happened when I went back and clicked Edit first then resubmitted is that I got a mid-air, which showed me that in fact the change _did_ save, which I wasn't expecting.)

Gerv
Assignee: nobody → glob
the full error points to the B::Bug::is_involved_in_bug() - Can't call method "assigned_to" without a package or object reference at /data/www/bugzilla.mozilla.org/Bugzilla/User.pm line 947

the stack trace shows that it's failing within bug/process/results.html.tmpl, while it's displaying the results the changes (which is why you got the mid-air, the bug was updated).

bug_modal's header does call is_involved_in_bug, but that error indicates that the bug object was not defined, which would have caused all sorts of other issues :|


i cannot reproduce this issue locally, but looking at the code i'm not sure how it's working for me.  digging further...
Summary: "Can't call method "assigned_to" without a package or object reference" error updating bug → "Can't call method "assigned_to" without a package or object reference" error updating bug when "After changing a bug" is set to "Show next bug in my list"
this happens if you have the "After changing a bug" set to "Show next bug in my list", and there's no bug in the list.  it's unrelated to the edit mode toggle, clicking 'save changes' without altering a bug is enough to trigger it.

the fix is to fall back to the default header if there isn't a bug to display.

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   7af541b..49bd70a  master -> master
Status: NEW → RESOLVED
Closed: 9 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.