Project

General

Profile

Actions

Defect #39838

closed

Document model has no author field by itself

Added by salman mp 12 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Documents
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

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

Is duplicate of Redmine - Defect #6141: No data to display in DocumentsNew2010-08-16

Actions
Actions #1

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
Actions #2

Updated by Mischa The Evil 11 months ago

  • Is duplicate of Defect #6141: No data to display in Documents added
Actions #3

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 no author 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.

Actions #4

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) 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. e.g in source:/trunk/app/controllers/documents_controller.rb#L41 why the last attachment's author considered as author of related document?

Actions #5

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) 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).

Actions #6

Updated by salman mp 11 months ago

Thanks.
After 10 years, Is there any hope that this model will be fixed? :)

Actions

Also available in: Atom PDF