prometheus-community / jiralert

JIRA integration for Prometheus Alertmanager
Apache License 2.0
338 stars 129 forks source link

Allowing selected (custom/standard) fields to be updated #158

Open MytkoEnko opened 1 year ago

MytkoEnko commented 1 year ago

Could anyone please review this pr?

It is backward compatible, as by default it does nothing, only in a way that feature might interfere with the logic of (https://github.com/prometheus-community/jiralert/pull/150) as it might still update some values even if updateSummary and updateDescription flags are disabled.

If that is ok, I could move these updateSummary, updateDescription and reopenTickets flags to the config to make it more flexible and allow "per-receiver" configs rather than global flags.

Resolves #157

MytkoEnko commented 9 months ago

@bwplotka Thanks for he review! Applied suggestions and rebased.

In our organisation we've mapped alert's $value to an annotation and wanted corresponding jira field to be always up to date as it was important for prioritizing similar alert tickets. But it could be also useful in other cases where fields mapped to label/annotation for new or reopened tickets would reflect the change. For example if we add a new label to an existing alert and map it to a field.

MytkoEnko commented 9 months ago

Ready to be merged.