diff mbox

[kteam-tools] link-to-tracker: update tb description with package version

Message ID 20170504155414.10070-1-kleber.souza@canonical.com
State New
Headers show

Commit Message

Kleber Sacilotto de Souza May 4, 2017, 3:54 p.m. UTC
When the tracking bug is created by 'stable/start-sru-cycle', the title
and the description contain the placeholder '<version to be filled>'.
When 'link-to-tacker' is run, it updates only the tracking bug title
with the package version. Make it so that the description is also
updated.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
---
 stable/link-to-tracker | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/stable/link-to-tracker b/stable/link-to-tracker
index d3d84a4b..0b28cf29 100755
--- a/stable/link-to-tracker
+++ b/stable/link-to-tracker
@@ -167,7 +167,8 @@  class Tracking():
             # Pull the entire changelog file into a list
             #
             changelog = Debian.changelog(local=True)
-            title = "%s: %s -proposed tracker" % (changelog[0]['package'], changelog[0]['version'])
+            package_version = changelog[0]['version']
+            title = "%s: %s -proposed tracker" % (changelog[0]['package'], package_version)
 
             changelog, changelog_path = Debian.raw_changelog(local=True)
             with open(changelog_path, 'r') as f:
@@ -183,6 +184,7 @@  class Tracking():
 
             lpbug = s.launchpad.bugs[bugid]
             lpbug.title = title
+            lpbug.description = lpbug.description.replace('<version to be filled>', package_version)
             lpbug.lp_save()
 
             task = tasks_by_name['prepare-package'].lp_task