def fetch_total_results()

in fetch_issues.py [0:0]


def fetch_total_results():
    """
    Load one result from query to see how many results there will be to calculate pagination.
    """
    global max_results, url, response, total_results
    max_results = 1
    url = f'{jira_server}/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery={encoded_query}&tempMax={max_results}&pager/start={max_results}'
    response = requests.get(url)
    result = objectify.fromstring(response.text)
    return int(result.channel.issue.attrib['total'])