Skip to content

Commit a55ee26

Browse files
template jira customfields
1 parent ccc1ed9 commit a55ee26

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

notify/jira/jira.go

+10
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ func (n *Notifier) prepareIssueRequestBody(ctx context.Context, logger log.Logge
133133
return issue{}, fmt.Errorf("convertToMarshalMap: %w", err)
134134
}
135135

136+
for key, value := range fieldsWithStringKeys {
137+
if strValue, ok := value.(string); ok {
138+
processedValue, err := tmplTextFunc(strValue)
139+
if err != nil {
140+
return issue{}, fmt.Errorf("field %s template: %w", key, err)
141+
}
142+
fieldsWithStringKeys[key] = processedValue
143+
}
144+
}
145+
136146
summary, truncated := notify.TruncateInRunes(summary, maxSummaryLenRunes)
137147
if truncated {
138148
level.Warn(logger).Log("msg", "Truncated summary", "max_runes", maxSummaryLenRunes)

0 commit comments

Comments
 (0)