Last Comment Bug 860810 - Add a default search to new users' saved searches that appear in the footer
: Add a default search to new users' saved searches that appear in the footer
Status: RESOLVED FIXED
:
Product: bugzilla.mozilla.org
Classification: Other
Component: User Interface (show other bugs)
: Production
: x86 Mac OS X
: -- enhancement (vote)
: ---
Assigned To: Byron Jones ‹:glob›
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-11 09:59 PDT by Liz Henry (:lizzard) (needinfo? me)
Modified: 2013-06-11 06:54 PDT (History)
5 users (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch v1 (1.77 KB, patch)
2013-05-16 00:38 PDT, Byron Jones ‹:glob›
no flags Details | Diff | Review
patch v2 (2.66 KB, patch)
2013-05-20 08:21 PDT, Byron Jones ‹:glob›
dkl: review+
Details | Diff | Review

Description Liz Henry (:lizzard) (needinfo? me) 2013-04-11 09:59:53 PDT
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
Comment 1 Andre Klapper 2013-04-11 10:07:41 PDT
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?
Comment 2 Liz Henry (:lizzard) (needinfo? me) 2013-04-11 12:21:09 PDT
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.
Comment 3 Byron Jones ‹:glob› 2013-04-11 22:43:17 PDT
(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) ?
Comment 4 Liz Henry (:lizzard) (needinfo? me) 2013-05-13 08:11:33 PDT
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.
Comment 5 Byron Jones ‹:glob› 2013-05-15 00:28:43 PDT
(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?
Comment 6 Liz Henry (:lizzard) (needinfo? me) 2013-05-15 16:04:56 PDT
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?
Comment 7 Byron Jones ‹:glob› 2013-05-16 00:38:20 PDT
(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.
Comment 8 Byron Jones ‹:glob› 2013-05-16 00:38:45 PDT
Created attachment 750307 [details] [diff] [review]
patch v1
Comment 9 David Lawrence [:dkl] 2013-05-16 14:43:35 PDT
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?
Comment 10 Byron Jones ‹:glob› 2013-05-19 21:45:31 PDT
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).
Comment 11 Byron Jones ‹:glob› 2013-05-20 08:21:54 PDT
Created attachment 751703 [details] [diff] [review]
patch v2
Comment 12 David Lawrence [:dkl] 2013-06-06 13:23:39 PDT
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.
Comment 13 Byron Jones ‹:glob› 2013-06-11 06:54:40 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.