File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package jira
33import (
44 "context"
55 "encoding/json"
6+ "fmt"
67 "net/http"
8+ "os"
79 "strconv"
810 "strings"
911
@@ -196,11 +198,13 @@ func constructCustomFields(fields map[string]string, data *createRequest) {
196198 data .Fields .M .customFields = make (customField )
197199
198200 for key , val := range fields {
201+ found := false
199202 for _ , configured := range configuredFields {
200203 identifier := strings .ReplaceAll (strings .ToLower (strings .TrimSpace (configured .Name )), " " , "-" )
201204 if identifier != strings .ToLower (key ) {
202205 continue
203206 }
207+ found = true
204208
205209 switch configured .Schema .DataType {
206210 case customFieldFormatOption :
@@ -229,6 +233,10 @@ func constructCustomFields(fields map[string]string, data *createRequest) {
229233 default :
230234 data .Fields .M .customFields [configured .Key ] = val
231235 }
236+
237+ if ! found {
238+ fmt .Fprintf (os .Stderr , "\n Invalid custom field specified: %s\n " , key )
239+ }
232240 }
233241 }
234242}
You can’t perform that action at this time.
0 commit comments