// LoadJIRAConfig loads the JIRA configuration (project key,
// custom field IDs) from a remote JIRA server.
LoadJIRAConfig loads the JIRA configuration (project key,
custom field IDs) from a remote JIRA server.
// LoadJIRAConfig loads the JIRA configuration ( project key // custom field IDs ) from a remote JIRA server .
func (c *Config) LoadJIRAConfig(client jira.Client) error {
	proj, res, err := client.Project.Get(c.cmdConfig.GetString("jira-project"))
	if err != nil {
		c.log.Errorf("Error retrieving JIRA project; check key and credentials. Error: %v", err)
		defer res.Body.Close()
		body, err := ioutil.ReadAll(res.Body)
		if err != nil {
			c.log.Errorf("Error occured trying to read error body: %v", err)
			return err
		}
		c.log.Debugf("Error body: %s", body)
		return errors.New(string(body))
	}
	c.project = *proj
	c.fieldIDs, err = c.getFieldIDs(client)
	if err != nil {
		return err
	}
	return nil
}
func ( c * Config ) LoadJIRAConfig ( client jira . Client ) error { proj , res , err := client . Project . Get ( c . cmdConfig . GetString ( " " ) ) if err != nil { c . log . Errorf ( " " , err ) defer res . Body . Close ( ) body , err := ioutil . ReadAll ( res . Body ) if err != nil { c . log . Errorf ( " " , err ) return err } c . log . Debugf ( " " , body ) return errors . New ( string ( body ) ) } c . project = * proj c . fieldIDs , err = c . getFieldIDs ( client ) if err != nil { return err } return nil }
LoadJIRAConfig loads the JIRA configuration (project key,
custom field IDs) from a remote JIRA server.
LoadJIRAConfig loads the JIRA configuration ( project key custom field IDs ) from a remote JIRA server .