Skip to content

Epics index gives a 500 if your issues sort is set to priority or label priority

https://sentry.gitlap.com/gitlab/gitlabcom/issues/111557/

NameError: undefined local variable or method `project_foreign_key' for #<Class:0x00007f0c381b3af0>
  app/models/concerns/issuable.rb:186:in `order_labels_priority'
    project_column: "#{table_name}.#{project_foreign_key}",
  lib/gitlab/metrics/instrumentation.rb:159:in `block in order_labels_priority'
    .measure { super }
  lib/gitlab/metrics/method_call.rb:53:in `measure'
    retval = yield
  lib/gitlab/metrics/instrumentation.rb:159:in `order_labels_priority'
    .measure { super }
  app/models/concerns/issuable.rb:177:in `order_due_date_and_labels_priority'
    .order_labels_priority(excluded_labels: excluded_labels, extra_select_columns: [milestones_due_date])
...
(145 additional frame(s) were not displayed)

NameError: undefined local variable or method `project_foreign_key' for #<Class:0x00007f0c381b3af0>
Edited by Sean McGivern