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
[#54459] Add AvailableProjectAttributesFilter
to project queries to display the mapped projects list in projects attribute settings view
#15400
[#54459] Add AvailableProjectAttributesFilter
to project queries to display the mapped projects list in projects attribute settings view
#15400
Conversation
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.
Nicely worked through the whole mass of code that are the queries. It is quite something to stomach.
I added some remarks. Not all of them are actually must haves so let's talk when you are unsure.
app/models/queries/projects/filters/available_project_attributes_filter.rb
Outdated
Show resolved
Hide resolved
app/models/queries/projects/filters/available_project_attributes_filter.rb
Show resolved
Hide resolved
…in projects attribute settings view https://community.openproject.org/work_packages/54459
2bd405c
to
96ac329
Compare
…ubquery Build a distinct subquery from the `project_custom_fields_project_mapping` first before finding the projects. This way chained scopes such as `limit` work as expected.
…include negation scope
dcd18b1
to
92d59bc
Compare
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.
Looks good to me, @akabiru.
I have one remark but that is based on guesswork so feel free to ignore it.
https://community.openproject.org/work_packages/54459
Wat?
Project Attributes are
ProjectCustomField
s, when they are activated within a project a mapping is created in the join tableProjectCustomFieldProjectMapping
How
Add a new filter that runs an inclusion search against
ProjectCustomFieldProjectMapping
join table, returning a list of projects where the given custom_field_ids values matchExample