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
You'd expect these checks to verify the value of template.visibility
Actual behaviour:
3.0.5 :001 > Plan.visibilities
=> {"organisationally_visible"=>0, "publicly_visible"=>1, "is_test"=>2, "privately_visible"=>3}
3.0.5 :002 > Plan.first.visibility
Plan Load (1.2ms) SELECT "plans".* FROM "plans" ORDER BY "plans"."id" ASC LIMIT $1 [["LIMIT", 1]]
=> "privately_visible"
3.0.5 :003 > Template.visibilities
=> {"organisationally_visible"=>0, "publicly_visible"=>1}
3.0.5 :004 > Template.first.visibility
Template Load (1.2ms) SELECT "templates".* FROM "templates" ORDER BY "templates"."id" ASC LIMIT $1 [["LIMIT", 1]]
=> 0
While plan.visibility outputs the string representation of the enum value, template.visibilty outputs the integer. As a result, the aforementioned == 'organisationally_visibile' checks will always return false.
The text was updated successfully, but these errors were encountered:
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
v4.2.0
Expected behaviour:
app/views/org_admin/templates/_form.html.erb
includes the following:app/views/org_admin/templates/_show.html.erb
includes the following:You'd expect these checks to verify the value of template.visibility
Actual behaviour:
While
plan.visibility
outputs the string representation of the enum value,template.visibilty
outputs the integer. As a result, the aforementioned== 'organisationally_visibile'
checks will always return false.The text was updated successfully, but these errors were encountered: