Skip to content
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

Delete entry should ask to delete linked files #10509

Closed
tobiasdiez opened this issue Oct 16, 2023 · 14 comments · Fixed by #10591
Closed

Delete entry should ask to delete linked files #10509

tobiasdiez opened this issue Oct 16, 2023 · 14 comments · Fixed by #10591
Assignees
Labels
external files FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty. type: enhancement

Comments

@tobiasdiez
Copy link
Member

tobiasdiez commented Oct 16, 2023

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

public void delete(BibEntry entry) {
delete(false, Collections.singletonList(entry));
}

@shawn-jj
Copy link
Contributor

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!

@ThiloteE ThiloteE moved this from Free to take to Reserved in Candidates for University Projects Oct 16, 2023
@ThiloteE ThiloteE moved this from Free to take to Reserved in Good First Issues Oct 16, 2023
@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Oct 16, 2023
@github-actions
Copy link
Contributor

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.

@ThiloteE
Copy link
Member

ThiloteE commented Oct 16, 2023

Maybe it is possible to implement this as (non-default) preference? +1 for Pop-ups are evil.

@1911-revo
Copy link

Hi @shawn-jj, do you mind if I take a try locally as I am aslo interested in this issue ?

@ThiloteE
Copy link
Member

@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.

@ThiloteE
Copy link
Member

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.
image

@koppor
Copy link
Member

koppor commented Oct 17, 2023

Maybe it is possible to implement this as (non-default) preference? +1 for Pop-ups are evil.

First time delete of entry:

  1. 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"
  2. In case button "Never delete attached files" is pressed, store in preference, that pop up is not shown

Second time deletion of entry:

  1. Check preference for deletion of attached files
  2. If "Never" break
  3. Continue above at step 1

The preference should also be shown in JabRef's preference dialog.

@shawn-jj
Copy link
Contributor

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?)

@AEgit
Copy link

AEgit commented Oct 17, 2023

Note, that this issue might be connected to the first problem described here:
#9731

@koppor
Copy link
Member

koppor commented Oct 23, 2023

@shawn-jj Please also try to craft JUnit test cases. Even without them, is there a timeline you can share with us?

@shawn-jj
Copy link
Contributor

@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!

@koppor
Copy link
Member

koppor commented Oct 24, 2023

@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 #10526).

@Dalvishubham
Copy link

Dalvishubham commented Jan 23, 2024

@koppor @tobiasdiez @shawn-jj can you please give more details about this issue Delete entry should ask to delete linked files #10509

@koppor
Copy link
Member

koppor commented Jan 24, 2024

@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.

@github-project-automation github-project-automation bot moved this from Normal priority to Done in Features & Enhancements Feb 26, 2024
@github-project-automation github-project-automation bot moved this from Reserved to Done in Good First Issues Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external files FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty. type: enhancement
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants