You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ON MAIN - A user is able to add a location to a work.
ON FLEXIBLE
With flexible false:
- the entry field doesn't load until you click to add another location
- the uri is rendered in the UI instead of the indexed label (fixed here)
With flexible true:
a user is unable to add a location... it attempts to save the full object instead of a uri (see notes)
the entry field doesn't load until you click to add another location
Details
ON MAIN - A user is able to add a location to a work.
Add new work > pick a work type
Add required fields. Click 'Additional Fields'
Find the location property. In the drop down, type in a city name. Select one from the auto populated list.
Submit the work
Based_near will be displayed on the work's show page.
Click to edit the work.
The location property will display the selected city:
ON flexible_double_combo ...
(spec/forms/hyrax/forms/resource_form_spec.rb is failing the based_near context in flexible_double_combo but passes on main)
How it looks when saved:
We noticed that the params look weird after the form get validated here. Diff from main is that it includes several #<ActionController::Parameters within the nested params. Is that a problem?
Dev Notes
Make sure geonames is configured. Otherwise, the drop down will not find any results.
In .koppie/config/intitializers/hyrax.rb update the following to:
This diff Avoids the error about invalid type when saving based_near property on flexible_double_combo. I'm not sure if it's the correct approach. Related PR
The text was updated successfully, but these errors were encountered:
The problem is in the form in works_controller_behavior method build_form. The form being built and validated doesn't have a location object so it validates and updates the form incorrectly.
Some of the above issues may have been resolved by based_near work in Hyrax.
However some specific logic for based_near in the form is currently included via the dynamic loading of BasicMetadataFormFieldsBehavior in lib/hyrax/form_fields.rb, based on the inclusion of the basic_metadata schema.
This behavior is being included explicitly in Hyku as needed, via module BasedNearFormFieldsBehavior. Flexible metadata will require similar logic to handle the location terms.
Summary
Details
ON MAIN - A user is able to add a location to a work.
Add new work > pick a work type
Add required fields. Click 'Additional Fields'
Find the location property. In the drop down, type in a city name. Select one from the auto populated list.
Submit the work
Based_near will be displayed on the work's show page.
Click to edit the work.
The location property will display the selected city:
ON flexible_double_combo ...
How it looks when saved:
We noticed that the params look weird after the form get validated here. Diff from main is that it includes several #<ActionController::Parameters within the nested params. Is that a problem?
Dev Notes
Make sure geonames is configured. Otherwise, the drop down will not find any results.
In .koppie/config/intitializers/hyrax.rb update the following to:
This diff Avoids the error about invalid type when saving based_near property on flexible_double_combo. I'm not sure if it's the correct approach. Related PR
The text was updated successfully, but these errors were encountered: