8000 Unable to save changes to a board · Issue #801 · python-gitlab/python-gitlab · GitHub
[go: up one dir, main page]

Skip to content
Unable to save changes to a board #801
Closed
@Xavier-Wattermann

Description

@Xavier-Wattermann

Description of the problem, including code/CLI snippet

When using the API I cannot save a board, even though this behavior is supported by the API. It looks like the SaveMixin is (deliberately?) omitted from the class definition of GroupBoard and ProjectBoard.

Here's the code we're using. At our company we use two group level boards - one to display the current sprint's issues and one to display the next sprint's issues. I am writing a script to automatically update the boards at the start of the sprint, such that they each display the correct milestone.

    def update_board(self):
        """
        Updates the current board to point to the next sprint,and the next sprint board to point to the next-next sprint
        :return: None
        """
        current_board = None
        next_board = None

        # get the boards we're interested in
        for board in self.group.boards.list():
            if board.name == 'Current Sprint':
                current_board = board
            elif board.name == 'Next Sprint':
                next_board = board

        #  a function that returns two milestones
        current_milestone, next_milestone = self.get_milestones()

        current_board.milestone = current_milestone
        next_board.milestone = next_milestone

        #  save them - this code doesn't work because save() isn't a method of the GroupBoard
        current_board.save()
        next_board.save()

Expected Behavior

A save function is available for boards, or if another method to update boards is expected, that method is documented

Actual Behavior

A save function is not available for boards. This (appears to) make it impossible to save changes to a board. The docs do not appear to mention another mechanism to do this.

Specifications

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0