Defect #39838
closedDocument model has no author field by itself
0%
Description
Hi
Model Document
has no author
field and the author retreived from related attachments.
If a document has no attachment, there is no related author. For example if you sort documents by author, documents that has no attachment will not show.
Related issues
Updated by Marius BÄ‚LTEANU 11 months ago
- Subject changed from Modle Document has no author field by itself to Model Document has no author field by itself
Updated by Mischa The Evil 11 months ago
- Is duplicate of Defect #6141: No data to display in Documents added
Updated by Mischa The Evil 11 months ago
- Subject changed from Model Document has no author field by itself to Document model has no author field by itself
- Status changed from New to Closed
- Resolution set to Duplicate
salman mp wrote:
Model
Document
has noauthor
field and the author retreived from related attachments.
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.
If a document has no attachment, there is no related author. For example if you sort documents by author, documents that has no attachment will not show.
This is previously reported as #6141. As such I'll close this issue as a duplicate of it.
Updated by salman mp 11 months ago
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) andNews
(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. e.g in source:/trunk/app/controllers/documents_controller.rb#L41 why the last attachment's author considered as author of related document?
Updated by Mischa The Evil 11 months ago
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) andNews
(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).