diff options
author | cpettet <rush@wikimedia.org> | 2014-11-19 19:04:45 -0600 |
---|---|---|
committer | cpettet <rush@wikimedia.org> | 2014-11-19 19:04:45 -0600 |
commit | 08b6cd2bca890d7fcdb27e324156623bb0416d4c (patch) | |
tree | 760bdfbe3a0804844d1f8da3fcfaca29c609b9e9 | |
parent | cb2cb2dfde1abeb2df365b7428a8f38db9c7cd27 (diff) |
low rent way to strip author lead in static test
on author assignment
-rwxr-xr-x | wmfphablib/phabapi.py | 7 | ||||
-rwxr-xr-x | wmfphablib/phabdb.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/wmfphablib/phabapi.py b/wmfphablib/phabapi.py index 574d3b4..d6df30d 100755 --- a/wmfphablib/phabapi.py +++ b/wmfphablib/phabapi.py @@ -56,6 +56,13 @@ class phabapi: log("Updating author for %s to %s" % (refs, phid)) phabdb.set_task_author(phid, newid) + descript = phabdb.get_task_description(refs[0]) + try: + clean_description = descript.split('**Description:**\n', 1)[1] + phabdb.set_task_description(refs[0], clean_description) + except: + phabdb.set_task_description(refs[0], descript) + def task_comment(self, task, msg): out = self.con.maniphest.update(id=task, comments=msg) return out diff --git a/wmfphablib/phabdb.py b/wmfphablib/phabdb.py index b96d7c1..af16a87 100755 --- a/wmfphablib/phabdb.py +++ b/wmfphablib/phabdb.py @@ -393,7 +393,7 @@ def get_task_description(taskphid): passwd=phuser_passwd) _ = p.sql_x("SELECT description \ from maniphest_task \ - WHERE phid=%s", (phid,)) + WHERE phid=%s", (taskphid,)) p.close() if _ is not None and len(_[0]) > 0: return _[0][0] |