Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR epiclink: Field 'epiclink' cannot be set. It is not on the appropriate screen, or unknown. #457

Open
kenot opened this issue Jan 17, 2022 · 2 comments

Comments

@kenot
Copy link

kenot commented Jan 17, 2022

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
Copy link

igbanam commented Nov 10, 2022

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:

  1. Create the JIRA ticket with jira create ...
  2. Add the created JIRA-TKT to the JIRA-EPIC using jira epic add JIRA-EPIC JIRA-TKT

 

p.s: You may also want to do the same thing for labels with jira labels add ...

@igbanam
Copy link

igbanam commented Nov 10, 2022

Ctrl-F for options.epic in #455 (comment) to see an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants