Releases: CDLUC3/dmptool
Releases · CDLUC3/dmptool
v5.31
v5.29
Changes proposed in this PR:
- Run SQL script to convert existing records in the
conditions
table so that they are JSON Arrays (see query below) - Updated the form partials in
app/views/org_admin/conditions/_form.erb.rb
to properly send condition data to the controller. - Removed all
JSON.parse
calls in theapp/helpers/conditions.rb
helper
Made the following changes to simplify this patch and to make it a little more user friendly:
- The "Add Conditions" button will now say "Edit Conditions" if there are any.
- Updated the column heading over the "thing that happens when the condition is met" from "Remove" to "Target" since the content of the column can either be questions being removed or an email notification being sent.
- Conditions can be added or removed (not updated anymore)
- Hovering over the email of an existing condition displays a tooltip that shows the email message, subject, etc.
You Need to update underlying data within the table so that they are JSON arrays using the following query:
UPDATE conditions
SET option_list = CONCAT(CONCAT('[', REPLACE(REPLACE(REPLACE(option_list, '---\n- \'', '"'), '\'\n- \'', '","'), '\'\n', '"')), ']'),
remove_data = CONCAT(CONCAT('[', REPLACE(REPLACE(REPLACE(remove_data, '---\n- \'', '"'), '\'\n- \'', '","'), '\'\n', '"')), ']')
where option_list like '---%';
v5.28
Upgrade to Rails 7.2!
Changes proposed in this PR:
- Upgrade to Rails 7.2 and Ruby 3.2
- Unpeg all gems that were specifying a specific version
- Update all gem and JS dependencies
- Update deprecated use of
@import
and$
variable references in all SASS files - Rails now uses Zeitwerk exclusively so class/module names matter. Needed to change the application name from
DMPRoadmap
toDmpRoadmap
- Ran the
rails app:update
script tp let Rails 7 build its own version of all thebin/*
files and theconfig/application.rb
,config/environments/*.rb
files and most initializers - Added font awesome woff and ttf files to the
app/assets/fonts
directory - Rails UJS changed a it so needed to update the way it is initialized in
application.js
- Rails ActiveRecord changed the way enums are handled (particularly when they are not mapped directly to a DB column). Needed to switch from
enum [variableName] { variableOne: 0, variableTwo: 1 }
format to using a constant likeVARIABLE_NAME = %w[variableOne variableTwo]
- ActiveRecord also changed the way field serializers are defined. They all now require a
coder
to be defined. So had to change all instances likeserialize :option_list, Array
so that they use named parameters likeserialize :option_list, type: Array, coder: JSON
- When calling
super
within a method you no longer need to pass the method's input variables directly - Rails changed the way it starts up and loads resources. Because of this, the mapping from
Rails.configuration.x.dmproadmap.[variableName]
to the shorterRails.configuration.x.[variableName]
that happened within theconfig/initializers/_dmproadmap.rb
was not happening. The AnywayConfig gem is still properly loading all variables, but the initializer file is now running before AnywayConfig so it was setting all variables to null or the default values defined inconfig/dmproadmap.yaml
. to correct this we needed to:- remove the old
config/initializers/_dmproadmap.rb
file since it is no longer useful - AnywayConfig cannot have nested variables, so flattened all
application.[variableName]
andorganization.[variableName]
toapplication_[variableName]
andorganization_[variableName]
- update the
config/dmproadmap.yaml
file so that it contains all of the default variables that were previously defined in theconfig/initializers/external_apis/*.rb
files. - update the AnywayConfig
config/configs/dmproadmap_config.rb
so that it now contains all variables (there were some that were defined within the old initializers. - updated ALL references to those variables. For example
max_pages = Rails.configuration.x.application.api_max_page_size
becamemax_pages = Rails.configuration.x.dmproadmap.application_api_max_page_size
- Update rack-attack config to be more restrictive for the contact us form
- remove the old
v5.27
Bug fix for DOCX downloads containing missing content
- Another .gsub() replacement regex was appended to existing one in the
clean_html_for_docx_creation(html)
function inplan_exports_controller.rb
. This should find those cases described above, and replace the
tag with a closing and an openingtag.