Description
A user might move files in the file directory without JabRef.
Then, JabRef does not find the file:
But it still exists.
Example:
- Open `test-support\src\manual-tests\issue-9798\issue-9798.bib in JabRef
- Start "Lookup" -> "Find unlinked files"
- Now, it finds "minimal.pdf"
Current behavior: Blank right of minimal.pdf - and it would be re-imported
Expected result:
File should be relinked - and following shown in the status bar
file relinked to entry "minimal"
Alternative explanation:
Start:
@misc{test,
file = {a.pdf}
}
File a.pdf
exists
User moves a.pdf
into folder-a
.
When "Find unlinked files" is started, JabRef should
- Recognize that
a.pdf
oftest
is missing folder-a/a.pdf
does not belong to any entry- Rewrite the link of
test
froma.pdf
tofolder-a/a.pdf
If a.pdf
exists multiple times, no rewrite should be done.
First implementation
The functionality should be in "Automatically set file links" (Quality -> Automatically set file links). In case it is absolutely sure that the file was moved (i.e., no two files with the same name), they should be moved.
Current output:
Follow-up implementation (NOT IN SCOPE OF THIS ISSUE)
(The following text is only a reminder of the development team to open a new issue)
The "Search for unlinked files" (Lookup -> Find unlinked files) dialog should get two columns as search result. Currently 1.
- column 1: file x@folder y (as it is currently; with checkmarks)
- column 2: candidate entry (citation key. If clicked, main table jumps to that entry)
In case no candidate entry exists, "" is put in. In case two (or more) candidate entries exist, the cell turns into a dropdown. The jump link is next to the drop down.
Update 2024-01-09: Testing effort high is serious. Crafting test cases for different scenarios is necessary. See especially the comment at #9798 (comment).
Update 2024-03-05: Testing effort high is really serious. A single test case is not enough. The PR #10526 showed an initial test case. -- One could think of using https://github.com/google/jimfs for more advanced tests. However @TempDir
with some files should be enough.
Metadata
Metadata
Assignees
Type
Projects
Status
Status
Status