def add_issues_to_sprint(self, sprint_id, issue_keys): """ See comment thread here: https://confluence.atlassian.com/pages/viewpage.action?pageId=395707016 Add the issues in ``issue_keys`` to the ``sprint_id``. The sprint must be started but not completed. If a sprint was completed, then have to also edit the history of the issue so that it was added to the sprint before it was completed, preferably before it started. A completed sprint's issues also all have a resolution set before the completion date. If a sprint was not started, then have to edit the marker and copy the rank of each issue too. :param sprint_id: the sprint to add issues to :param issue_keys: the issues to add to the sprint """ data = {} data["idOrKeys"] = issue_keys data["customFieldId"] = 10002 if sprint_id != "backlog": data["sprintId"] = sprint_id data["addToBacklog"] = False else: data["addToBacklog"] = True url = self._get_url("sprint/rank", base=self.GREENHOPPER_BASE_URL) r = self._session.put(url, data=json.dumps(data)) raise_on_error(r)
def add_comment(self, build, body): data = { 'author': self.jira_user, 'content': body } url = self.jira._get_url('result/' + build + '/comment') r = self.jira._session.post(url, headers={'content-type':'application/json'}, data=json.dumps(data)) raise_on_error(r)
def add_comment(self, build, body): data = {'author': self.jira_user, 'content': body} url = self.jira._get_url('result/' + build + '/comment') r = self.jira._session.post( url, headers={'content-type': 'application/json'}, data=json.dumps(data)) raise_on_error(r)
def run_plan(self, plan, **extra_variables): params = None if extra_variables: params = {} for k, v in extra_variables.items(): params['bamboo.variable.%s' % k] = v url = self.jira._get_url('queue/%s' % plan) print "POST %s" % url r = self.jira._session.post(url, headers={'content-type':'application/json'}, params=params, data=json.dumps({})) raise_on_error(r)
def run_plan(self, plan, **extra_variables): params = None if extra_variables: params = {} for k, v in extra_variables.items(): params['bamboo.variable.%s' % k] = v url = self.jira._get_url('queue/%s' % plan) print "POST %s" % url r = self.jira._session.post( url, headers={'content-type': 'application/json'}, params=params, data=json.dumps({})) raise_on_error(r)