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 to Metadata Registry create new metadata schema doesn't appear without reload #1081 #2445

Merged
merged 5 commits into from
Sep 8, 2023

Conversation

hugo-escire
Copy link
Contributor

@hugo-escire hugo-escire commented Aug 19, 2023

References

Add references/links to any related issues or PRs. These may include:

Description

On Metadata Registry page, when creating a new schema, the new schema is not listed after successful submit.
Name-field keeps old value.

Instructions for Reviewers

Create a new schema, but the doesn't show at least you edit, delete or reload the page.

List of changes in this PR:

  • First, I made a refactor to avoid async issues onSubmit function of the metadata-schema-form.component.ts
  • Second, I change the "clearMetadataSchemaRequests", because it has a little async issue in the old code. It was a cache problem, like @tdonohue mentioned.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added bug high priority performance / caching Related to performance, caching or embedded objects 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Aug 21, 2023
@tdonohue tdonohue added this to the 7.6.1 milestone Aug 21, 2023
@tdonohue tdonohue requested a review from artlowel August 24, 2023 14:52
@alanorth
Copy link
Contributor

Thank you @hugo-escire. I tested the patch and confirmed it fixes the issue. I was able to see the new metadata schema in the registry immediately after saving, without refreshing.

So this looks good to me on functionality, but don't understand the TypeScript code so I will let someone else review and approve.

@alanorth
Copy link
Contributor

alanorth commented Sep 5, 2023

@hugo-escire looking at this again, I notice that there are many changes to the code that are unrelated to the fix. This makes patches more "noisy" than they need to be, which means reviewing changes is more difficult and merging/rebasing is more likely to conflict due to unnecessary changes in the git history.

Would it be possible for you to rework this patch without the formatting changes? Thank you.

@hugo-escire
Copy link
Contributor Author

Hi @alanorth, I reverted the format changes. Sorry for the delay.

@alanorth
Copy link
Contributor

alanorth commented Sep 8, 2023

@hugo-escire no problem. Thanks for the fix. I will merge this now.

I personally try to avoid changes to the code that are not related to the fix, but I think we (the DSpace open source project) are partly to blame because we don't have Angular lint rules to catch these type of changes to whitespace or imports.

@alanorth alanorth self-requested a review September 8, 2023 19:48
@alanorth alanorth merged commit e9b94f8 into DSpace:main Sep 8, 2023
7 of 8 checks passed
@dspace-bot
Copy link
Contributor

@tdonohue tdonohue modified the milestones: 7.6.1, 8.0 Sep 8, 2023
@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge bug high priority performance / caching Related to performance, caching or embedded objects
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Metadata Registry create new metadata schema doesn't appear without reload
4 participants