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

Cannot create ticket with one line command, that includes multiple labels and components #456

Open
kenot opened this issue Jan 13, 2022 · 11 comments

Comments

@kenot
Copy link

kenot commented Jan 13, 2022

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,

@georgettica
Copy link
Collaborator

Have you tried it wihout the --noedit?

This would possibly show you the same error

@kenot
Copy link
Author

kenot commented Jan 13, 2022

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.

@georgettica
Copy link
Collaborator

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

@kenot
Copy link
Author

kenot commented Jan 13, 2022

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?

@georgettica
Copy link
Collaborator

I am not sure, sadly I am a fairly new with the repo and trying to help from the outside as of now

@kenot
Copy link
Author

kenot commented Jan 13, 2022

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

@kenot
Copy link
Author

kenot commented Jan 13, 2022

I found the way

@kenot
Copy link
Author

kenot commented Jan 17, 2022

# 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"

@kenot
Copy link
Author

kenot commented Jan 17, 2022

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.

@georgettica
Copy link
Collaborator

you can do that after the fact with jira link

as it's a different API call IIRC

@georgettica
Copy link
Collaborator

ps @kenot , I am editing your comments by wrapping them with triple ticks ```

this makes it easier to read and seperate the commands from the actual text

you can use the preview tab to see how it looks like before sending

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