Commits

Anonymous committed 1261dab

contl10n01: automatically add a issue to the cws

Comments (0)

Files changed (2)

l10ntools/scripts/tool/commands.py

         self._log.info("Status "+str(eiswrapper.EisStatus.APPROVED_BY_QA))
         eisc.set_status(eiswrapper.EisStatus.APPROVED_BY_QA)
 
+        self._log.info("Adding issue to cws")
+        issue_list = list()
+        issue_list.append("i117747")
+        eisc.add_tasks(issue_list)
 
     def post(self, tool_cfg, state_cfg, env):
         pass

l10ntools/scripts/tool/eiswrapper.py

         cws_id = self.__get_id(cws_name)
         self._eis_con.setPublic(cws_id, is_public)
         
+    def add_tasks(self, ids, cws_name="", vcs_id="ihi"):
+        """Add a list of task ids"""
+        cws_id = self.__get_id(cws_name)
+        if not isinstance(ids,list) or len(ids) == 0:
+            raise EisError("Eiswrapper.add_tasks 'ids' is not a list!")
+        self._eis_con.addTaskIds(cws_id, ids, vcs_id)
 
 class Release():
     """This class represents a release"""