-
-
Notifications
You must be signed in to change notification settings - Fork 853
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
maxResult should allow values >= 0 #1823
Comments
I agree that the way this is handled probably is not the most elegant, but maybe this workaround can alleviate the pain, while people check if this misbehaviour is worth adjusting: Set unplanned = client.search_issues(
jql_str=f'project = {project} '
f'AND type != subtask '
f'AND priority = Highest '
f'AND created >= {start} AND created >= {end}',
maxResults="0"
) Jannik Meinecke [email protected] on behalf of MBition GmbH. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug summary
The API allows for specifying fewer than 50 results, so should the SDK. For example, I want to even be able to set 0 if I just want to get the count for the query result, which currently, I cannot.
Is there an existing issue for this?
Jira Instance type
Jira Cloud (Hosted by Atlassian)
Jira instance version
cloud
jira-python version
3.6.0
Python Interpreter version
3.10.6
Which operating systems have you used?
Reproduction steps
I believe the problem is here:
jira/jira/client.py
Lines 732 to 735 in 0975053
There is a statement
if maxResults:
which evaluates to false when zero and the fo.lowing elif statement sets it to a batch size of 100. I find it strange to use an int as a boolean in this way, so I wonder if this was intended.Stack trace
In my case it was revealed during an unrelated error (notice maxResults at the end of the URL)
Expected behaviour
When I set
maxResults=0
then that is what should be sent to the server.Additional Context
No response
The text was updated successfully, but these errors were encountered: