func Map(remoteItem AttributeAccessor, mapping RemoteWorkItemMap) (RemoteWorkItem, error) {
	remoteWorkItem := RemoteWorkItem{Fields: make(map[string]interface{})}
	for from, to := range mapping {
		originalValue := remoteItem.Get(from.expression)
		convertedValue, err := from.attributeConverter.Convert(originalValue, remoteItem)
		if err == nil {
			remoteWorkItem.Fields[to] = convertedValue
		}
	}
	return remoteWorkItem, nil
}
// Map maps the remote WorkItem to a local RemoteWorkItem
Map maps the remote WorkItem to a local RemoteWorkItem
// Map maps the remote WorkItem to a local RemoteWorkItem
func Map(remoteItem AttributeAccessor, mapping RemoteWorkItemMap) (RemoteWorkItem, error) {
	remoteWorkItem := RemoteWorkItem{Fields: make(map[string]interface{})}
	for from, to := range mapping {
		originalValue := remoteItem.Get(from.expression)
		convertedValue, err := from.attributeConverter.Convert(originalValue, remoteItem)
		if err == nil {
			remoteWorkItem.Fields[to] = convertedValue
		}
	}
	return remoteWorkItem, nil
}
func Map ( remoteItem AttributeAccessor , mapping RemoteWorkItemMap ) ( RemoteWorkItem , error ) { remoteWorkItem := RemoteWorkItem { Fields : make ( map [ string ] interface { } ) } for from , to := range mapping { originalValue := remoteItem . Get ( from . expression ) convertedValue , err := from . attributeConverter . Convert ( originalValue , remoteItem ) if err == nil { remoteWorkItem . Fields [ to ] = convertedValue } } return remoteWorkItem , nil }
Map maps the remote WorkItem to a local RemoteWorkItem
Map maps the remote WorkItem to a local RemoteWorkItem