field-parser not applying the visibility configuration

Open
#5,854 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@AdamF42 is already working on this.

Since Oct 15, 2026.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
angular, typescript
Domain
frontend

Research direction

Start with src/app/submission/utils/visibility.util.ts and the section-visibility and submission-scope-type models it uses, then check whether the backend's SubmissionFormConverter.java still sends the visibility data in the old 9.2 format. Reproduce by setting a workflow visibility and readonly on dc.title in submission-forms.xml, then confirm whether the field is disabled. Done means the field is read-only in the submission form, or the cause is confirmed as backend-only and the issue is moved there.

Written by the indexing model from the issue text.

Description

bug needs triage

Describe the bug

When a metadata field is configured to have a limited visibility in the back-end, this configuration is not being applied in the front-end.

I noticed that there were some changes to the code related to this functionality on the front-end, but no equivalent changes were made on the back-end.

In the current front-end, the main code that applies the configuration in a given field is:
https://github.com/DSpace/dspace-angular/blob/7f59f6cf99f0d1fb4b2abe46e9f24a5e1ee01a49/src/app/submission/utils/visibility.util.ts#L19-L23

and

https://github.com/DSpace/dspace-angular/blob/7f59f6cf99f0d1fb4b2abe46e9f24a5e1ee01a49/src/app/core/submission/models/section-visibility.model.ts#L12

https://github.com/DSpace/dspace-angular/blob/7f59f6cf99f0d1fb4b2abe46e9f24a5e1ee01a49/src/app/core/submission/models/section-visibility.model.ts#L4-L7

https://github.com/DSpace/dspace-angular/blob/7f59f6cf99f0d1fb4b2abe46e9f24a5e1ee01a49/src/app/core/submission/submission-scope-type.ts#L1-L5

However, the returned data from the back-end still returns in the same format as it was in 9.2 (blame is from 8 years ago).

Therefore, I'm not sure if it is a front-end bug or a back-end (maybe a missing PR?).

To Reproduce

Steps to reproduce the behavior:

  1. In the back-end, edit submission-forms.xml by adding to some field (dc.title for example) the following config:
<visibility>workflow</visibility>
<readonly>readonly</readonly>

This should make the existing field read-only (disabled) during submission.
2. Start/restart the DSpace backend.
3. Start/edit a submission.
4. The field will still be available for editing. If you try this same configuration in DSpace 9.2, the field will be disabled (works even if you use the DSpace 10.0 backend alongside the DSpace 9.2 frontend).

Expected behavior

The visibility configuration from the back-end should reflect in the forms fields.

Dominant language
TypeScript
Stars
180
Forks
577
Avg merge
2d 1h
Merged PRs (30d)
100

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DSpace/dspace-angular

All issues in DSpace/dspace-angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.