ankitpokhrel / ankitpokhrel/jira-cli

Priority should be a selection of options

Offen
#660 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
6k
Forks
413
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
1

Beschreibung

**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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.