Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

fix(move): correct API endpoint formats for bulk move#64

Merged
piekstra merged 1 commit intomainfrom
piekstra/fix-move-api-format
Jan 30, 2026
Merged

fix(move): correct API endpoint formats for bulk move#64
piekstra merged 1 commit intomainfrom
piekstra/fix-move-api-format

Conversation

@piekstra
Copy link
Copy Markdown
Collaborator

Summary

  • Fix targetToSourcesMapping key format from PROJECT:TYPE_ID to PROJECT,TYPE_ID (comma-separated per Jira API docs)
  • Fix task status endpoint from /bulk/issues/move/{taskId} to /bulk/queue/{taskId}
  • Add integration tests for move functionality
  • Document JIRA_TEST_MOVE_TARGET_PROJECT env var for running move tests

Test plan

  • Verified move command works: jtk issues move MON-3603 --to-project ON --to-type Task
  • Verified task status polling completes successfully
  • Integration tests pass: go test -tags=integration ./integration/... -run TestMove
  • Unit tests pass: make test
  • Lint passes: make lint

Details

The move command was returning 400 Bad Request due to incorrect key format in the request body. Per the Jira API documentation, the targetToSourcesMapping keys should use comma separators (PROJECT,TYPE_ID), not colons.

Additionally, checking task status was returning 404 because the endpoint /bulk/issues/move/{taskId} doesn't exist - the correct endpoint is /bulk/queue/{taskId}.

- Fix targetToSourcesMapping key format from "PROJECT:TYPE_ID" to
  "PROJECT,TYPE_ID" (comma-separated per Jira API docs)
- Fix task status endpoint from /bulk/issues/move/{taskId} to
  /bulk/queue/{taskId}
- Add integration tests for move functionality
- Document JIRA_TEST_MOVE_TARGET_PROJECT env var

The move command was returning 400 Bad Request due to incorrect key
format, and 404 when checking task status due to wrong endpoint.
@piekstra piekstra merged commit 0823629 into main Jan 30, 2026
2 checks passed
@piekstra piekstra deleted the piekstra/fix-move-api-format branch January 30, 2026 02:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant