-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The directory pattern is not considered when checking if a file can be moved #7908
Comments
Hello! |
Hello @bfrodsham, welcome! We have tried to gather quite a few resources for getting started in https://devdocs.jabref.org/contributing, and we strive to keep them up-to-date. If you have any specific questions, there is the Gitter channel as well https://gitter.im/JabRef/jabref I haven't spent enough time on this issue to know for sure where are the best starting points in the code, but the linked files and locations are where I would start. And asking questions is definitively a good way of getting started :) |
Oups, and probably the most important part, make sure you can replicate the problem in a running copy of JabRef! |
I'm slowly moving along on the issue. In the free time I have to work on the issue, I've finally set up a workspace as given in the guide, and now I'm focusing on replicating the problem. I'm trying to understand step two in your instructions. What would qualify as a linked file? Or do you have a sample linked file I could use? Also, 2.1 and 2.2 are describing the behaviors that need to be fixed, correct? I gather that if the linked file is in the main file directory, then the "move file to file directory" option should be enabled and if the linked file is already in the correct file directory, then the option should be disabled. Is that correct? Thanks in advance for your patience and guidance. |
With linked file I meant an entry with the location of a file on the hard drive in the “file” field. I don't have access to a computer for a couple of days so I can't send an example. I think the simplest way of creating an entry with a linked file might be using the web-search feature of JabRef and download the (often) linked pdf in the entry-editor. I am not sure but arxiv might be good for this. Alternatively it should be possible to link any pdf manually in the entry editor, I believe there is a + button to the right of the file field. And yes, you are interpreting 2.1 and 2.2 correctly. Different suggestions are also welcome if you think a different behavior would be better. |
I was looking into this and I was wondering if it was still open since its been so long. |
Hi, I am a CS student. I was able to reproduce this issue. Can I work on it if it's still open? |
It is a little bit embarassing to have to say this on behalf of the Jabref community, but if you don't receive an answer, i would think that this is a yes. Give it a week or so, if @elijahzucker or @bfrodsham don't answer within this period, i personally would give it a go. Giving them this grace period and giving them a chance to explain what they have done so far and if they are still working on it would be a good thing, because there just recently was a case where two people coincidentally worked on the same thing at the same time without knowing about each other, both assuming nobody else was working on it. Since you are a student, you might have deadlines, so if you want to start immediately, choosing another good first issue is always an option. :-) |
@ruoyu-qian @ThiloteE Yes, sorry I never got around to finishing this up! I got busy with university and all. Please go right ahead! |
Thanks for the quick response @bfrodsham. |
I'd +1 this. Start by checking if there are any open PRs and if you can reproduce the behavior in your local setup. We try to be good about keeping the issues/PRs up-to-date but things don't always turn out as one would wish. @elijahzucker sorry about this one, I missed it in my backlog :/ |
I'm also stuck with college work so go ahead I'm not gonna have time to work on this. |
Thanks @elijahzucker for letting me know! |
Hi, I have submitted PR for review. Let me know if you have any questions or there are any improvements can be done. Thanks!! |
JabRef version on
Steps to reproduce the behavior:
Options
->Preferences
->Linked files
, make sure that1.1. There is an absolute path for
Main file directory
1.2.
Search and store files relative to library file location
is OFF1.3. There is a non-empty
File directory pattern
(e.g.,Debugging
)2.1. If the linked file is in the
Main file directory
, theMove file to file directory
will always be disabled (instead of giving the option to move the file to the correct directory)2.2. If the linked file is in the correct directory, the
Move file to file directory
is always enabled (even if it doesn't do anything, because it tries to move the file to the directory it is already in)The
jabref/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java
Lines 327 to 340 in 477118c
should probably add a suggested directory name to
newDir
, similar tojabref/src/main/java/org/jabref/logic/externalfiles/LinkedFileHandler.java
Lines 124 to 129 in 477118c
but using
jabref/src/main/java/org/jabref/logic/util/io/FileUtil.java
Line 290 in 477118c
The origin is this bug report is https://discourse.jabref.org/t/how-to-use-file-directory-pattern/2802/
The text was updated successfully, but these errors were encountered: