Allow the default project change list query to be customized
Change-Id: I84a5f701db52425ddbeac566eed45889a98a685b
This commit is contained in:
parent
ffee46e7ee
commit
492a857764
@ -31,6 +31,12 @@ commentlinks:
|
||||
text: "{id}"
|
||||
query: "changeid:{id}"
|
||||
|
||||
# This is the query used for the list of changes when a project is
|
||||
# selected. The default is "status:open"; if you don't want to see
|
||||
# WIP changes, use a query like this:
|
||||
#
|
||||
# change-list-query: "status:open not label:Workflow=-1"
|
||||
|
||||
dashboards:
|
||||
- name: "My changes"
|
||||
query: "owner:self status:open"
|
||||
|
@ -89,6 +89,7 @@ class ConfigSchema(object):
|
||||
'commentlinks': self.commentlinks,
|
||||
'dashboards': self.dashboards,
|
||||
'reviewkeys': self.reviewkeys,
|
||||
'change-list-query': str,
|
||||
})
|
||||
return schema
|
||||
|
||||
@ -141,6 +142,8 @@ class Config(object):
|
||||
text="{url}",
|
||||
url="{url}"))])))
|
||||
|
||||
self.project_change_list_query = self.config.get('change-list-query', 'status:open')
|
||||
|
||||
self.dashboards = OrderedDict()
|
||||
for d in self.config.get('dashboards', []):
|
||||
self.dashboards[d['key']] = d
|
||||
|
@ -129,7 +129,7 @@ class ProjectListView(urwid.WidgetWrap):
|
||||
project_key, project_name = data
|
||||
self.app.changeScreen(view_change_list.ChangeListView(
|
||||
self.app,
|
||||
"_project_key:%s status:open" % project_key,
|
||||
"_project_key:%s %s" % (project_key, self.app.config.project_change_list_query),
|
||||
project_name, unreviewed=True))
|
||||
|
||||
def keypress(self, size, key):
|
||||
|
Loading…
x
Reference in New Issue
Block a user