Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6 Tasks (to-do list) #3187

Closed
gjacob24 opened this issue Jun 13, 2022 · 8 comments
Closed

Rails 6 Tasks (to-do list) #3187

gjacob24 opened this issue Jun 13, 2022 · 8 comments
Labels

Comments

@gjacob24
Copy link
Contributor

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.)

@gjacob24 gjacob24 mentioned this issue Jun 13, 2022
@briri
Copy link
Contributor

briri commented Jul 6, 2022

please use https://dmproadmap.uc3dev.cdlib.org/ for testing this new codebase and then lets document any issues we uncover here.

@briri
Copy link
Contributor

briri commented Jul 6, 2022

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).

@briri
Copy link
Contributor

briri commented Jul 6, 2022

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'

@briri
Copy link
Contributor

briri commented Jul 11, 2022

test server is reporting an invalid wkpdftohtml path

@gjacob24
Copy link
Contributor Author

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?

@benjaminfaure
Copy link
Contributor

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.

@gjacob24
Copy link
Contributor Author

Thank you, yes, I tried looking at it on Friday but didn't make any progress. Will post here if that changes.

@benjaminfaure
Copy link
Contributor

attribute :visibility, :integer, default: 3

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants