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 minor collection form bugs #2350

Conversation

alexandrevryghem
Copy link
Member

@alexandrevryghem alexandrevryghem commented Jun 30, 2023

References

Description

This PR hides the Entity Type field in both the create and edit collection form when the entities are not initialised yet. It also fixes a small bug in the collection, community, eperson & group form where hitting ENTER in a field would lead to other buttons from being triggered like cancel or go back which causes the form to close.

Instructions for Reviewers

List of changes in this PR:

  • CollectionFormComponent: hide the Entity Type field when there are no entity types
  • ComColFormComponent, GroupFormComponent, EPersonFormComponent: some buttons in the <form>s did not have the correct type which lead to incorrect actions being called when

Guidance for how to test and review this PR:

  • Use an empty DB/one were entities are not initialised yet and check that the collection forms (create & edit) don't have the entity type field by default
  • Run the script initialize-entities -f ../dspace/config/entities/relationship-types.xmland check that that field is now visible in both forms
  • For the submission forms Community, Collection, EPerson & Group check that:
    • When hitting enter in an empty submission form you are not redirected to an incorrect page
    • When you hit enter in a correctly filled in form, that the DSpaceObject is correctly created

Checklist

  • 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.

@alexandrevryghem alexandrevryghem self-assigned this Jun 30, 2023
@alexandrevryghem alexandrevryghem added bug usability component: configurable entities related to configurable entities high priority component: Collection Collection display or editing claimed: Atmire Atmire team is working on this issue & will contribute back labels Jun 30, 2023
@alexandrevryghem alexandrevryghem added this to the 7.6.1 milestone Jun 30, 2023
@tdonohue tdonohue added the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Jul 6, 2023
@tdonohue tdonohue self-requested a review July 27, 2023 14:15
…ction-form-bugs_contribute-7.6

# Conflicts:
#	src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html
@alexandrevryghem alexandrevryghem force-pushed the fix-collection-form-bugs_contribute-main branch from f21a037 to ebaccc0 Compare July 27, 2023 22:16
@alexandrevryghem alexandrevryghem removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Jul 27, 2023
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @alexandrevryghem ! Verified the bug is fixed with the Entity Type field appearing when entities are not being used. I also agree that all these <button> tags should have type="button" to avoid them defaulting to "submit" in many browsers.

@tdonohue tdonohue modified the milestones: 7.6.1, 8.0 Aug 4, 2023
@tdonohue tdonohue merged commit 4abbd37 into DSpace:main Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Collection Collection display or editing component: configurable entities related to configurable entities high priority usability
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Collection edit has empty entity type dropdown if no entities / relationship types initialised
2 participants