icingaweb2-module-jira icon indicating copy to clipboard operation
icingaweb2-module-jira copied to clipboard

Get default project for UI from custom vars

Open jonasboettcher opened this issue 4 years ago • 0 comments

We applied something like

apply Notification "jira-service-notification" to Service {
[...]
  if (service.vars.jira_project != null) {
    vars.jira_project = service.vars.jira_project
  } else if (host.vars.jira_project != null) {
    vars.jira_project = host.vars.jira_project
  } else {
    vars.jira_project = "MYPROJECT"
  }
[...]
}

to set the project value for jira notifications. It sets the jira_project from the service. If there is none, it asks the host. Otherwise it uses "MYPROJECT" as last fallback default value.

But in the UI I have to set something like

[ui]
default_project = "MYPROJECT"

in /etc/icingaweb2/modules/jira/config.ini. It sets just one default value.

Is it possible to write a setup like above to get a "three steps fallback" in the UI?

jonasboettcher avatar Aug 19 '20 14:08 jonasboettcher