Skip to content

Changing milestone of issue does not work #1432

Closed

Description

@Cynerd

Description of the problem, including code/CLI snippet

I am trying to change milestone of issue. I understand that I should set milestone_id with valid ID of milestone (reference #612 as well as https://docs.gitlab.com/ee/api/issues.html#edit-issue). The problem is that it seems to not work. The code passes without any error or warning but issue still has the old milestone assigned.

    project = ctx.projects.get(265)
    issue = project.issues.get(729)
    issue.milestone_id = 1372
    issue.save()

I am sure that I am setting correct milestone ID as I am getting it just few lines prior using code:

    group = ctx.groups.get(GROUP)
    new_milestone = next(group.milestones.list(title=new_milestone, as_list=False))
    print(new_milestone.id)

Expected Behavior

Milestone changes.

Actual Behavior

Nothing happens.

Specifications

  • python-gitlab version: 2.6.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 13.10.3

Activity

  1. Cynerd commented on May 27, 2021

    @Cynerd
    Author

    The same behavior with python-gitlab 2.7.1 and Gitlab 13.11.3.

  2. nejch commented on May 30, 2021

    @nejch
    Member

    @Cynerd could you check if this might be related to your redirect issue in #1477? Then we can close at least one of these.

  3. Cynerd commented on Jun 1, 2021

    @Cynerd
    Author

    You are right. With redirect resolution suggested in #1477 it works.

  4. locked as resolved and limited conversation to collaborators on Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions