jabref
                                
                                
                                
                                    jabref copied to clipboard
                            
                            
                            
                        Delete entry should ask to delete linked files
Is your suggestion for improvement related to a problem? Please describe. If you have an entry with a linked file and you delete the entry, then most likely you also want to remove the linked files to keep your pdfs in sync with your entries.
Describe the solution you'd like If there is a linked file, ask the user to also delete it.
Context https://github.com/JabRef/jabref/blob/4e79f1a531a2110f521f29bccf8f0bb0aaebbf79/src/main/java/org/jabref/gui/LibraryTab.java#L454-L456
Hi there,
I'd like to help with this issue. Could you please assign it to me? I'll take a look and work on resolving the problem. If you have any specific information or steps you'd like me to follow, please feel free to share them.
Thank you!
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.
Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.
Maybe it is possible to implement this as (non-default) preference? +1 for Pop-ups are evil.
Hi @shawn-jj, do you mind if I take a try locally as I am aslo interested in this issue ?
@1911-revo Usually, we try to only have one student (or one group of students that know each other) working on one issue at a time to prevent issues with grading. You might wanna check out our good first issues projects page.
It is already possible to delete the file via right-click in the general tab. Maybe it is possible to re-use parts of the code.
Maybe it is possible to implement this as (non-default) preference? +1 for Pop-ups are evil.
First time delete of entry:
- Show popup.
- Title "Delete attached files"
 - Content: List of attached files
 - BONUS: In case an attached file is linked at another entry, gray it out
 - Buttons "Never delete attached files", "Keep attached files", "Delete attached files"
 
 - In case button "Never delete attached files" is pressed, store in preference, that pop up is not shown
 
Second time deletion of entry:
- Check preference for deletion of attached files
 - If "Never" break
 - Continue above at step 1
 
The preference should also be shown in JabRef's preference dialog.
Hi @shawn-jj, do you mind if I take a try locally as I am aslo interested in this issue ?
I'm sorry that I cannot share this issue with you😔 (guess you are also on comp2100 assignment?)
Note, that this issue might be connected to the first problem described here: https://github.com/JabRef/jabref/issues/9731
@shawn-jj Please also try to craft JUnit test cases. Even without them, is there a timeline you can share with us?
@shawn-jj Please also try to craft JUnit test cases. Even without them, is there a timeline you can share with us?
I sincerely apologize for the recent slowdown in progress.
I have been occupied with other assignments last week, but I've successfully completed them. As a result, I can now put my full attention to resolving this issue. My goal is to have it resolved within the next week or two, and I will also add JUnit tests. I want to express my gratitude for your patience during this time.🥺
Thank you!
@shawn-jj Sure thing. I'll be on vacation from Thursday onwards (for three weeks), let's see, how it goes. Others are still around 😅.
An example test was crafted at https://github.com/u74981018/jabref/blob/issue_9798/src/test/java/org/jabref/AutomaticRelinkTest.java (as part of https://github.com/JabRef/jabref/pull/10526).
@koppor @tobiasdiez @shawn-jj can you please give more details about this issue Delete entry should ask to delete linked files #10509
@Dalvishubham Maybe you are not familiar with GitHub's UI. On the right side you see two things: a) the issue is reserved and b) there is already a PR on that. The PR is nearly done. Thus, no need to work here.