BETYdb 4.3
This release implements some long-standing requested database changes, replaces awkward selection boxes used in some forms with autocompletion-enabled fields, and fixes some bugs with cloning of PFTs and generation of Priors images.
The primary motivation for this release was to implement a long-standing request to eliminate some unneeded database tables and columns (and the Rails machinery associated with them), replace the formats.mime_type
column with a foreign-key column referencing the mimetypes
table, and add some date and entity-related columns to the yields
table similar to those that already exist in the traits
table.
Along with this, several usability improvements and bug fixes have been implemented.
Changes Pertinent to PEcAn Users
Administrators need to do a database migration.
See "Database Changes" below.
Summary of Changes
New Features
Autocompletion fields
Several of the Web forms for creating new entities and editing existing ones contained very lengthy selection lists for choosing (for example) the variable associated with a trait or the list of priors associated with a pft. These have been replaced with autocompletion fields so that typing characters into the field filters the list of options down to only those options containing that sequence in (one of certain designated columns of) the entity being selected.
Bug Fixes
- The update to Rails 2 broke the on-the-fly generation of images associated with Priors. This has been fixed.
- Cloning of PFTs would fail in some cases because we have imposed stricter validation of species objects. (For example, when you create a new species, the scientificname must textually include both the Genus name and the species name.) Many existing species rows fail the validation requirements. For this reason, we have turned off validation of associated species when cloning a PFT.
Steps Needed for Upgrade
Database Changes
Administrators need to do database migrations!
There is one migration in this release. It removes the inputs_variables
, location_yields
, and counties
tables. It removes the start_date
and end_date
columns from the runs
table. It replaces the mime_type
column in the formats
table with mimetype_id
, a foreign key referencing the mimetypes
table. And it adds four columns to the yields
table: entity_id
, date_year
, date_month
, and date_day
.
The database version for this release is 20150904184512.
Status of RSpec Tests
-
All tests non-Javascript based tests pass. These may be run with the command
bundle exec rspec -t ~js
-
Most of the Javascript-based tests pass, but one of them seems to pass only intermittently.
The Javascript-based tests may be run with the command
bundle exec rspec -t js
The test that sometimes fails begins at line 36 of the file spec/features/management_integration_spec.rb
and may be run with the command
bundle exec rspec ./spec/features/management_integration_spec.rb:36
It seems that the feature this test tests does in fact work, but an issue has been created to note the problem with this test.
Complete details for running the rspec tests are on the updated Wiki page at https://github.com/PecanProject/bety/wiki/Automated-Tests