cat-in-136 / redmine_hearts

a redmine plugin which provides intra-Redmine Like/Fav reactions
https://www.redmine.org/plugins/redmine_hearts
GNU General Public License v2.0
33 stars 3 forks source link

Fix bug where NoMethodError is occurs when selecting "Like" column on the issue query #43

Closed cat-in-136 closed 1 year ago

cat-in-136 commented 1 year ago

The change in https://www.redmine.org/projects/redmine/repository/svn/revisions/21645 (#37255: Information Leak in QueryAssociationColumn/QueryAssociationCustomFieldColumn) makes visible? method to be called on the query.

The relations generated by QueryAssociationColumn.new(:hearts, :count do not have the visible? method. Instead use QueryColumn.new(:hearted_user_count and introduce hearted_user_count method to Heartable objects.

Note that there is an incompatibility of "Like" query filter ID: hearts.count -> hearted_user_count

fix #40