Defect #28309

Error when query filter model inherited from other class which inherited from Query

Added by Eduard Panov 3 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Code cleanup/refactoring
Target version:-
Resolution: Affected version:3.4.4

Description

We have a plugin, where: MyPluginModelQuery < MyCustomClassQuery < Query
After redmine update 3.4.4 have a string https://github.com/redmine/redmine/commit/fd3c08aaa107e2c5a412a06aea6890b147e46aaf#diff-0fd59f260b10d1cfcf0c5695de8a99e6R90
where call Query.get_subclass
where a condition subclasses.include? klass

And if my MyPluginModelQuery not a direct children of Query error raised.

My suggest: improve string https://github.com/redmine/redmine/blob/master/lib/redmine/subclass_factory.rb#L32 for support children's any deep, for example unless klass < self

Also available in: Atom PDF