def add_issues_to_sprint(self, sprint_id, issue_keys):
        """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
        :type sprint_id: int
        :param issue_keys: the issues to add to the sprint
        :type issue_keys: List[str]

        :rtype: Response
        """
        if self._options['agile_rest_path'] == GreenHopperResource.AGILE_BASE_REST_PATH:
            url = self._get_url('sprint/%s/issue' % sprint_id, base=self.AGILE_BASE_URL)
            payload = {'issues': issue_keys}
            try:
                self._session.post(url, data=json.dumps(payload))
            except JIRAError as e:
                if e.status_code == 404:
                    warnings.warn('Status code 404 may mean, that too old JIRA Agile version is installed.'
                                  ' At least version 6.7.10 is required.')
                raise
        elif self._options['agile_rest_path'] == GreenHopperResource.GREENHOPPER_REST_PATH:
            # In old, private API the function does not exist anymore and we need to use
            # issue.update() to perform this operation
            # Workaround based on https://answers.atlassian.com/questions/277651/jira-agile-rest-api-example

            sprint_field_id = self._get_sprint_field_id()

            data = {'idOrKeys': issue_keys, 'customFieldId': sprint_field_id,
                    'sprintId': sprint_id, 'addToBacklog': False}
            url = self._get_url('sprint/rank', base=self.AGILE_BASE_URL)
            return self._session.put(url, data=json.dumps(data))
        else:
            raise NotImplementedError('No API for adding issues to sprint for agile_rest_path="%s"' %
                                      self._options['agile_rest_path'])
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
        :type sprint_id: int
        :param issue_keys: the issues to add to the sprint
        :type issue_keys: List[str]

        :rtype: Response