Skip to content

Changing milestone of issue does not work #1432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Cynerd opened this issue Apr 30, 2021 · 3 comments · Fixed by #1486
Closed

Changing milestone of issue does not work #1432

Cynerd opened this issue Apr 30, 2021 · 3 comments · Fixed by #1486

Comments

@Cynerd
Copy link

Cynerd commented Apr 30, 2021

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
@Cynerd
Copy link
Author

Cynerd commented May 27, 2021

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

@nejch
Copy link
Member

nejch commented May 30, 2021

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

@Cynerd
Copy link
Author

Cynerd commented Jun 1, 2021

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

@Cynerd Cynerd closed this as completed Jun 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2022
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 a pull request may close this issue.

2 participants