-
Notifications
You must be signed in to change notification settings - Fork 120
fix over 100 tickets problem in issue.filter #175
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
fix over 100 tickets problem in issue.filter #175
Conversation
Changes Unknown when pulling d726748 on niwatolli3:fix-next-issue-filter into ** on maxtepkeev:master**. |
Hi, Max-san. |
redminelib/engines/base.py
Outdated
bulk_params.append({'offset': offset, 'limit': limit}) | ||
bulk_param = dict(params) | ||
bulk_param.update({'offset': offset, 'limit': limit}) | ||
bulk_params.append(bulk_param) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be rewritten as bulk_params.append(dict(params, **{'offset': offset, 'limit': limit}))
Hi @niwatolli3 Apologies for the delay with an answer. Thanks for identifying this bug and fixing it. Can I ask you, please, to remove the |
fix over 100 tickets problem
d726748
to
f85ee06
Compare
Dear Max-san, Thank you for your comment.
|
Changes Unknown when pulling f85ee06 on niwatolli3:fix-next-issue-filter into ** on maxtepkeev:master**. |
3 similar comments
Changes Unknown when pulling f85ee06 on niwatolli3:fix-next-issue-filter into ** on maxtepkeev:master**. |
Changes Unknown when pulling f85ee06 on niwatolli3:fix-next-issue-filter into ** on maxtepkeev:master**. |
Changes Unknown when pulling f85ee06 on niwatolli3:fix-next-issue-filter into ** on maxtepkeev:master**. |
@niwatolli3 Perfect, thank you. I will try to write a unit test for this and release a new version with your fix ASAP. |
Thanks, Max-san! 💯 |
@niwatolli3 v2.0.2 is available on PyPI |
@maxtepkeev Thank you for your quick release 👍 |
When I execute redmine.issue.filter(tracker_id=3), I found the following problem.
The return value (issues) is strange. (Filter does not apply after 100 tickets are crossed)
Details
I run the following test code.
fetch redmine.org's tickets (tracker is "Patch" and status is incomplete)
URL: http://www.redmine.org/projects/redmine/issues?c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=subject&c%5B%5D=updated_on&c%5B%5D=category&f%5B%5D=status_id&f%5B%5D=tracker_id&f%5B%5D=&group_by=&op%5Bstatus_id%5D=o&op%5Btracker_id%5D=%3D&per_page=100&set_filter=1&utf8=%E2%9C%93&v%5Btracker_id%5D%5B%5D=3
TestCode
Result
(NG) the result contains ticket whose tracker_id is "Feature" (←is not "Patch")
(OK) the result only contains tickets whose tracker_id is "Patch"
Fixes
I found a problem in redminelib/engines/base.py.
variable balk_params is not passed filter condition, so I fixed it.
Test Results
(OK) the result only contains tickets whose tracker_id is "Patch"