// resourceGroupMembershipRead reads issue details using jira api
resourceGroupMembershipRead reads issue details using jira api
// resourceGroupMembershipRead reads issue details using jira api
func resourceGroupMembershipRead(d *schema.ResourceData, m interface{}) error {
	config := m.(*Config)
	components := strings.SplitN(d.Id(), ":", 2)
	username := components[0]
	groupname := components[1]
	groups, _, err := getGroups(config.jiraClient, username)
	if err != nil {
		return errors.Wrap(err, "getting jira group failed")
	}
	d.Set("username", username)
	d.Set("group", groupname)
	for _, group := range groups.Groups.Items {
		if group.Name == groupname {
			return nil
		}
	}
	return errors.Errorf("Cannot find group %s", groupname)
}
func resourceGroupMembershipRead ( d * schema . ResourceData , m interface { } ) error { config := m . ( * Config ) components := strings . SplitN ( d . Id ( ) , " " , 2 ) username := components [ 0 ] groupname := components [ 1 ] groups , _ , err := getGroups ( config . jiraClient , username ) if err != nil { return errors . Wrap ( err , " " ) } d . Set ( " " , username ) d . Set ( " " , groupname ) for _ , group := range groups . Groups . Items { if group . Name == groupname { return nil } } return errors . Errorf ( " " , groupname ) }
resourceGroupMembershipRead reads issue details using jira api
resourceGroupMembershipRead reads issue details using jira api