Defect #37539

Issue index filtering with custom field became unusable with Redmine 4.2.7

Added by Onur Küçük 2 months ago. Updated 6 days ago.

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


Category:Issues filter
Target version:-
Resolution:Duplicate Affected version:4.2.7


When running an issue query with a custom field used on filtering, the query result that used to take about 72ms now takes 85652ms, rendering the page unusable on Redmine 4.2.7.

Reverting this change or even only reverting the issue_custom_field.rb change (removing issue visibility condition) makes the performance like 4.2.6. See the attached logs for details. Note that the custom field 105 in this example is a boolean issue custom field, but this issue does not seem to be related to the type of the custom field.

sh: hg: command not found
sh: bzr: command not found
  Redmine version                4.2.7.stable
  Ruby version                   2.7.6-p219 (2022-04-12) [x86_64-linux]
  Rails version                  5.2.8
  Environment                    production
  Database adapter               PostgreSQL
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
  Subversion                     1.14.1
  Cvs                            1.12.13
  Git                            2.35.3
Redmine plugins:
  no plugin installed

Using Postgresql 14.4 but note that this is reproducable on different environments with (minor) different versions of Postgresql Ruby etc.

redmine_4_2_7.log - slow log (15.1 KB) Onur Küçük, 2022-08-02 23:44

redmine_4_2_7_issue_custom_field_reverted.log - fast log with changes reverted (18.5 KB) Onur Küçük, 2022-08-02 23:44

Related issues

Duplicates Redmine - Defect #37268: Performance problem with Redmine 4.2.7 and 5.0.2 Closed


#1 Updated by Go MAEDA 2 months ago

  • Duplicates Defect #37268: Performance problem with Redmine 4.2.7 and 5.0.2 added

#2 Updated by Go MAEDA 2 months ago

  • Resolution set to Duplicate

I am closing this issue because the problem has already been reported as #37268.

#3 Updated by Marius BALTEANU 6 days ago

  • Status changed from New to Closed

Fix merged to stable branches and the new releases will be published this weekend.

Also available in: Atom PDF