Skip to content

Undefined local variable or method `mentioner' for SystemNotes::IssuablesService when USE_COMMIT_DATE_FOR_CROSS_REFERENCE_NOTE = true

Summary

The fix for #20153 (closed) was merged with an error. mentioned_in must be used instead of mentioner in the line https://gitlab.com/gitlab-org/gitlab/-/blame/master/app/services/system_notes/issuables_service.rb#L267.

Steps to reproduce

  • Use USE_COMMIT_DATE_FOR_CROSS_REFERENCE_NOTE = true in the /app/services/system_notes/issuables_service.rb
  • Commit and push some changes with an associated issue number
  • Look at the Admin Area > Monitoring > Background Jobs > Killed

What is the current bug behavior?

You will find the following error: NameError: undefined local variable or method mentioner for #<SystemNotes::IssuablesService:0x00007f7c8ed55d10> Did you mean? mentioned_in in the process_commit queue

What is the expected correct behavior?

No errors.

Possible fixes

Replace mentioner with mentioned_in (twice) in the line https://gitlab.com/gitlab-org/gitlab/-/blame/master/app/services/system_notes/issuables_service.rb#L267.

Edited by 🤖 GitLab Bot 🤖