Skip to content

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

@tdonohue

Description

@tdonohue

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions