Defect #11545

Overwriting existing method Issue.open

Added by Petr Pospisil over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:2.1.0
Resolution:Fixed Affected version:2.0.0

Description

Try
Project.first.issues.open => ArgumentError: wrong number of arguments (0 for 1)

Project.first.issues.open('public') => Errno::EACCES: Permission denied - public

From log:
Creating scope :open. Overwriting existing method Issue.open.

And others:
Creating scope :active. Overwriting existing method User.active.
Creating scope :open. Overwriting existing method Version.open.

etc..

Thanks for resolve

(workaround: Project.first.issues.visible.open)

Petr

kernel_open_method_fix.diff Magnifier (1.78 KB) Alexander Markelov, 2012-08-12 18:56

Associated revisions

Revision 10159
Added by Jean-Philippe Lang over 5 years ago

Prevents "Overwriting existing method Issue.open" warning (#11545).

Revision 10160
Added by Jean-Philippe Lang over 5 years ago

Prevent "Overwriting existing method User.active" warning, scope is already defined on the base class (#11545).

Revision 10199
Added by Jean-Philippe Lang over 5 years ago

Fixed that open scope on Project#issues raises an error (#11545).

Patch by Petr Pospisil.

Revision 10208
Added by Jean-Philippe Lang over 5 years ago

Prevents "Overwriting existing method Issue.open" warning (#11545).

History

#1 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from New to Confirmed
  • Priority changed from Urgent to Normal

#2 Updated by Alexander Markelov over 5 years ago

I hope the following patch will help.

#3 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from Confirmed to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.1.0
  • Resolution set to Fixed

Patch committed in r10199 with a test. Thanks for the fix.

#4 Updated by Petr Pospisil over 5 years ago

Thank you!

Also available in: Atom PDF