ankitpokhrel / ankitpokhrel/jira-cli

Priority should be a selection of options

Aperta
#660 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
6k
Fork
413
Merge medio
2g 3h
PR unite (30g)
1

Descrizione

**Describe the bug**

Priority in JIRA is configured as some enum or option. But, in the prompt it is served as free type input not a selection.
This led to an error below, because I type only some part of the Priority string ("P1 - bla bla bla", only typed P1).

```
? Priority P1
? What's next? Submit

Error:
- priority: Specify the Priority (name) in the string format

jira: Received unexpected response '400 Bad Request'.
Please check the parameters you supplied and try again.
```

**Please provide following details**
1. JiraCLI Version:
```
$ jira version
(Version="1.4.0", GitCommit="v1.4.0", CommitDate="1970-01-01T00:00:00+00:00", GoVersion="go1.20.7", Compiler="gc", Platform="linux/amd64")
```
2. Are you using Jira cloud or on-premise jira server?
```
SERVER INFO
-----------

Version: 1001.0.0-SNAPSHOT
Build Number: 100235
Deployment Type: Cloud
Default Locale: en_US
```
3. What operating system are you using? Also mention version.
```
NixOS 23.05
```
4. What terminal are you using? Also mention version.
```
WezTerm v20230408-112425-69ae8472
```

**To Reproduce**

Steps to reproduce the behavior:
1. Initiate issue creation interactively, `jira issues create`
2. Fill in the forms until prompted with { Submit, Add Metadata, Cancel }
3. Select "Add Metadata" and choose Priority.
4. Fill priority **with different** string from your JIRA priority list.
5. Continue to Submit.
6. See error.

**Expected behavior**

Number 4 should be "Select priority" not "Fill priority".

**Screenshots**

**Additional context**

I created https://github.com/ankitpokhrel/jira-cli/discussions/659 inspired by this experience.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.