Skip to content

API: Allow setting the issue number when creating an issue #7790

Closed as not planned
@argv-minus-one

Description

@argv-minus-one
  • Gitea version: 1.9.0
  • Git version: 2.20.1
  • Operating system: Debian Linux amd64
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

Please allow creating issues through the API (POST /api/v1/repos/{user}/{repository}/issues) with a specific issue number/index. This would allow importing issues from other issue trackers while preserving their issue numbers.

Workaround

This can also be accomplished by changing the database field directly, after the issue is created, using a query like:

UPDATE issue SET `index` = ? WHERE id = ?

…where the first parameter is the desired issue number, and the second parameter is the id field in the JSON response from creating the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposal/rejectedWe have reviewed the proposal but disagree in that it should not be implemented into Gitea.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions