Skip to content

Commit 08a3da0

Browse files
template jira customfields
Signed-off-by: Holger Waschke <[email protected]>
1 parent ccc1ed9 commit 08a3da0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

notify/jira/jira.go

Lines changed: 10 additions & 0 deletions
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)