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

Fix for PR 9717 #10599

Closed
wants to merge 3 commits into from
Closed

Fix for PR 9717 #10599

wants to merge 3 commits into from

Conversation

Toro520
Copy link

@Toro520 Toro520 commented Oct 29, 2023

Related to #7731

  1. addCrossref(BibEntry crossrefEntry) method:
  • Motivation: This method is used to add cross-references to the current entry.
  • Description: This method takes a BibEntry object as a parameter and sets its citation key as the cross-reference field value of the current entry. This establishes a relationship between the entries. Then, the updateCell() method is called to update the relevant cell data.
  1. addFileFromCrossref(LinkedFile file) method:
  • Motivation: This method is used to add files from cross-referenced entries.
  • Description: This method takes a LinkedFile object as a parameter and adds it to the file list of the current entry. Before adding, it checks if the cross-referenced entry already has the same file to avoid duplicates. If the file doesn't exist, it is added to the file list, and the updateFiles() method is called to update the files.
  1. removeCrossref() method:
  • Motivation: This method is used to remove cross-references.
  • Description: This method removes the cross-reference field of the current entry. Then, the updateCell() method is called to update the relevant cell data.
  1. updateCitationKey(String newCitationKey) method:
  • Motivation: This method is used to update the citation key of cross-referenced entries.
  • Description: This method takes a new citation key as a parameter and sets it as the citation key of the cross-referenced entry. Then, the updateCell() method is called to update the relevant cell data.
  1. removeCrossrefedEntry(BibEntry crossrefedEntry) method:
  • Motivation: This method is used to remove cross-referenced entries.
  • Description: This method takes a BibEntry object as a parameter and calls its removeCrossref() method to remove its cross-reference field. Then, the updateCell() method is called to update the relevant cell data.
  1. updateCell() method:
  • Motivation: This method is used to update cell data.
  • Description: This method contains the logic to update cell data. The specific implementation should be tailored to your code structure and requirements. You can add appropriate code in this method to update the relevant cell data.
  1. updateFiles(List linkedFiles) method:
  • Motivation: This method is used to update the file list.
  • Description: This method takes a list of LinkedFile objects as a parameter and updates the file list data as needed. The specific implementation should be tailored to your code structure and requirements.

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.

Refactor getResolvedFieldOrAlias for clarity and modern style
- Use Stream API for better readability and concise code.
- Simplify the logic to fetch the first resolved field or alias.
- No change in the method's functionality or output.
…references to the current entry and update the relevant cells.

2. Added the addFileFromCrossref(LinkedFile file) method to add files from cross-referenced entries and update the file list.
3. Modified the removeCrossref() method to ensure that the relevant cells are updated when removing cross-references.
4. Added the updateCitationKey(String newCitationKey) method to update the citation key of cross-referenced entries and update the relevant cells.
5. Added the removeCrossrefedEntry(BibEntry crossrefedEntry) method to remove cross-referenced entries and update the relevant cells.
6. Added the updateCell() method to update the data in the cells. The specific implementation should be tailored to your code structure and requirements.
7. Added the updateFiles(List<LinkedFile> linkedFiles) method to update the file list. The specific implementation should be tailored to your code structure and requirements.
…references to the current entry and update the relevant cells.

2. Added the addFileFromCrossref(LinkedFile file) method to add files from cross-referenced entries and update the file list.
3. Modified the removeCrossref() method to ensure that the relevant cells are updated when removing cross-references.
4. Added the updateCitationKey(String newCitationKey) method to update the citation key of cross-referenced entries and update the relevant cells.
5. Added the removeCrossrefedEntry(BibEntry crossrefedEntry) method to remove cross-referenced entries and update the relevant cells.
6. Added the updateCell() method to update the data in the cells. The specific implementation should be tailored to your code structure and requirements.
7. Added the updateFiles(List<LinkedFile> linkedFiles) method to update the file list. The specific implementation should be tailored to your code structure and requirements.
@ThiloteE
Copy link
Member

I am confused. You now have two pull-requests open to improve 9717?

@ThiloteE ThiloteE changed the title Fix for issue 9717 Fix for PR 9717 Oct 30, 2023
@calixtus
Copy link
Member

calixtus commented Nov 9, 2023

Hello @Toro520, what's the status here? Are you planning to continue on your PR?

@calixtus calixtus marked this pull request as draft November 9, 2023 19:25
@calixtus
Copy link
Member

As this PR lacks implementation and is only a collection of ideas in comments, and also the original submitter won't answer, i'm closing this PR. Feel free to create a new PR, if you decide to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants