ankitpokhrel / ankitpokhrel/jira-cli

jira issue assign fails with '400 Bad Request: No project, issue key or issue ID was provided'

Offen
#955 1 Kommentar 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

## Description

`jira issue assign` consistently fails with a `400 Bad Request` error regardless of project or user format.

## Steps to Reproduce

```bash
jira issue assign DEV-207949 "user@domain.com"
jira issue assign ITP-41459 "other.user@domain.com"
jira issue assign ITP-41459 username
```

All produce the same error:

```
Error:
- No project, issue key or issue ID was provided

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

## Expected Behavior

The issue should be assigned to the specified user, matching the documented usage:

```bash
jira issue assign ISSUE-1 jon@domain.tld
```

## Environment

- **Version**: Built from source (fork), base `v1.7.1`
- **Go**: `go1.25.6`
- **Platform**: `darwin/arm64`
- **Jira Cloud**: Atlassian-hosted instance

## Workaround

Using the Jira REST API directly works:

```bash
curl -s -u "user@domain.com:$TOKEN" \
-X PUT "https://instance.atlassian.net/rest/api/3/issue/ISSUE-KEY/assignee" \
-H "Content-Type: application/json" \
-d '{"accountId": ""}'
```

## Notes

- The error message `"No project, issue key or issue ID was provided"` comes from the Jira API, suggesting the CLI is not sending the issue key correctly in the request body.
- Other commands like `jira issue view`, `jira issue comment add`, and `jira issue edit` work fine with the same issue keys.
- Possibly a regression in how the assign command constructs the API request payload.

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.