Skip to content

Feature request: manipulate project issue status #3295

@totternessZB

Description

@totternessZB

Description of the problem, including code/CLI snippet

My team is currently moving to tracking issues using the issue status introduced in Gitlab 18.2:
https://about.gitlab.com/releases/2025/07/17/gitlab-18-2-released/#custom-workflow-statuses-for-issues-and-tasks

My company uses this library to automate opening gitlab issues. Below is a snippet from said automation. I tried to get at what I could send in the create() method by dumping issue to JSON and got the following (company info redacted)

{
  "id": 177073754,
  "iid": ...,
  "project_id": ...,
  "title": "...",
  "description": "...",
  "state": "opened",
  "created_at": "2025-11-13T21:49:44.290Z",
  "updated_at": "2025-11-13T21:49:44.290Z",
  "closed_at": null,
  "closed_by": null,
  "labels": [
    ...
  ],
  "milestone": {
    "id": 4775912,
    "iid": ...,
    "project_id": ...,
    "title": "Development",
    "description": "Development (non-production) work that has yet to merge.",
    "state": "active",
    "created_at": "2021-10-01T18:45:11.056Z",
    "updated_at": "2025-02-27T21:17:20.634Z",
    "due_date": "2030-06-30",
    "start_date": "2026-06-01",
    "expired": false,
    "web_url": "..."
  },
  "assignees": [],
  "author": {
    "id": 31427160,
    "username": "project_..._bot_...",
    "public_email": null,
    "name": "...",
    "state": "active",
    "locked": false,
    "avatar_url": "...",
    "web_url": "..."
  },
  "type": "ISSUE",
  "assignee": null,
  "user_notes_count": 0,
  "merge_requests_count": 0,
  "upvotes": 0,
  "downvotes": 0,
  "due_date": null,
  "confidential": false,
  "discussion_locked": null,
  "issue_type": "issue",
  "web_url": "...",
  "time_stats": {
    "time_estimate": 0,
    "total_time_spent": 0,
    "human_time_estimate": null,
    "human_total_time_spent": null
  },
  "task_completion_status": {
    "count": 1,
    "completed_count": 0
  },
  "weight": 1,
  "blocking_issues_count": 0,
  "has_tasks": false,
  "_links": {
    "self": "...",
    "notes": "...",
    "award_emoji": "...",
    "project": "...",
    "closed_as_duplicate_of": null
  },
  "references": {
    "short": "...",
    "relative": "...",
    "full": "..."
  },
  "severity": "UNKNOWN",
  "subscribed": true,
  "moved_to_id": null,
  "imported": false,
  "imported_from": "none",
  "service_desk_reply_to": null,
  "epic_iid": ...,
  "epic": {
    "id": ...,
    "iid": ...,
    "title": "..",
    "url": "",
    "group_id": ...
  },
  "iteration": null,
  "health_status": null
}

Unfortunately, I was not able to discern from this information how to set the status. Please let me know if it exists and this is a case of user error.

Expected Behavior

issue: ProjectIssue = jointsProject.issues.create(
    {
      'title': issueTitle,
      'description': issueDescription,
      'status': 'Approval Queue',                               # This is what I'd like to work, or some equivalent
      'labels': [ ],
      'milestone_id': developmentMilestoneID,  
      'epic_iid': epicID,
      'weight': 1,
    }
  )
Image

Actual Behavior

Image

Specifications

  • python-gitlab version: 7.0.0
  • Gitlab server version (or gitlab.com): GitLab Enterprise Edition 18.6.0-pre b618d849058

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions