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

input form has title as single entry, but the title def stays multiple #3554

Merged
merged 1 commit into from
Apr 24, 2019

Conversation

blancoj
Copy link
Contributor

@blancoj blancoj commented Feb 22, 2019

Fixes #3299

Title will now be displayed as a single entry in the work form. It remains defined as a multiple ( array ), but in the edit form, it is treated as a single. In cases where a work has more than one title, the titles are sorted alphabetically and the 1st in the list is displayed on the edit form. User collections and admin sets presently display only a single title, but because there is a lot of overlap in the form processing of works and collections, the work form and admin form processing had to change too.

In cases of multiple titles, in order to store values not being displayed on the form, a new metadata type called alt_title was created. This metadata is never displayed but is used during the processing of the form to store the titles not being displayed by the form and then when the form is saved, saving these titles back in the title metadata.

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • Create a work, and see that you are only given one entry for title.
  • Enter the title, and remaining required fields and upload one file.
  • Save the work.
  • Verify that the correct title is displayed on the work page
  • Edit the work and change the title.
  • Verify that the correct title is displayed on the work page.
  • Repeat this for another type of work, User collection, and Admin Set.

Testing multiple titles for a work:

  • Create a work, and see that you are only given one entry for title.
  • Enter the title, and remaining required fields and upload one file.
  • Save the work.
  • Using Rails console add a few more titles to the work.
  • Verify that the correct title is displayed on the work page
  • Edit the work and notice that the 1st title based on the alphabetization of the titles is displayed.
  • Change the title.
  • Verify that the correct titles are displayed on the work page with the changed title and the other titles.

@samvera/hyrax-code-reviewers

@blancoj blancoj changed the title input form has title as single entry, but the title def stays multiple [WIP] input form has title as single entry, but the title def stays multiple Feb 27, 2019
@blancoj blancoj changed the title [WIP] input form has title as single entry, but the title def stays multiple input form has title as single entry, but the title def stays multiple Mar 1, 2019
@stale
Copy link

stale bot commented Mar 31, 2019

This issue has been automatically marked as stale because it has not had activity for 30 days. It will be closed if no further activity occurs within 14 days. Thank you for your contributions.

@stale stale bot added the stale label Mar 31, 2019
@stale stale bot closed this Apr 14, 2019
@dlpierce dlpierce reopened this Apr 17, 2019
@stale stale bot removed the stale label Apr 17, 2019
.viewer-wrapper {
height: 640px;
}
}

Choose a reason for hiding this comment

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

Files should end with a trailing newline

height: 100%;
padding: 10px;
width: 100%;

Choose a reason for hiding this comment

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

Properties should be ordered height, left, position, top, width

}

.viewer {
.viewer-wrapper iframe {

Choose a reason for hiding this comment

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

Merge rule .viewer-wrapper iframe with rule on line 2

@dlpierce dlpierce merged commit 04c5ecc into master Apr 24, 2019
@dlpierce dlpierce deleted the issue-3299 branch April 24, 2019 20:45
@ghost
Copy link

ghost commented May 16, 2019

This change breaks our instance because we previously had a multivalued 'title' field (with language support) and another multivalued 'alternative_title' field (with language support) based on dc: alternative. From a documentary point of view, 'title' and 'alternative title' are two separate fields, and each one is likely to receive several values in case of translation of the content. So the mechanism that copies a field into the other will cause problems over time if increased support of the multilingual is introduced.
@samvera/hyrax-code-reviewers @blancoj

elrayle added a commit that referenced this pull request Jun 3, 2020
### Description

Fix bug where `@attributes["alternative_title"] << value` throws an exception because `@attributes["alternative_title"]` is nil.  This happens when a model does not include basic metadata causing alternative_title to not be defined.

### Related work:

* Issue #4318 - reconsidering impact of PR #3554
* PR #3554 - separates multiple titles into title and alternative titles
elrayle added a commit that referenced this pull request Jun 3, 2020
### Description

Fix bug where `@attributes["alternative_title"] << value` throws an exception because `@attributes["alternative_title"]` is nil.  This happens when a model does not include basic metadata causing alternative_title to not be defined.

### Related work:

* Issue #4318 - reconsidering impact of PR #3554
* PR #3554 - separates multiple titles into title and alternative titles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit dc:title to only occur once
4 participants