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

Add cleanup operation in reference to the Urldate field #9999

Merged
merged 14 commits into from
Jun 11, 2023

Conversation

dkokkotas
Copy link
Contributor

@dkokkotas dkokkotas commented Jun 10, 2023

Follow-up to #9970
Fixes #koppor216

Overview on the cleanup operation

Following up to the recently added cleanup operation for the Url field, the current proposal serves as a cleanup operation for the Urldate field of a BibTex entry. Essentially, when a date referring to the access date of a URL address is identified in the Note field then we move it to the Urldate field. Including the aforementioned operation, we achieve more precise and effective handling of user's mistaken entries' recording.

Step by Step

  1. User stores a URL and a corresponding URL-DATE in the Note field
  2. User clicks on Quality section
    a. Selects Cleanup entries option
    b. Enables Move URL in note field to url field action
    c. Clicks on OK
  3. Afterwards, the cleanup operation will have been successfully completed and the URL-DATE is replaced under the Urldate field.

Some noteworthy comments

  • We take it as a prerequisite that the user has also placed a URL address, besides URL-DATE, in the Note field.
  • In case multiple URL-DATES are recorded in the Note field, then we only move the first found.
  • On the assumption that there is an existing URL-DATE in the Urldate, no action should be performed, unless the URL-DATES in both Note and Urldate fields are equal. In that case we just remove the url-date from the Note field.
  • User is expected to be familiar with a BibTex-based terminology, when storing this type of data.

About the implementation

  • Enhanced URLCleanup class with the url-date cleanup operation and made the necessary adjustments (minor refactoring).
  • Added parameterized tests to validate the expected behavior of the operation.
urldate-cleanup.mov

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@dkokkotas dkokkotas changed the title Urldate cleanup Add cleanup operation in reference to the Urldate field Jun 10, 2023
@dkokkotas dkokkotas marked this pull request as ready for review June 10, 2023 19:11
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on it. Tests look good. Just small code comments

CHANGELOG.md Outdated Show resolved Hide resolved
src/main/java/org/jabref/logic/cleanup/URLCleanup.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/logic/cleanup/URLCleanup.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/logic/cleanup/URLCleanup.java Outdated Show resolved Hide resolved
@dkokkotas dkokkotas requested a review from koppor June 11, 2023 01:55
@dkokkotas dkokkotas requested a review from koppor June 11, 2023 11:27
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The discussed reference is gone. Otherwise, LGTM

@dkokkotas dkokkotas requested a review from koppor June 11, 2023 13:35
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for me.

Now when thinking of the tests more properly, I think, as user I would have written

\url{http://142.42.1.1:8080/}, accessed on January 15, 2021

(lower case letters for "accessed", ...)

koppor
koppor previously approved these changes Jun 11, 2023
@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 11, 2023
@koppor koppor merged commit dd656c5 into JabRef:main Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade note field if containing url
3 participants