Cannot create ticket with one line command, that includes multiple labels and components
kenot opened this issue · comments
Hi Guys,
Hopefully, someone might help me.
I am failing to create a ticket with one line command, that includes multiple labels and components. This is what I get:
toncho_dinkov@jobs1-preproduction:~/.jira.d$ jira create --noedit -i Task -o summary="Test" -o labels="Label1, Label2" -o components="Airflow, WEBSSU" -o description="Testing go-jira" -o assignee="toncho.dinkov"
ERROR components: Component name 'WEBSSU' is not valid. labels: string expected at index 0
Anyone, has ever faced similar problem? Also, I need to include epic link and due date in the command.
Regards,
Have you tried it wihout the --noedit?
This would possibly show you the same error
In fact, Without --noedit it invokes the editor, where I see
fields:
project:
key: MMOPS
issuetype:
name: Task
summary: >-
Test
priority: # Values: Blocker, Critical, Major, Elevated, Normal, Minor, Trivial, Drop, High, Highest, Low,
name:
labels: # Values:
- name: - Label1 - Label2
components: # Values: Airflow, AppDataHandler, Appreciation_NL_Support, Appreciation_UK_team_support, BigPicture, Billable, CC, Channel Scanner, Check_MK, Client_Deliveries_BBC, Client_Delivery_DoublePlay, Client_Delivery_Emetriq, Client_Delivery_FEFO, Client_Delivery_Google_DE, Client_Delivery_Google_NL, Client_Delivery_iMDA, Client_Delivery_Intage, Client_Delivery_Mediateam, Client_delivery_NL_GXLTV, Client_Delivery_Omnicom, Client_Delivery_Pharmacy_Report, Client_Delivery_Pinpoint, Client_Delivery_Publicis, Client_Delivery_Smartstream, Client_Delivery_Xaxis, Client_Delivery_Youtube, CPA/ MME, CPA_AR, CPA_BR, CPA_CL, CPA_CO, CS, DataDog, DB Update, delayed, DIE, Digital_AdHoc_Support, DMO_Support, EPM, EPO, ERO, ES_DAM, Firewall, GfK Router 1, Global_Marketing_Support, GXL_Quality_Circles_Support, HHDS, Hyperlane_AGF, Hyperlane_AR, Hyperlane_BR, Hyperlane_CL, Hyperlane_CO, Hyperlane_Data, Hyperlane_Data_LEOtrace, Hyperlane_Data_Wakoopa, Hyperlane_DE, Hyperlane_ES, Hyperlane_IT, Hyperlane_MX, Hyperlane_NL, Hyperlane_PL, Hyperlane_Sensic, Hyperlane_SG, in-quality, in-time, IPTV, IPTVSSU, JobManager, Linux, Matching System, Meters, MMC, MongoDB, Monitoring, MS1.0, MS2.0, MW4, MySQL, Network, NL_GXLTV, Non-Billable, on, on-time, OnePP, OpsGenie, PDI, PrgLog, RAM, RAM Switzerland, RDE_Monitoring, Remote Access Proxy, Router2, Sensic, SF, SG LOCAL OPERATIONS, SSU, SSU Config Tool, SSU Matching Management Console, SSU3, SSU3G, SSU4G, SSU4G-4K, SSU4G-SF/CS, SSUConfigSW, SSUManager, Studio Fingerprinter, TAM, TAM Austria, TAM Belgium, TAM General, TAM Germany, TAM Lebanon, TAM Portugal, TAM Singapore, TAM Switzerland, TVL2, TVL2.0, TVL2.1, TVL21, UMX1, UMX2, WebSSU, Weighting,
- name: - Airflow - WEBSSU
description: |~
Testing go-jira
assignee:
name: toncho.dinkov
reporter:
name: toncho.dinkov
And if I amend the labels and components to be like that:
labels: # Values:
- Label1
- Label2
components: # Values: Airflow, AppDataHandler, Appreciation_NL_Support, Appreciation_UK_team_support, BigPicture, Billable, CC, Channel Scanner, Check_MK, Client_Deliveries_BBC, Client_Delivery_DoublePlay, Client_Delivery_Emetriq, Client_Delivery_FEFO, Client_Delivery_Google_DE, Client_Delivery_Google_NL, Client_Delivery_iMDA, Client_Delivery_Intage, Client_Delivery_Mediateam, Client_delivery_NL_GXLTV, Client_Delivery_Omnicom, Client_Delivery_Pharmacy_Report, Client_Delivery_Pinpoint, Client_Delivery_Publicis, Client_Delivery_Smartstream, Client_Delivery_Xaxis, Client_Delivery_Youtube, CPA/ MME, CPA_AR, CPA_BR, CPA_CL, CPA_CO, CS, DataDog, DB Update, delayed, DIE, Digital_AdHoc_Support, DMO_Support, EPM, EPO, ERO, ES_DAM, Firewall, GfK Router 1, Global_Marketing_Support, GXL_Quality_Circles_Support, HHDS, Hyperlane_AGF, Hyperlane_AR, Hyperlane_BR, Hyperlane_CL, Hyperlane_CO, Hyperlane_Data, Hyperlane_Data_LEOtrace, Hyperlane_Data_Wakoopa, Hyperlane_DE, Hyperlane_ES, Hyperlane_IT, Hyperlane_MX, Hyperlane_NL, Hyperlane_PL, Hyperlane_Sensic, Hyperlane_SG, in-quality, in-time, IPTV, IPTVSSU, JobManager, Linux, Matching System, Meters, MMC, MongoDB, Monitoring, MS1.0, MS2.0, MW4, MySQL, Network, NL_GXLTV, Non-Billable, on, on-time, OnePP, OpsGenie, PDI, PrgLog, RAM, RAM Switzerland, RDE_Monitoring, Remote Access Proxy, Router2, Sensic, SF, SG LOCAL OPERATIONS, SSU, SSU Config Tool, SSU Matching Management Console, SSU3, SSU3G, SSU4G, SSU4G-4K, SSU4G-SF/CS, SSUConfigSW, SSUManager, Studio Fingerprinter, TAM, TAM Austria, TAM Belgium, TAM General, TAM Germany, TAM Lebanon, TAM Portugal, TAM Singapore, TAM Switzerland, TVL2, TVL2.0, TVL2.1, TVL21, UMX1, UMX2, WebSSU, Weighting,
- name: Airflow
- name: WEBSSU
It creates the ticket.
But the goal is for creating the ticket without invoking the editor. Putting the label and component in a new line resolves the problem, but how this could be done in a new line command without invoking the editor with --noedit option.
so this would mean the -o
doesn't do as you expect and you need a custom mapping for these, right?
that and the list command doesn't work as expected for labels.
as least it means the command works as expected, fails where doing it without editing would.
now the solution needs to be decided
it seems so, at least for labels and components. Perhaps i'm doing something wrong in the syntax of the command
And what if I want to add epic link? Could this be done with the -o flag?
I am not sure, sadly I am a fairly new with the repo and trying to help from the outside as of now
If I run the command this way
# jira create --noedit -i Task -o summary="Test" -o labels="Label1" -o components="Airflow" -o description="Testing go-jira" -o assignee="toncho.dinkov"
It works
I found the way
# jira create --noedit -i Task -o summary="Test" -o duedate="2022-04-14" -o labels="Label1 , Label2" -o components="Airflow , WebSSU" -o description="Testing go-jira" -o assignee="toncho.dinkov"
Now the question is to how to set epic link field into the create template, so that when it creates ticket, it would contain field for epic link.
you can do that after the fact with jira link
as it's a different API call IIRC