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

Warning Message for Moving Attached Open Files #10121

Closed
Hosein-Rahnama opened this issue Jul 27, 2023 · 26 comments · Fixed by #11987
Closed

Warning Message for Moving Attached Open Files #10121

Hosein-Rahnama opened this issue Jul 27, 2023 · 26 comments · Fixed by #11987
Assignees
Labels
📍 Assigned Assigned by assign-issue-action (or manually assigned) component: logging component: ui FirstTimeCodeContribution Triggers GitHub Greeter Workflow good first issue An issue intended for project-newcomers. Varies in difficulty. [outdated] type: enhancement

Comments

@Hosein-Rahnama
Copy link

Hosein-Rahnama commented Jul 27, 2023

Suppose that you attach a file to an entry. Then, using a cleanup you want to move that file to the General File Directory of the library. If the attached file is open, the file is not moved but no warning message is shown. It would be nice to have such a message to let the user know what just happened.

@ThiloteE
Copy link
Member

Agreed

@DohaRamadan
Copy link
Contributor

Can i work on this?

@ThiloteE
Copy link
Member

Sure, go ahead :-)

@koppor
Copy link
Member

koppor commented Apr 8, 2024

  • org.jabref.gui.DialogService#notify should be called at the place
  • Logger.warn(...) should be issued
  • Challange: Pass DialogService down to the class where the issue is send...

@github-project-automation github-project-automation bot moved this to Free to take in Good First Issues Apr 8, 2024
@koppor koppor added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Apr 8, 2024
@Simran-Sunil
Copy link

Can I work on this issue?

@ThiloteE ThiloteE moved this from Free to take to Reserved in Good First Issues May 17, 2024
@ThiloteE ThiloteE added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label May 17, 2024
Copy link
Contributor

Welcome to the vibrant world of open-source development with JabRef!

Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

@HrithikPadavala
Copy link

I want to grab this issue if it is still open and no one is working on it

@koppor
Copy link
Member

koppor commented Jun 9, 2024

@Simran-Sunil I didn't see any activity for three weeks, thus, I assigned @HrithikPadavala .

@HrithikPadavala
Copy link

HrithikPadavala commented Jun 23, 2024

Hi @koppor , I have spotted the corresponding function and added log warning as you can see in the attached picture but unable to instantiate DialogServive/JabRefDialogService variable inside MoveFileCleanup.java to call notify method. Could you please tell me how can I create and call notify method

Untitled

@HrithikPadavala
Copy link

Should I call notify from within CleanupAction.java only??

@koppor
Copy link
Member

koppor commented Jun 24, 2024

Please use the common logging practices:

- LOGGER. warn (exception. toString());
+ LOGGER. warn ("Could not move file", exception);

@koppor
Copy link
Member

koppor commented Jun 24, 2024

@HrithikPadavala Use org.jabref.gui.DialogService#notify. Pass Localization.lang("Could not move file.") as parameter. If dialogService is not available, get it passed via the constructor.

@HrithikPadavala
Copy link

Hi @koppor , solved the issue and opened a PR

@koppor
Copy link
Member

koppor commented Jun 27, 2024

Hi @koppor , solved the issue and opened a PR

@HrithikPadavala The PR doesn't seem to link the this issue (as required in the PR description template). Otherwise, I would see a link to it here.

I am on my mobile and cannot check the PR list....

@HrithikPadavala
Copy link

Updated everything as required and committed too. Someone please check and confirm. Thanks.

@koppor
Copy link
Member

koppor commented Jul 2, 2024

Updated everything as required and committed too. Someone please check and confirm. Thanks.

Please look at the pull request. The automatic checks show errors:

image

See #11438. Scroll down. Click on "details" at each failing test.

After you fixed them, we can have a detailed look. Otherwise our brains are too distracted by issues obvious to us.

@HrithikPadavala
Copy link

Opened another PR with branch other than main this time to resolve merge issues please review

@koppor
Copy link
Member

koppor commented Jul 11, 2024

Opened another PR with branch other than main this time to resolve merge issues please review

Please resolve the merge conflicts so that the CI can run. First, all checkstyle issues should be solved. This enables us to focus on the content.

@HrithikPadavala
Copy link

@koppor Resolved all issues but something related to changelog is not getting resolved. This is the only file need to be reviewed. So that this issue can be closed.

@koppor
Copy link
Member

koppor commented Jul 11, 2024

@koppor Resolved all issues but something related to changelog is not getting resolved. This is the only file need to be reviewed. So that this issue can be closed.

Please try to keep context in comments. Comments on PR issues should go to PRs. I replied at #11484 (comment).

@HrithikPadavala HrithikPadavala removed their assignment Aug 17, 2024
@ThiloteE ThiloteE moved this from Reserved to Free to take in Good First Issues Aug 17, 2024
@juliusalberto
Copy link
Contributor

Hi, can I work on this issue? Thanks!

@ThiloteE ThiloteE moved this from Free to take to Assigned in Good First Issues Oct 7, 2024
@ThiloteE
Copy link
Member

ThiloteE commented Oct 7, 2024

Sure, go ahead.

@ThiloteE ThiloteE added FirstTimeCodeContribution Triggers GitHub Greeter Workflow and removed FirstTimeCodeContribution Triggers GitHub Greeter Workflow labels Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

Welcome to the vibrant world of open-source development with JabRef!

Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

@juliusalberto
Copy link
Contributor

Hi - it seems like that I cannot recreate the issue in my environment. Is it something to do with how Mac filesystem works? When I tried to cleanup things - even though the file is open somewhere else (e.g. Microsoft Word), it won't throw any IOException, it just moves it effortlessly.

Do you think I should try it with a Windows machine? Thanks

@Siedlerchr
Copy link
Member

Linux and Mac have different file systems and no atomic lock on the file and if I remember correctly it's Windows only.
So you should test on Windows

@koppor
Copy link
Member

koppor commented Oct 10, 2024

Do you think I should try it with a Windows machine? Thanks

You can "quickly" fire up a Windows 10 VM using Vagrant as described at https://github.com/JabRef/jabref/tree/main/scripts/vms. https://github.com/JabRef/jabref/tree/main/scripts/vms/windows10 proived the Vagrantfile for Windows 10.

@koppor koppor added the 📍 Assigned Assigned by assign-issue-action (or manually assigned) label Oct 15, 2024
@github-project-automation github-project-automation bot moved this from Normal priority to Closed in JabRef UI Improvements Oct 25, 2024
@github-project-automation github-project-automation bot moved this from Assigned to Done in Good First Issues Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment