diff --git a/internal/webhook-proxy/handler/proxy.go b/internal/webhook-proxy/handler/proxy.go index 4323f1a..0b6db0c 100644 --- a/internal/webhook-proxy/handler/proxy.go +++ b/internal/webhook-proxy/handler/proxy.go @@ -84,6 +84,6 @@ func (p *Proxy) proxyRequest(txt string, url string) bool { func generateElementText(req *request.Jira) string { return fmt.Sprintf( "Type: %s\nSummary: %s\nIssuer: %s\nURL: %s", - req.Issue.Fields.RequestType.Name, req.Issue.Fields.Summary, req.User.Name, + req.Issue.Fields.CustomField11401.RequestType.Name, req.Issue.Fields.Summary, req.User.Name, req.Issue.Fields.CustomField11401.Links.Web) } diff --git a/internal/webhook-proxy/request/request.go b/internal/webhook-proxy/request/request.go index 9744317..2958e13 100644 --- a/internal/webhook-proxy/request/request.go +++ b/internal/webhook-proxy/request/request.go @@ -28,11 +28,11 @@ type Jira struct { Links struct { Web string `json:"web"` } `json:"_links"` + RequestType struct { + Name string `json:"name"` + Description string `json:"description"` + } `json:"requestType"` } `json:"customfield_11401"` - RequestType struct { - Name string `json:"name"` - Description string `json:"description"` - } `json:"requestType"` Summary string `json:"summary"` IssueType struct { Description string `json:"description"`