| Issue 32: | Browse open changes by project | |
| Back to list |
Reported by Shawn Pearce <sop@google.com> on Wed Jan 21 12:58:56 PST 2009
Source: JIRA GERRIT-32
Affected Version: 2.0
It would be nice to be able to view all open changes for only one project at a
time, rather than needing to wade through the entire open change list shown by
Gerrit#all,open,n,z.
Implementing this requires adding a new Query method to ChangeAccess to search
Project.NameKey. Duplicating the two allOpen methods like:
@Query("WHERE open = true AND dest.projectName = ? AND sortKey > ? ORDER BY
sortKey LIMIT ?")
ResultSet<Change> openByProjectPrev(Project.NameKey p, String sortKey, int
limit) throws OrmException;
@Query("WHERE open = true AND dest.projectName = ? AND sortKey < ? ORDER BY
sortKey DESC LIMIT ?")
ResultSet<Change> openByProjectNext(Project.NameKey p, String sortKey, int
limit) throws OrmException;
a new index is also needed in query_index.sql, to cover the inclusion of the
project name in the query.
New service methods to ChangeListService and ChangeListServiceImpl are needed
for the web UI to be able to obtain the change listing. Duplicating the
existing allOpenPrev, allOpenNext methods and adding the Project.NameKey
parameter would be reasonable.
The web UI would need a new Screen implementation to call these new service
methods. Duplicating the AllOpenChangeScreen and making it call these methods
is probably the easiest way to go, since the screen should be basically
identical to the open list. Since a Project.NameKey is needed you'll want to
pass it in the constructor of the new class.
The recycleThis() method from the superclass would need to be overridden to
handle populating the Project.NameKey field if Gerrit.java chose to recycle an
existing screen instance rather than use the new one. (This recycling is done
to improve DOM display performance by recycling DOM elements that are off-
screen.)
A URL also needs to be registered in Link.java's display method to split the
token and create the new Screen class when the user navigates to a URL. A
token like "project,open,$projectname" might be reasonable for this screen as
then we can also later add "project,merged,$projectname" or "project,closed,
$projectname" in much the same way.
It might be a good idea to add a static parse() method to Project.NameKey,
similar to what exists for Change.Id, so that the Link select block can ask
the Project.NameKey to parse itself out of the token. This way URL escaping/
unescaping is handled automatically.
I'm not sure what part of the existing interface should link to a
"project,open,$projectname" screen. Links probably should be handled like the
AccountDashboardLink class, where the token construction logic is in Link as a
static method but a utility class is used for the UI widget to automate most
of the link construction.
Sep 24, 2009
#1
code-rev...@gtempaccount.com
Sep 24, 2009
Comment by Rebecca Schultz Zavin <rebecca@android.com> on Thu Jan 29 13:53:56 PST 2009 This is a high priority for us on the systems team so we can track all the change to the kernel repos.
Sep 24, 2009
Update by Shawn Pearce <sop@google.com> on Thu Jan 29 14:09:11 PST 2009
Labels:
-Priority-Minor Priority-Major
Sep 24, 2009
Comment by Shawn Pearce <sop@google.com> on Fri Jan 30 18:45:01 PST 2009 Fixed by http://review.source.android.com/8734 Open changes can now be listed per-project, rather than for the entire instance.
Sep 24, 2009
Update by Shawn Pearce <sop@google.com> on Fri Jan 30 18:45:01 PST 2009 Fixed in version 2.0.1.
Status:
Fixed
Sep 25, 2009
(No comment was entered for this change.)
Labels:
FixedIn-2.0.1
Oct 25, 2012
(No comment was entered for this change.)
Status:
Released
Blocking: -gerrit:50 |
|
| ► Sign in to add a comment |