Describe the bug
There are multiple definitions of some methods in JamaClient. for the get_item_versions method in JamaClient
JamaClient.get_item_versions
|
def get_item_versions(self, item_id): |
|
""" |
|
Get all versions for the item with the specified ID |
|
|
|
Args: |
|
item_id: the item id of the item to fetch |
|
|
|
Returns: JSON array with all versions for the item |
|
""" |
|
resource_path = 'items/' + str(item_id) + '/versions' |
|
versions = self.__get_all(resource_path) |
|
return versions |
|
def get_item_versions(self, item_id, allowed_results_per_page=__allowed_results_per_page): |
|
""" |
|
Get all versions for the item with the specified ID |
|
|
|
Args: |
|
item_id: the item id of the item to fetch |
|
allowed_results_per_page: number of results per page |
|
|
|
Returns: JSON array with all versions for the item |
|
""" |
|
resource_path = 'items/' + str(item_id) + '/versions' |
|
versions = self.__get_all(resource_path, allowed_results_per_page=allowed_results_per_page) |
|
return versions |
JamaClient.get_item_version (singular)
|
def get_item_version(self, item_id, version_num): |
|
""" |
|
Get the numbered version for the item with the specified ID |
|
|
|
Args: |
|
item_id: the item id of the item to fetch |
|
version_num: the version number for the item |
|
|
|
Returns: a dictionary object representing the numbered version |
|
""" |
|
resource_path = 'items/' + str(item_id) + '/versions/' + str(version_num) |
|
try: |
|
response = self.__core.get(resource_path) |
|
except CoreException as err: |
|
py_jama_rest_client_logger.error(err) |
|
raise APIException(str(err)) |
|
JamaClient.__handle_response_status(response) |
|
return response.json()['data'] |
|
def get_item_version(self, item_id, version_num): |
|
""" |
|
Get the numbered version for the item with the specified ID |
|
|
|
Args: |
|
item_id: the item id of the item to fetch |
|
version_num: the version number for the item |
|
|
|
Returns: a dictionary object representing the numbered version |
|
""" |
|
resource_path = 'items/' + str(item_id) + '/versions/' + str(version_num) |
|
response = self.__core.get(resource_path) |
|
JamaClient.__handle_response_status(response) |
|
return response.json()['data'] |
JamaClient.get_versioned_item
|
def get_versioned_item(self, item_id, version_num): |
|
""" |
|
Get the snapshot of the item at the specified version |
|
|
|
Args: |
|
item_id: the item id of the item to fetch |
|
version_num: the version number for the item |
|
|
|
Returns: a dictionary object representing the versioned item |
|
""" |
|
resource_path = 'items/' + str(item_id) + '/versions/' + str(version_num) + '/versioneditem' |
|
try: |
|
response = self.__core.get(resource_path) |
|
except CoreException as err: |
|
py_jama_rest_client_logger.error(err) |
|
raise APIException(str(err)) |
|
JamaClient.__handle_response_status(response) |
|
return response.json()['data'] |
|
def get_versioned_item(self, item_id, version_num): |
|
""" |
|
Get the snapshot of the item at the specified version |
|
|
|
Args: |
|
item_id: the item id of the item to fetch |
|
version_num: the version number for the item |
|
|
|
Returns: a dictionary object representing the versioned item |
|
""" |
|
resource_path = 'items/' + str(item_id) + '/versions/' + str(version_num) + '/versioneditem' |
|
response = self.__core.get(resource_path) |
|
JamaClient.__handle_response_status(response) |
|
return response.json()['data'] |
Describe the bug
There are multiple definitions of some methods in
JamaClient. for theget_item_versionsmethod inJamaClientJamaClient.get_item_versions
py-jama-rest-client/py_jama_rest_client/client.py
Lines 418 to 429 in 91f30ce
py-jama-rest-client/py_jama_rest_client/client.py
Lines 469 to 481 in 91f30ce
JamaClient.get_item_version (singular)
py-jama-rest-client/py_jama_rest_client/client.py
Lines 431 to 448 in 91f30ce
py-jama-rest-client/py_jama_rest_client/client.py
Lines 483 to 496 in 91f30ce
JamaClient.get_versioned_item
py-jama-rest-client/py_jama_rest_client/client.py
Lines 450 to 467 in 91f30ce
py-jama-rest-client/py_jama_rest_client/client.py
Lines 498 to 511 in 91f30ce