- update target version in tickets when acting upon commit data

Mon, 29 Sep 2014 12:22:26 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Mon, 29 Sep 2014 12:22:26 +0300
changeset 35
237e82bcd02f
parent 34
1a1ee9e8bda6
child 36
543d7a5e3b8b

- update target version in tickets when acting upon commit data

cobalt.py file | annotate | diff | comparison | revisions
--- a/cobalt.py	Mon Sep 29 04:26:27 2014 +0300
+++ b/cobalt.py	Mon Sep 29 12:22:26 2014 +0300
@@ -392,6 +392,21 @@
 				need_update = True
 			#fi
 
+			# Set target version if not set
+			if not 'target_version' in ticket_data:
+				ticket_data['target_version'] = '1.3' if repo_name == 'zandronum-stable' else '2.0'
+				need_update = True
+			elif (ticket_data['target_version'] == '2.0' or ticket_data['target_version'] == '2.0-beta') \
+			and repo_name == 'zandronum-stable':
+				# Target version was 2.0 but this was just committed to zandronum-stable, adjust
+				ticket_data['target_version'] = '1.3'
+				need_update = True
+			elif ticket_data['target_version'] == '2.0-beta':
+				# Fix target version from 2.0-beta to 2.0
+				ticket_data['target_version'] = '2.0'
+				need_update = True
+			#fi
+
 			# Announce on IRC
 			for irc_client in g_clients:
 				for channel in irc_client.cfg['channels']:

mercurial