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

Most relation fields (except Author) do not display their relations in the Submission form. #1094

Closed
tdonohue opened this issue Apr 12, 2021 · 3 comments · Fixed by #1096
Closed
Assignees
Milestone

Comments

@tdonohue
Copy link
Member

tdonohue commented Apr 12, 2021

Describe the bug

The majority of relation fields (except the Author field on the Publication form) do not display their selected relations in the submission form.

Known Relation fields that work:

  • The "Author" field on the Publication form (this is a repeatable field which allows free text entry)

Know Relation fields that do not work:

  • The "Publication" field on the Person form (this is a non-repeatable field which doesn't allow free text entry)
  • The "Journal" field on the Journal Volume form (this is a non-repeatable field which doesn't allow free text entry)
  • The "Volume" field on the Journal Issue form (this is a non-repeatable field which doesn't allow free text entry)

Fields that do not work all exhibit the same behavior. You can select a relation & it appears to be created. However, after closing the popup, the relation does not appear on the form.

While all the fields that do not work have the same configuration, changing their configuration (e.g. to repeatable or to allow free-text entry) doesn't seem to allow them to work. They continue to behave in the same manner, regardless of configuration.

To Reproduce

My testing environment:

One example which doesn't work (Linking a new Issue to an existing Volume)

  1. Start a new Submission in the "Journal Issues" collection. This will use the "Journal Issue" Entity form
  2. The first field gives the ability to select a "Journal Volume" associated with this Issue. This is a non-repeatable field.
  3. Click the lookup & select from existing Journal Volumes.
  4. Selecting a Journal Volume will work, but the Volume name is not displayed after closing the popup.
  5. If you open the popup again, the linked Volume will be shown. (Relationship was created)

Another example which doesn't work (Linking a new Person to an existing Publication)

  1. Start a new Submission in the "People" collection. This will use the "Person" Entity form
  2. The first field gives the ability to link the Person to a single Publication. This is a non-repeatable field.
  3. Click the lookup & select a Publication
  4. Selecting the Publication will work, but the Publication is not displayed after closing the popup.
  5. If you open the popup again, the linked Publication will be shown. (Relationship was created)

An example which works (Linking a new Publication to an existing Person)

  1. Now start a new Submission in the "Articles" collection. This will use the "Publication" Entity form.
  2. This has an "Author" field as the first field. It's a repeatable field.
  3. Using the Lookup button, select one or more existing Persons as authors
  4. They immediately appear back in the Submission form. (Everything works!)

I've also attempted changing fields from non-repeatable to repeatable (no effect on results) and other minor configuration changes. It's currently unclear to me why the Author field works while others do not.

Further testing

Because of the discussion in #1092, I attempted to rollback dspace-angular to before #1025 was applied. This had seemingly no effect on the results above. I still cannot get relationships to work.

Here's how I rolled back my UI to before #1025:

# Checkout the commit before #1025
git checkout 3815bdbd8c1e458ea88d906459b823eaa33dbe25
# Reapply #1055 only, as this is needed to run a current REST API backend (as entity types are in a different metadata field now)
git cherry-pick -m 1 0f7a32d0dfcee30f0436ba0b762e87c812b8b48a
yarn clean
yarn install
yarn start:dev

Again, after those steps, I retested the above examples & got the same results. The Author field works while others do not.

Expected behavior

All relation fields (regardless of backend configuration) should show display their selected value(s) in the Submission Form. Obviously some are only allowed one value, while others can have multiple values (depending on the repeatable setting).

Related work

Related to discussions in #1092 , but this bug seems unrelated to repeatable fields in my opinion.

@tdonohue
Copy link
Member Author

I've tentatively scheduled this for Beta 5, as I feel it is very high priority to resolve (there's no clear workaround). However, if we cannot find an immediate volunteer, we may have to consider fixing it during Testathon and flagging it as a "known bug" to any testers until it is solved.

@artlowel
Copy link
Member

I created a PR to fix this issue: #1096. Kristof and I spent 4h on this. Since it's urgent, we decided to go ahead and fix it rather than estimate and wait for approval first

@tdonohue
Copy link
Member Author

Thanks @artlowel ! I'll add the estimate and help get the PR reviewed immediately.

Since your PR looks to be dependent also on #1092, I'd appreciate your help/support (or someone on your team) in moving that forward quickly too. Thanks again.

@tdonohue tdonohue added the e/4 Estimate in hours label Apr 13, 2021
4science-it pushed a commit to 4Science/dspace-angular that referenced this issue Dec 11, 2023
DSC-1037

Approved-by: Giuseppe Digilio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants