Closed Bug 850723 Opened 12 years ago Closed 12 years ago

saved searches on my dashboard disappear from time to time

Categories

(bugzilla.mozilla.org :: MyDashboard, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: dkl)

Details

Attachments

(1 file)

I've added my "releng-release-automation-triage" and "releng-releases-triage" saved searches to my dashboard twice now, and they've disappeared both times. I'm not sure whether it's a time thing, or because I restarted my browser or what...
I am unable to reproduce this myself on production. I am able to use https://bugzilla.mozilla.org/userprefs.cgi?tab=saved-searches to add/remove saved searches and they display properly in the drop down on MyDashboard. I restarted the browser a couple times as extra measure. When you go to the userprefs.cgi page, are the searches still showing the checkbox as checked in the MyDashboard column? Any other specific info you can give? dkl
Flags: needinfo?(bhearsum)
(In reply to David Lawrence [:dkl] from comment #1) > I am unable to reproduce this myself on production. I am able to use > https://bugzilla.mozilla.org/userprefs.cgi?tab=saved-searches to add/remove > saved searches and they display properly in the drop down on MyDashboard. I > restarted the browser a couple times as extra measure. When you go to the > userprefs.cgi page, are the searches still showing the checkbox as checked > in the MyDashboard column? Any other specific info you can give? I can't reproduce this at will, but it just happened to me again this morning - without a browser restart in the middle, too. I'm not sure if it helps, but I get this error when I try to run a saved query that has since disappeared: https://people.mozilla.com/~bhearsum/sattap/d1716aaa.png And here's what my saved queries look like right now: https://people.mozilla.com/~bhearsum/sattap/f7905f44.png Here's exactly what I do: 1) Visit https://bugzilla.mozilla.org/userprefs.cgi?tab=saved-searches 2) Check "My Dashboard" for releng-release-automation-triage and releng-releases-triage 3) Submit the changes to the form 4) Reload "My Dashboard", queries show up and work. 5) Wait for some period of time and they stop working/disappear from My Dashboard.
Flags: needinfo?(bhearsum)
It seems like this happens every single night. Grasping at straws here, but maybe there's a cronjob that's accidentally doing something it shouldn't?
Well, just found out that they disappear more often than once a day. I added them back around 8am PT today and I just noticed now (~12:12 PT) that they're gone again.
the crux of the problem is _in_mydashboard() uses the query creator's user_id, not the current user's the delete foreach include all visible searches, not just the ones the user has created. for these searches, $q->in_mydashboard will be true if the *query creator* has added it, not if the current user has and because the delete code uses $q->user->id, that row will be deleted anytime anyone else updates their saved searches the fixes would be: - change _in_mydashboard to use Bugzilla->user->id - remove @{$user->queries_available} from foreach my $q (@{$user->queries}, @{$user->queries_available}) { - and for clarity: change $q->user->id to $user->id
Assignee: nobody → glob
Assignee: glob → dkl
Feel free to commit if r+ dkl
Attachment #735927 - Flags: review?(glob)
Comment on attachment 735927 [details] [diff] [review] Patch to fix dropped my dashboard queries (v1) r=glob
Attachment #735927 - Flags: review?(glob) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/ modified extensions/MyDashboard/Extension.pm Committed revision 8729.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: