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

MS Office XML: Export month name #7677

Merged
merged 3 commits into from
Apr 30, 2021
Merged

MS Office XML: Export month name #7677

merged 3 commits into from
Apr 30, 2021

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Apr 29, 2021

Fixes https://discourse.jabref.org/t/export-month-as-text-not-number/2685

The month field is also the full name in the example listed here https://docs.microsoft.com/de-de/dotnet/api/documentformat.openxml.bibliography.month?view=openxml-2.8.1

  • 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 documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 29, 2021
fix checkstyle in changelog
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Sponsor Member

I don't have an issue with changing the default behavior as I believe both are supported, but from my point of view the behavior pre #2731 were the correct one 😛

Does it make sense to open an issue for creating an option/preference for this after this PR?

Copy link
Sponsor Member

@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 left a comment

Choose a reason for hiding this comment

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

Ok, the more I look at it the more sense it makes to make the default behavior aligned with the DocumentFormat.OpenXml.Bibliography examples (the day example also uses the month's name).

There are other MS standards (e.g., dateGroupItem on page 290) that doesn't, but this looks good to me.

Admittedly, I'd still love for there to be an option 😛

@Siedlerchr
Copy link
Member Author

I don't have an issue with changing the default behavior as I believe both are supported, but from my point of view the behavior pre #2731 were the correct one 😛

Does it make sense to open an issue for creating an option/preference for this after this PR?

I thought so as well, but I don't think it's necessary. You can stil modfiy the xml by hand or edit it in Word internal ref manager.

Regarding 2731, I think you refer to the getFieldOrAlias? Well this still works and it takes care of those magic bibtex macro strings as well (#jan#)

public Optional<Month> getMonth() {
return getFieldOrAlias(StandardField.MONTH).flatMap(Month::parse);
}

At least I took a second look and found that Object::toString is not anylonger necesary...

@Siedlerchr Siedlerchr merged commit f504ff0 into main Apr 30, 2021
@Siedlerchr Siedlerchr deleted the exportMsOfficeMonth branch April 30, 2021 21:20
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Sponsor Member

Regarding 2731, I think you refer to the getFieldOrAlias? Well this still works and it takes care of those magic bibtex macro strings as well (#jan#)

True, I forgot that people use style files o.O

At least I took a second look and found that Object::toString is not anylonger necesary...

I spend too much time on ISO standards and not enough on the code X)

Siedlerchr added a commit that referenced this pull request May 4, 2021
* upstream/main: (354 commits)
  Fix ScienceDirect fetcher (#7684)
  Refactor NoBibTexFieldCheckerTest to increase mutation coverage (#7697)
  Update Gradle from 6.8.3 to 7.0 (#7619)
  Fixes #7305: the RFC fetcher is not compatible with the draftFix for issue 7305 (#7674)
  Refactoring existing unit tests (#7693)
  cover boundary cases & add more unit tests (#7694)
  Bump classgraph from 4.8.104 to 4.8.105 (#7688)
  Bump java-diff-utils from 4.9 to 4.10 (#7692)
  Fix arXiv fetcher tests (#7686)
  Make key for ScienceDirect configurable (#7683)
  migration of timestamp (#7671)
  Fix CCSB and DOAJ (#7426)
  [Bot] Update CSL styles (#7680)
  MS Office XML: Export month name (#7677)
  linkfix (#7678)
  readd fix (#7675)
  Fix threading cleanup in performSearch (#7672)
  add missing changelog
  delete bug fix (#7580)
  Add more unit tests to three gui classes  (#7636)
  ...

# Conflicts:
#	build.gradle
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.

None yet

2 participants