FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Missing parameters in iteration search · Issue #2795 · python-gitlab/python-gitlab · GitHub

Repository navigation

Missing parameters in iteration search #2795

Description

Description of the problem, including code/CLI snippet

In https://github.com/python-gitlab/python-gitlab/blob/main/gitlab/v4/objects/iterations.py the iteration implementation let you to filter the list with a search parameter.

According to the API doc (https://docs.gitlab.com/ee/api/iterations.html) by default this parameter filter the title of the iteration.

If the iteration is created by a cadence, title and description will be empty, so you will not be able to search for a specific iteration.

Expected Behavior

I would like to pass the additional parameter, documented in the API, "in" to select where the search will be performed, and search in "cadence_title" for cadence derivated iterations.

Actual Behavior

The search is only performed on the iteration title, that is empty when built from a cadence.

Specifications

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

Update

After a first iteration we decided to extend the scope to all the new parameters available

Activity

  1. nejch commented on Feb 12, 2024

    Member

    Thanks for the report and the PR @cristianocasella!

    Note that the list filter attribute is only used for the CLI. You can pass arbitrary arguments to the list methods when using the API already.

    The problem with the in keyword is that it collides with python's in keyword so you'll always get a SyntaxError. For this reason, we have to use the query_parameters argument:

    group.iterations.list(query_parameters={"in": "title"}) 
    

    See https://python-gitlab.readthedocs.io/en/stable/api-usage.html#managers for more details.

  2. cristianocasella commented on Feb 12, 2024

    ContributorAuthor

    Thanks for the report and the PR @cristianocasella!

    Note that the list filter attribute is only used for the CLI. You can pass arbitrary arguments to the list methods when using the API already.

    The problem with the in keyword is that it collides with python's in keyword so you'll always get a SyntaxError. For this reason, we have to use the query_parameters argument:

    group.iterations.list(query_parameters={"in": "title"}) 
    

    See https://python-gitlab.readthedocs.io/en/stable/api-usage.html#managers for more details.

    Really thanks for your support and hint.

    I decided to extend the PR to all the parameters currently available, to save other people time I also added your help above into the project documentation.

    Let me know if it works for you

  3. changed the title [-]Missing "in" field in iteration search[/-] [+]Missing parameters in iteration search[/+] on Feb 12, 2024
  4. nejch commented on May 22, 2024

    Member

    Done in #2796.

  5. locked as resolved and limited conversation to collaborators on May 26, 2025
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


      Back | FazBrowse Home | New Git URL