curationexperts / laevigata

A Hyrax-based ETD repository including deposit workflow
Other
5 stars 4 forks source link

Students should be able to enter sub-deparments #1696

Closed mark-dce closed 6 years ago

mark-dce commented 6 years ago

ISSUE On the "My Program" tab I can not enter a subfield for the departments listed in the school reports for Emory College, Laney Graduate School, and Rollins School of Public Health

1696 - dept sub-dept current

ACCEPTANCE

OBSERVATION Since Departments and Sub-departments are tightly coupled and hierarchical, consider rendering them together as select optgroups rather than two separate fields. (the sample code to generate this screenshot is included below)

1696 - dept sub-dept using optgroups
<select name="etd[department]" id="department" aria-required="true" class="form-control">
    <option value="Behavioral Sciences &amp; Health Education - MPH | ">
      Behavioral Sciences &amp; Health Education - MPH
    </option>
    <optgroup label="Biostatistics and Bioinformatics">
        <option value="Biostatistics and Bioinformatics | Biostatistics - MPH & MSPH">
          Biostatistics - MPH & MSPH
        </option>
        <option value="Biostatistics and Bioinformatics | Public Health Informatics - MSPH">
          Public Health Informatics - MSPH
        </option>        
    </optgroup>
    <option value="Environmental Health | ">
      Environmental Health
    </option>
    <optgroup label="Epidemiology">
        <option value="Epidemiology | Epidemiology - MPH & MSPH">
          Epidemiology - MPH & MSPH
        </option>
        <option value="Epidemiology | Global Epidemiology - MPH & MSPH">
          Global Epidemiology - MPH & MSPH
        </option>
    </optgroup>
    <optgroup label="Executive Masters of Public Health - MPH">
        <option value="Executive Masters of Public Health - MPH | Applied Epidemiology">
          Applied Epidemiology
        </option>
        <option value="Executive Masters of Public Health - MPH | Applied Public Health Informatics">
          Applied Public Health Informatics
        </option>
        <option value="Executive Masters of Public Health - MPH | Health Care Outcomes Management">
          Health Care Outcomes Management
        </option>
        <option value="Executive Masters of Public Health - MPH | Management Science">
          Management Science
        </option>
        <option value="Executive Masters of Public Health - MPH | Maternal and Child Health Epidemiology">
          Maternal and Child Health Epidemiology
        </option>
        <option value="Executive Masters of Public Health - MPH | Prevention Science">
          Prevention Science
        </option>
    </optgroup>
    <option value="Health Policy and Management - MSPH | ">
      Health Policy and Management - MSPH
    </option>
    <option value="Hubert Department of Global Health - MPH | ">
      Hubert Department of Global Health - MPH
    </option>
</select>
mark-dce commented 6 years ago

UPDATE: This appears to only be true for some department & sub-department combinations. I don't know whether the configuration in the submission UI or the data in the school report is correct.

For Rollins, the school report says that the following sub department options should be available

I haven't had time to fully check the Laney or Emory subfields

OBSERVATION Having the departments and sub departments in a single hierarchical yaml file might make it easier to code and confirm the sub department behavior.

little9 commented 6 years ago

@mark-dce I missed that it was Biostats and Bioinformatics. There is JSON file I'm using to do the mapping for the departments: https://github.com/curationexperts/laevigata/blob/master/app/javascript/config/subfieldEndpoints.json

I'll submit a PR that adds adds both options:

{
  "Biological and Biomedical Sciences": "/authorities/terms/local/biological_programs",
  "Biostatistics": "/authorities/terms/local/biostatistics_programs",
  "Biostatistics and Bioinformatics": "/authorities/terms/local/biostatistics_programs",
  "Business": "/authorities/terms/local/business_programs",
  "Environmental Sciences": "/authorities/terms/local/environmental_programs",
  "Epidemiology": "/authorities/terms/local/epidemiology_programs",
  "Psychology": "/authorities/terms/local/psychology_programs",
  "Executive Masters of Public Health - MPH": "/authorities/terms/local/executive_programs"
}
mark-dce commented 6 years ago

@little9 Is there any way to use the same code to figure this out we do in the school report - I.E. could we have one source of truth for this in the application? I feel like we need to hand check all of Laney and all of Emory now. And I worry that we'll miss something or have a typo again later. This is at least the second time we've messed up the configuration of subfields in the submission form (the previous time was in the old form though).

mark-dce commented 6 years ago

I'm reopening this ticket since I can't test whether this is fixed because I can't get any Rollins submission to work right now.

Server: https://qa-upgrade-etd.emory.edu/ Version master updated 20 August 2018 (d5d845fc1a183f62ce1621f6a0e3f038bbe2c98a)

STEPS TO REPRODUCE 1 . Close chrome, launch Chrome, open a new Incognito window

  1. Login as a student
  2. Start a new Rollins submission - Choose Rollins as your school on the "About Me" tab and fill in the other fields with any values
  3. Click the "Save and Continue" button
  4. On the "My Program" tab, choose any department, degree, and submission type
  5. Click on the "Save and Continue" button on the "My Program" tab

EXPECTED BEHAVIOR

ACTUAL BEHAVIOR

mark-dce commented 6 years ago

Current behavior

little9 commented 6 years ago

@mark-dce @bess I think this could be closed now, since the issue was related to partnering agencies and not subfields

RachelDCE commented 6 years ago

@little9 I just tested to make sure that Subfields for all Schools that have Departments with Subfields show up and can be selected and saved. The only only one that is on the school report that doesn't show on the application is:

School: Emory

Dept: Classics and Religion

Subfields: American Religious Cultures Comparative Literature and Religion Ethics and Society Hebrew Bible Historical Studies in Theology and Religion Jewish Religious Cultures New Testament Person, Community, and Religious Life Theological Studies West and South Asian Religions

RachelDCE commented 6 years ago

I was able to enter sub-departments

Tested on QA | 2017 Emory University. Version master updated 23 August 2018.