Esempio n. 1
0
def get_job_by_id(user, job_id):
    job = v1_utils.verify_existence_and_get(job_id, _TABLE)
    job_dict = dict(job)
    job_dict['issues'] = json.loads(
        issues.get_all_issues(job_id, _TABLE).response[0]
    )['issues']
    return base.get_resource_by_id(user, job_dict, _TABLE, _EMBED_MANY)
Esempio n. 2
0
def retrieve_issues_from_job(user, j_id):
    """Retrieve all issues attached to a job."""
    return issues.get_all_issues(j_id, _TABLE)
Esempio n. 3
0
def retrieve_issues_from_component(user, c_id):
    """Retrieve all issues attached to a component."""
    return issues.get_all_issues(c_id, _TABLE)