func CreateWorkItem(spaceID uuid.UUID, workItemType uuid.UUID, title string) *app.CreateWorkitemPayload {
	spaceSelfURL := rest.AbsoluteURL(&goa.RequestData{
		Request: &http.Request{Host: "api.service.domain.org"},
	}, app.SpaceHref(spaceID.String()))
	witSelfURL := rest.AbsoluteURL(&goa.RequestData{
		Request: &http.Request{Host: "api.service.domain.org"},
	}, app.WorkitemtypeHref(spaceID.String(), workItemType))
	payload := app.CreateWorkitemPayload{
		Data: &app.WorkItem{
			Attributes: map[string]interface{}{
				workitem.SystemTitle: title,
				workitem.SystemState: workitem.SystemStateClosed,
			},
			Relationships: &app.WorkItemRelationships{
				BaseType: &app.RelationBaseType{
					Data: &app.BaseTypeData{
						ID:   workItemType,
						Type: "workitemtypes",
					},
					Links: &app.GenericLinks{
						Self: &witSelfURL,
					},
				},
				Space: app.NewSpaceRelation(spaceID, spaceSelfURL),
			},
			Type: "workitems",
		},
	}
	return &payload
}
// CreateWorkItem defines a work item link
CreateWorkItem defines a work item link
// CreateWorkItem defines a work item link
func CreateWorkItem(spaceID uuid.UUID, workItemType uuid.UUID, title string) *app.CreateWorkitemPayload {
	spaceSelfURL := rest.AbsoluteURL(&goa.RequestData{
		Request: &http.Request{Host: "api.service.domain.org"},
	}, app.SpaceHref(spaceID.String()))
	witSelfURL := rest.AbsoluteURL(&goa.RequestData{
		Request: &http.Request{Host: "api.service.domain.org"},
	}, app.WorkitemtypeHref(spaceID.String(), workItemType))
	payload := app.CreateWorkitemPayload{
		Data: &app.WorkItem{
			Attributes: map[string]interface{}{
				workitem.SystemTitle: title,
				workitem.SystemState: workitem.SystemStateClosed,
			},
			Relationships: &app.WorkItemRelationships{
				BaseType: &app.RelationBaseType{
					Data: &app.BaseTypeData{
						ID:   workItemType,
						Type: "workitemtypes",
					},
					Links: &app.GenericLinks{
						Self: &witSelfURL,
					},
				},
				Space: app.NewSpaceRelation(spaceID, spaceSelfURL),
			},
			Type: "workitems",
		},
	}
	return &payload
}
func CreateWorkItem ( spaceID uuid . UUID , workItemType uuid . UUID , title string ) * app . CreateWorkitemPayload { spaceSelfURL := rest . AbsoluteURL ( & goa . RequestData { Request : & http . Request { Host : " " } , } , app . SpaceHref ( spaceID . String ( ) ) ) witSelfURL := rest . AbsoluteURL ( & goa . RequestData { Request : & http . Request { Host : " " } , } , app . WorkitemtypeHref ( spaceID . String ( ) , workItemType ) ) payload := app . CreateWorkitemPayload { Data : & app . WorkItem { Attributes : map [ string ] interface { } { workitem . SystemTitle : title , workitem . SystemState : workitem . SystemStateClosed , } , Relationships : & app . WorkItemRelationships { BaseType : & app . RelationBaseType { Data : & app . BaseTypeData { ID : workItemType , Type : " " , } , Links : & app . GenericLinks { Self : & witSelfURL , } , } , Space : app . NewSpaceRelation ( spaceID , spaceSelfURL ) , } , Type : " " , } , } return & payload }
CreateWorkItem defines a work item link
CreateWorkItem defines a work item link