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}
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.
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}