Closed Bug 860810 Opened 11 years ago Closed 11 years ago

Add a default search to new users' saved searches that appear in the footer

Categories

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

Production
x86
macOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: lizzard, Assigned: glob)

Details

Attachments

(1 file, 1 obsolete file)

So that new Bugzilla users have an obvious list of bugs to look at right away, without having to navigate the Browse and Search interfaces, I'd like to have a few saved searches show up by default in their footer.  

I suggest

* Bugs Filed Today   
** https://bugzilla.mozilla.org/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=Bugs%20Filed%20Today&sharer_id=159758&list_id=6262495
** This one is nice because it encourages triaging, shows how active Bugzilla is on a daily basis (350-450 bugs, usually) and it shows resolved bugs as well as open ones. 


* Good First Bugs  
** https://bugzilla.mozilla.org/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=[good%20first%20bug]&sharer_id=297995&list_id=6262538
 
* Latest Unconfirmed Firefox Bugs  
** https://bugzilla.mozilla.org/buglist.cgi?list_id=6262633&resolution=---&resolution=DUPLICATE&chfieldto=Now&query_format=advanced&chfieldfrom=-1m&bug_status=UNCONFIRMED&product=Firefox
Would this be solvable by creating these saved searches, sharing them with a default group that every BZ user is a member of anyway, and enabling the checkbox "Show in Footer" on https://bugzilla.wikimedia.org/userprefs.cgi?tab=saved-searches for those queries for every user by default?
Perhaps! But that would add it to everyone's footer and established users might not like to have new things suddenly show up in their own footer.
(In reply to Andre Klapper from comment #1)
> Would this be solvable by creating these saved searches, sharing them with a
> default group that every BZ user is a member of anyway, and enabling the
> checkbox "Show in Footer" on
> https://bugzilla.wikimedia.org/userprefs.cgi?tab=saved-searches for those
> queries for every user by default?

yes, that's exactly what i was thinking :)

(In reply to Liz Henry :lizzard from comment #2)
> Perhaps! But that would add it to everyone's footer and established users
> might not like to have new things suddenly show up in their own footer.

we'd add them to the footer when a user is created (via the object_end_of_create hook).

we should also consider adding them to all users who haven't added any shared-searches to their footer (via a one-once script).


with regards to the searches:

'bugs filed today' .. no issues here

'good first bugs'  .. this only shows firefox, core, and toolkit bugs.  there's a lot of products missing from that list, even if you wanted to limit it to firefox related development (android, metro, b2g).  the title needs to be updated to reflect that it's firefox-specific, and the product list expanded.

'latest unconfirmed firefox bugs' .. i don't see the value in adding this to all users by default, as it's very much specific to people who are interested in doing firefox triage only.


perhaps it would be better to add links to bugsahoy and whatcanidoformozilla to the footer instead (next to the 'privacy policy' link) ?
Let's go with Bugs Filed Today for now.   I'd like for it to go next to the My Bugs link, rather than next to Privacy policy. This will give new users a link to click on right away that results in a list of bugs.
Assignee: nobody → glob
(In reply to Liz Henry :lizzard from comment #4)
> Let's go with Bugs Filed Today for now.   I'd like for it to go next to the
> My Bugs link, rather than next to Privacy policy.

if you want it next to "my bugs" then it'll have to be a namedquery owned by the user, rather than a shared named query.

how it's laid out is:

---
My Bugs | Some other query I've saved | Even more
Bugs Filed Today | Someone else's query I've added to my footer

Privacy Policy
---

so with this change a new user's footer will look like:

---
My Bugs
Bugs Filed Today

Privacy Policy
---

which looks odd imho.

if we don't use shared queries, but instead automatically create a named query owned by the user, it would look like:

---
My Bugs | Bugs Filed Today

Privacy Policy
---

the downside of this approach is if we couldn't easily update a saved query if required.

liz - what would you prefer?
Flags: needinfo?(lhenry)
I think either way looks okay, but the first way, treating it as a shared query, makes more sense to me.  Would it be still easy for users to delete it if they really didn't want it?
Flags: needinfo?(lhenry)
(In reply to Liz Henry :lizzard from comment #6)
> I think either way looks okay, but the first way, treating it as a shared
> query, makes more sense to me.  Would it be still easy for users to delete
> it if they really didn't want it?

easy-ish, via preferences --> saved searches.
unfortunately there's a lot of shared searches there.
Attached patch patch v1 (obsolete) — Splinter Review
Attachment #750307 - Flags: review?(dkl)
Comment on attachment 750307 [details] [diff] [review]
patch v1

Review of attachment 750307 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine except for my comments. If you don't think it could ever be an issue then r=dkl, otherwise better to be cautious.

::: extensions/BMO/Extension.pm
@@ +648,5 @@
> +                    "INSERT INTO namedqueries_link_in_footer(namedquery_id,user_id) VALUES (?,?)",
> +                    undef,
> +                    $namedquery_id, $user->id
> +                );
> +            }

Would feel better if we also checked to make sure the new user is able to see the shared query (in the correct group just in case it is changed to something other than everyone).

::: extensions/BMO/lib/Data.pm
@@ +474,5 @@
>  );
>  
> +# List of named queries which will be added to new users' footer
> +our @default_named_queries = (
> +    { name => 'Bugs Filed Today', sharer_id => 159758 },

Should we create a new saved query with the user nobody@mozilla.org? What is Reed were to stop sharing the query or change the name one day?
Attachment #750307 - Flags: review?(dkl) → review+
Comment on attachment 750307 [details] [diff] [review]
patch v1

> Should we create a new saved query with the user nobody@mozilla.org? What is
> Reed were to stop sharing the query or change the name one day?

hrm, good point.  i'll do an updated patch to bundle the saved-query creation in with this code (so we don't have to manually create them).
Attachment #750307 - Flags: review+
Attached patch patch v2Splinter Review
Attachment #750307 - Attachment is obsolete: true
Attachment #751703 - Flags: review?(dkl)
Comment on attachment 751703 [details] [diff] [review]
patch v2

Review of attachment 751703 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good and works as expected. r=dkl

::: extensions/BMO/Extension.pm
@@ +639,5 @@
> +        my $user = $args->{object};
> +
> +        my $sharer = Bugzilla::User->new({ name => 'nobody@mozilla.org' })
> +            or return;
> +        my $group = Bugzilla::Group->new({ name => 'Everyone' })

nit: s/Everyone/everyone/

I know MySQL is case insensitive but better to look for exact name just in case.
Attachment #751703 - Flags: review?(dkl) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified extensions/BMO/Extension.pm
modified extensions/BMO/lib/Data.pm
Committed revision 8840.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: Add a couple of default searches to new users' saved searches that appear in the footer → Add a default search to new users' saved searches that appear in the footer
You need to log in before you can comment on or make changes to this bug.