-
Notifications
You must be signed in to change notification settings - Fork 120
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
Filter on multiple roadmaps / target versions / fixed_version_id #205
Comments
Hi, don't have much time right now, but you can see all the available operators here. But it looks like there is no such operator as |
Hi, thanks for your help. I managed to get some results by following your advice: Get all roadmaps in project: Remove the version IDs belonging to roadmaps that I want to exclude, and then create a filter string on this format: Then retrieve the issues using: The only remaining problem is that some issues are not assigned to a roadmap, and these are of course not part of the result of my filter above. Is there a way to solve this or do I have to make a separate filter and use "fixed_version_id = '!*'" and then somehow merge my results? |
Well, as far as I know you can't apply 2 filters at the same time, but actually it's better to ask Redmine developers at redmine.org since Python-Redmine just passes through this filter strings to Redmine. So I believe yes, you have to make 2 separate requests and then process them separately or create a new ResourceSet object which contains results from both queries. One optimisation I can recommend you to do is to just use |
ok, thanks! |
I just found another solution! It turned out that it is possible to filter for "not in" by writing like this: Looks like this will solve my problems. Maybe someone else will find it useful too. Thanks again. |
@nyrell That's awesome, thanks for sharing. I will add those filter tricks to docs in the near future. |
Great! |
Hello! Why do you call versions by "roadmaps" ? Please tell is there a way to get true "roadmap" page (http://www.redmine.org/projects/redmine/roadmap) content via api? |
@gekmcfh Unfortunately no. |
i´m trying to use python-redmine to create a filter that returns all issues of the open versions but i don´t find the way. i just used |
@cdmb80 It's all in the docs https://python-redmine.com/resources/issue.html#filter You've used the wrong parameter, it's not version_status, but status_id. |
@maxtepkeev Thanks for answering, does this status_id refer to the status of the issue or version? |
@cdmb80 issue |
I need the issues of the currently open versions is it that posible? |
@cdmb80 Yes, add the fixed_version_id parameter (it's actually discussed right in this topic) |
@maxtepkeev thank you |
I couldn't add that filter, if you could help me I would really appreciate it |
Hello, when i apply the filters i get a response like that: <redminelib.resultsets.ResourceSet object with Issue resources> what is that for? |
@cdmb80 It's an iterable of Resource objects (can be empty if response returned no objects). I suggest you read the docs from the very beginning till the very end, because absolutely all the questions you've asked arise only due to not reading the docs. |
I am trying to use python-redmine to create a filter that returns all issues that NOT belong to target version A or target version B.
In Redmine I can create this filter easily and it results in the following URL:
How can I do this using python-redmine? Is it even possible?
I have been experimenting with things like:
redmine.issue.filter(project_id = 1, status_id = 'open', fixed_version_id = '156,134')
but so far I have not been able to get it to accept multiple target versions. It seems negation can be done with "!" like so:
redmine.issue.filter(project_id = 1, status_id = 'open', fixed_version_id = '!156')
Any ideas on how to get this to work?
The text was updated successfully, but these errors were encountered: