ERROR epiclink: Field 'epiclink' cannot be set. It is not on the appropriate screen, or unknown.
kenot opened this issue · comments
kenot commented
Hello,
I tried to add field for epic link in the create template, as below:
{{/* create template */ -}}
fields:
project:
key: {{ or .overrides.project "" }}
duedate: {{ or .overrides.duedate "" }}
issuetype:
name: {{ or .overrides.issuetype "" }}
epiclink: {{ or .overrides.epiclink "" }}
summary: >-
{{ or .overrides.summary "" }}{{if .meta.fields.priority.allowedValues}}
priority: # Values: {{ range .meta.fields.priority.allowedValues }}{{.name}}, {{end}}
name: {{ or .overrides.priority ""}}{{end}}{{if .meta.fields.components.allowedValues}}
labels: # Values: {{ range .meta.fields.labels.allowedValues }}{{.name}}, {{end}}{{ range split "," (or .overrides.labels "")}}
- {{ . }}{{end}}
components: # Values: {{ range .meta.fields.components.allowedValues }}{{.name}}, {{end}}{{ range split "," (or .overrides.components "")}}
- name: {{ . }}{{end}}{{end}}
description: |~
{{ or .overrides.description "" | indent 4 }}{{if .meta.fields.assignee}}
assignee:
name: {{ or .overrides.assignee "" }}{{end}}{{if .meta.fields.reporter}}
reporter:
name: {{ or .overrides.reporter .overrides.login }}{{end}}{{if .meta.fields.customfield_10110}}
# watchers
customfield_10110: {{ range split "," (or .overrides.watchers "")}}
- name: {{.}}{{end}}
- name:{{end}}
And when I tried to generate the ticket with the command:
# jira create --noedit -i Task -o summary="Test" -o duedate="2022-04-14" -o labels="Label1 , Label2" -o epiclink="General Admin" -o components="Airflow , WebSSU" -o description="Testing go-jira" -o assignee="toncho.dinkov"
I get the error: ERROR epiclink: Field 'epiclink' cannot be set. It is not on the appropriate screen, or unknown.
Any help would be appreciated.
Igbanam Ogbuluijah commented
Most times, with JIRA epics, the field could be a custom field. Adding it to the template would mean you add the custom field to the template. Confirm this with the schema on your JIRA server.
To solve this, I currently do this in two steps:
- Create the JIRA ticket with
jira create ...
- Add the created
JIRA-TKT
to theJIRA-EPIC
usingjira epic add JIRA-EPIC JIRA-TKT
p.s: You may also want to do the same thing for labels with jira labels add ...
Igbanam Ogbuluijah commented
Ctrl-F for options.epic
in #455 (comment) to see an example