[Bug] Other Affiliation name on Project member has incorrect error messages

Open
#486 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
frontend

Research direction

The payload names no source files; this repo holds documentation and issues, so the fix lives in the DMP Tool application code. Reproduce on the dev project member edit page, choose "Other" as the affiliation, leave the Other Affiliation Name blank, and save. Find the member form's affiliation validation and mark the other-name field required, attach its error to that field, scroll to the first invalid field on save, and replace the generic "Affiliation is required" text. Done when the blank name field shows its own error and the page scrolls to it.

Written by the indexing model from the issue text.

Description

bug
Summary of the issue

If you select "Other" as an affiliation for a project member, you are required to add the name of the other affiliation, but it's not marked as required, and the error message if you try to save doesn't show on the right field.

Steps to Reproduce

Specific steps to reproduce the issue:

  1. Open a Project
  2. Add a new Project Member
  3. Select "Other" as the affiliation
  4. Leave "Other Affiliation Name" field blank
  5. Attempt to save
Actual behavior

Four things are wrong:

  • "Other Affiliation Name" is not marked as required when it is
  • When you hit Save, it looks like nothing happens; it doesn't scroll up to the error
  • The error message says "Affiliation is required" which isn't helpful because "Affiliation" has something in it
  • There is no error message on "other Affiliation Name" saying you need to complete it.
Expected behavior
  • Add (required) to Other Affiliation Name
  • Scroll up to the problem field when you try to save
  • Have the error message only on the blank field
Reproduction Chance

100%

Screenshots
Image
Links to impacted areas

https://dmptool-dev.uc3dev.cdlib.net/en-US/projects/136426/members/231347/edit

Workarounds

You can save once you fill out the Other Affiliation Name field

Environment/Context

Dev, Chrome

Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

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 CDLUC3/dmptool-doc

All issues in CDLUC3/dmptool-doc

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.