Closed kvaradhan3 closed 1 year ago
Changing this to something like this works for now:
{{ range .issues -}}
{{ if .fields.assignee }}{{ .fields.assignee.displayName | fit 12 -}}
{{ else }}{{ " --- " }}{{ end }}
{{ end }}
Closing this for now.
Hi:
I am trying to parse a jira ticket json, using the go-jira templates and am stuck.
The output using -tdebug, pruned, shows the field as:
I had the following incantation in my template:
for which, I get:
ERROR Invalid Usage: template: gojira:2:31: executing "gojira" at <.fields.assignee.displayName>: nil pointer evaluating interface {}.displayName
How would I get the templater to skip, if the value is not set or null?
FWIW: I also tried variations around
{{ and .fields.assignee ( ne .fields.assignee nil ) .fields.assignee.displayName }}