Drag-and-drop and move file to file directory in macOS does not work
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.7k
- Forks
- 3.6k
- Avg merge
- 23h 39m
- Merged PRs (30d)
- 381
Description
JabRef version on
JabRef 5.2--2020-12-24--6a2a512
Mac OS X 10.16 x86_64
Java 15.0.1
- Mandatory: I have tested the latest development version from http://builds.jabref.org/main and the problem persists (in
JabRef 5.3--2021-04-29--cfb14b2 Mac OS X 10.16 x86_64 Java 15.0.2 JavaFX 16+8)
Steps to reproduce the behavior:
- Open Entry editor on "General" tab.
- Drag and drop file from, say,
Downloadsfolder to theFilefield while pressingOption(on macOS) to move file to the file directory. - Expected behavior: the file is moved from
Downloadsfolder to the file folder and renamed according to the ruleMain file directory+File directory pattern+Filename format pattern(set inJabref Preferences->Linked Files). - Observed behavior: the file is copied to
Main file directoryand renamed according to theFilename format pattern. That is, there are two bugs: 1)Optionkey does not enforce moving instead of copying; 2)File directory patternis ignored.
Example.
I try to link a PDF file named ~/Downloads/pcbi1000.pdf to a BibTex entry with fields (bibtexkey = Author2021, title="My Wonderful Paper", year=2021) and move it with rename pattern to the file directory.
My settings are:
Main file directory:/Users/dima/Documents/ReferencesFile directory pattern:papers/[year]Filename format pattern:[bibtexkey] - [title]
Therefore, I expect the file to be renamed from from ~/Downloads/pcbi1000.pdf to /Users/dima/Documents/References/papers/2021/Author2021 - My Wonderful Paper.pdf.
Observed behavior: File is copied to /Users/dima/Documents/References/Author2021 - My Wonderful Paper.pdf
Log File
Paste an excerpt of your log file here
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Entry editor's General tab and trace the file-field drag-and-drop handling, then check how the Linked Files preferences provide the Main file directory, File directory pattern, and Filename format pattern. Reproduce the macOS Option-key case using the example settings. Done means the source file is moved rather than copied and the configured directory and filename patterns are both applied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100