diff options
author | cpettet <rush@wikimedia.org> | 2015-06-01 11:46:38 -0500 |
---|---|---|
committer | cpettet <rush@wikimedia.org> | 2015-06-01 11:46:38 -0500 |
commit | 8952b3c1f73e121575d81a68e3dabeec2b937a0a (patch) | |
tree | 8f2de09cc19276bacaf76e6b9bb201aa43323871 | |
parent | 4c5b4eb59eea8cf30b941444b0162ff12f655913 (diff) |
Phab: include story points in public dump
ref T100846
Change-Id: I1d589356317d8e273d187c20b2f45f42b33f9fe3
-rwxr-xr-x | public_task_dump.py | 3 | ||||
-rwxr-xr-x | wmfphablib/phabdb.py | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/public_task_dump.py b/public_task_dump.py index 57b50fc..d00bfae 100755 --- a/public_task_dump.py +++ b/public_task_dump.py @@ -32,6 +32,9 @@ for task in phabdb.get_taskbypolicy(): and phabdb.get_projectpolicy(edge[2]) == 'public'] taskdata[id]['edge'] = filter(bool, edge_allowed) + taskdata[id]['storypoints'] = phabdb.get_storypoints(task[1]) + + data['task'] = taskdata data['project'] = {} data['project']['projects'] = phabdb.get_projectbypolicy(policy='public') diff --git a/wmfphablib/phabdb.py b/wmfphablib/phabdb.py index 94bbdc8..8cc1d8c 100755 --- a/wmfphablib/phabdb.py +++ b/wmfphablib/phabdb.py @@ -69,6 +69,21 @@ def get_projectbypolicy(policy='public'): p.close() return _ +def get_storypoints(taskPHID): + + p = phdb(db='phabricator_maniphest', + user=phuser_user, + passwd=phuser_passwd) + + _ = p.sql_x("SELECT id, \ + objectPHID, \ + indexValue \ + FROM maniphest_customfieldstringindex \ + WHERE indexKey=%s AND objectPHID=%s", + ('yERhvoZPNPtM', taskPHID), limit=None) + p.close() + return _ + def get_edgebysrc(src): p = phdb(db='phabricator_maniphest', user=phuser_user, |