anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
182 stars 72 forks source link

jammed execute #234

Closed ashrafalzyoud closed 2 years ago

ashrafalzyoud commented 3 years ago

when i try do this formula the plugin jamed self.custom_field_values = { 378=> Issue.where(tracker_id: 106).where("EXISTS (SELECT 1 FROM custom_values WHERE custom_values.customized_type = 'Issue' AND custom_values.customized_id = issues.id AND custom_values.custom_field_id = 362 AND custom_values.value = '2')").where("EXISTS (SELECT 1 FROM custom_values WHERE custom_values.customized_type = 'Issue' AND custom_values.customized_id = issues.id AND custom_values.custom_field_id = 100 AND custom_values.value = 'A')").count}

picman commented 3 years ago

Try the query directly in the database. It might be related to the size of your database and to the query itself. If I try an exact before save script for issues, it does nothing.