salman mp wrote in #note-4:
Mischa The Evil wrote in #note-3:
That's true, indeed. And I have been bitten by this behavior several times in the past too but it seems to me that this was an intentional design decision by Jean-Philippe made long ago (first version 0.1.0). This becomes clear by e.g. comparing the Document (source:/trunk/redmine/app/models/document.rb@4) and News (source:/trunk/redmine/app/models/news.rb@4) models from Redmine 0.1.0.
You'r right, but it seems that the design has some shortage.
I haven't said anywhere that the current design doesn't have its short-comings, flaws, etc. This is what #6141 covers IMHO.
[...] e.g in source:/trunk/app/controllers/documents_controller.rb#L41 why the last attachment's author considered as author of related document?
In this case it is behavior needed to let any document with attachments show up at all in case the list is sorted by author (like is done similarly in the acts_as_event macro declaration for the model). Without it we effectively get the same result as reported in #6141 but then for all documents (in contrast, it now only applies to documents without any attachment).