Rails 6 Tasks (to-do list)
Creating this ticket to add tasks to it that need to be completed before the release with the upgrade to 6.1 (including any manual testing required, issues found while testing etc.)
please use https://dmproadmap.uc3dev.cdlib.org/ for testing this new codebase and then lets document any issues we uncover here.
Note that the new underlying AWS environment for https://dmproadmap.uc3dev.cdlib.org/ is not sending out emails and logos are not persistent (they're stored on the local disk, so get lost when a new instance of the application is created).
Receive an error when trying to change a plan's visibility. The error from the logs is:
I, [2022-07-06T12:45:42.494139 #158] INFO -- : [30320f2d-4da4-409e-afdc-0ff4faae80e8] Completed 500 Internal Server Error in 75ms (ActiveRecord: 29.7ms | Allocations: 12075)
F, [2022-07-06T12:45:42.495232 #158] FATAL -- : [30320f2d-4da4-409e-afdc-0ff4faae80e8]
[30320f2d-4da4-409e-afdc-0ff4faae80e8] NoMethodError (undefined method `to_sym' for 0:Integer Did you mean? to_s):
[30320f2d-4da4-409e-afdc-0ff4faae80e8] app/mailers/user_mailer.rb:148:in `plan_visibility'
[30320f2d-4da4-409e-afdc-0ff4faae80e8] app/controllers/plans_controller.rb:412:in `block in visibility'
test server is reporting an invalid wkpdftohtml path
Receive an error when trying to change a plan's visibility. The error from the logs is:
I, [2022-07-06T12:45:42.494139 #158] INFO -- : [30320f2d-4da4-409e-afdc-0ff4faae80e8] Completed 500 Internal Server Error in 75ms (ActiveRecord: 29.7ms | Allocations: 12075) F, [2022-07-06T12:45:42.495232 #158] FATAL -- : [30320f2d-4da4-409e-afdc-0ff4faae80e8] [30320f2d-4da4-409e-afdc-0ff4faae80e8] NoMethodError (undefined method `to_sym' for 0:Integer Did you mean? to_s): [30320f2d-4da4-409e-afdc-0ff4faae80e8] app/mailers/user_mailer.rb:148:in `plan_visibility' [30320f2d-4da4-409e-afdc-0ff4faae80e8] app/controllers/plans_controller.rb:412:in `block in visibility'
Came across this issue while conducting UAT for DMPonline. Has a solution been found yet or still in progress?
I don't think so.
It seems like calling an "enum" column returns the integer value, not the value defined in the enum (here 0 instead of "organisationally_visible"), triggering the exception. I'm not sure if it's a Rails 6 problem though.
I'll try to find a solution as it could be problematic because roadmap uses a lot of those.
Thank you, yes, I tried looking at it on Friday but didn't make any progress. Will post here if that changes.
https://github.com/DMPRoadmap/roadmap/blob/5eff207650cdc0951a9d84982c48e38002cd4c0f/app/models/plan.rb#L78
After some research, our problem seems to be coming from this line. It forces the system to return the visibility as an Integer. By removing this line, the above issue is resolved. That could impact other features though, I'll do some more tests.
There's a similar line in the Template model.