Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #3548

Closed
Open
Created Apr 08, 2013 by Administrator@rootOwner

Closing issues via API

Created by: m4tthumphrey

There is something very wrong with the method of closing issues via the API. Originally you could close and then reopen issue simply with the closed attribute (true or false) as part of the PUT request. Now it seems to be a complete mess...

  1. There is a state property which contains the current state of the issue (closed or open (and possibly reopen)) but cannot be updated explicitly
  2. You have to update the state_event property to update the state of the issue (completely undocumented - I had to look into /lib/api/issues.rb to see what was going on)
  3. The documentation is so wrong - it currently states that you should pass closed as 1 to close an issue which simply does nothing
  4. Once a comment has been closed you cannot reopen it any more because it is treated as deleted once you close it

I purposely haven't opened a pull request for this because I have no idea of @randx's intentions to this area. I believe the confusion was caused when the response codes were changed.

I will gladly take this on myself if I can get confirmation of how it should be handled.

Assignee
Assign to
Time tracking