invenio-app-rdm icon indicating copy to clipboard operation
invenio-app-rdm copied to clipboard

Administration: all drafts are shown to have "0 bytes"

Open max-moser opened this issue 1 year ago • 7 comments

Package version: 12.0.0rc2

Describe the bug

In the administration panel, the entry for each draft states 0 bytes | #0, even if the draft has uploaded files.

Expected behavior

The drafts show the actual amount of files + data uploaded

Screenshots

For a screenshot, see https://github.com/inveniosoftware/invenio-app-rdm/issues/2716

max-moser avatar Jun 26 '24 14:06 max-moser

This issue was automatically marked as stale.

github-actions[bot] avatar Aug 26 '24 06:08 github-actions[bot]

This issue was automatically marked as stale.

github-actions[bot] avatar Oct 26 '24 06:10 github-actions[bot]

This issue was automatically marked as stale.

github-actions[bot] avatar Dec 26 '24 06:12 github-actions[bot]

This issue was automatically marked as stale.

github-actions[bot] avatar Mar 01 '25 06:03 github-actions[bot]

there are some problems:

mismatch between what is in the mapping here and what is implemented here . as i understand: it is implemented as dict with variable keys for every file! which is not the way it is implemented in the mapping.

further include_entries is always False which never executes the if

i think this also hided the bug that long because otherwise the mapping mismatch should have popped up earlier

utnapischtim avatar May 13 '25 14:05 utnapischtim

there are some problems:

mismatch between what is in the mapping here and what is implemented here . as i understand: it is implemented as dict with variable keys for every file! which is not the way it is implemented in the mapping.

further include_entries is always False which never executes the if

i think this also hided the bug that long because otherwise the mapping mismatch should have popped up earlier

That might be an issue, but it looks like that the culprit of this specific issue is something else. From a quick check, but I did not have time to investigate further, it looks like that in records and drafts we are using the same SystemField. It feels like that the code you pointed out (the dump/post_dump) is never executed for drafts, but it is for records. So files are not dumped for drafts.

ntarocco avatar May 22 '25 14:05 ntarocco

This issue was automatically marked as stale.

github-actions[bot] avatar Jul 22 '25 06:07 github-actions[bot]