def collect_fields()

in releasedocmaker/src/main/python/releasedocmaker/jira.py [0:0]


    def collect_fields(jira_base_url):
        """send a query to JIRA and collect field-id map"""
        try:
            resp = get_jira(f"{jira_base_url}/rest/api/2/field")
            data = json.loads(resp.read())
        except (urllib.error.HTTPError, urllib.error.URLError,
                http.client.BadStatusLine, ValueError) as error:
            logging.error('Blew up trying to get a response: %s', error)
            sys.exit(1)
        field_id_map = {}
        for part in data:
            field_id_map[part['name']] = part['id']
        return field_id_map