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

Bug DCC Issues 592, 645 - Fix for Org Admins seeing deleted Plans for… #3087

Conversation

johnpinto1
Copy link
Contributor

@johnpinto1 johnpinto1 commented Jan 11, 2022

… Org.

Fixes issues:
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/592
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/645
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/641

The reason we are seeing deleted (de-activated) Plans is that there is
no filter for plans with Roles active in the Org model's
org_admin_plans() method.

Change added .where(roles: { active: true }) to filter plans in
org_admin_plans() method of Org model.

… Org.

Fixes issues:
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/592
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/645
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/641

The reason we are seeing deleted (de-activated) Plans is that there is
no filter for plans with Roles active in the Org model's
org_admin_plans() method.

Change added .where(roles: { active: true }) to filter plans in
org_admin_plans() method of Org model.
@johnpinto1 johnpinto1 force-pushed the bug_dcc_592_and_645_deleted-private_plans_visible_to_org_admins branch from 18c650b to 1173d60 Compare January 11, 2022 12:23
Copy link
Contributor

@briri briri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good @johnpinto1

Copy link
Contributor

@raycarrick-ed raycarrick-ed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

John Pinto and others added 14 commits January 13, 2022 12:13
Orgs.

Fix for DCC issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/679

Changes:
- in app/controllers/super_admin/orgs_controller.rb added missing params
to orgs_params method
     :funder, :institution, :organisation
- in app/models/org.rb removed (as it is never set on Org creation)
      validates :abbreviation, presence: { message: PRESENCE_MESSAGE }
- in app/views/orgs/_profile_form.html.erb removed :abbreviation required
      "aria-required": true
- in app/views/shared/org_selectors/_external_only.html.erb renamed wrongly named text field :org_name to :name
      <%= form.label :name, label %>
      <%= form.text_field :name, class: "form-control autocomplete",
Orgs.

Fix for DCC issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/679

Changes:
- in app/controllers/super_admin/orgs_controller.rb added missing params
to orgs_params method
     :funder, :institution, :organisation
- in app/models/org.rb removed (as it is never set on Org creation)
      validates :abbreviation, presence: { message: PRESENCE_MESSAGE }
- in app/views/orgs/_profile_form.html.erb removed :abbreviation required
      "aria-required": true
- in app/views/shared/org_selectors/_external_only.html.erb renamed wrongly named text field :org_name to :name
      <%= form.label :name, label %>
      <%= form.text_field :name, class: "form-control autocomplete",
…s' of github.com:DMPRoadmap/roadmap into bug-dcc-679-super-admins-unable-to-add-new-organisations
look at what comes out of safe_save
Schrodinger's cat, it seems
in org model spec
org spec failing with no abbrev for some reason.
Used to be that org had to have an abbrev. That stopped the Super Admin creating the org so was removed. Remove check from this test.
…ble-to-add-new-organisations

DCC Issue 679 - Fix for issue that Super Admins unable to create new
… Org.

Fixes issues:
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/592
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/645
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/641

The reason we are seeing deleted (de-activated) Plans is that there is
no filter for plans with Roles active in the Org model's
org_admin_plans() method.

Change added .where(roles: { active: true }) to filter plans in
org_admin_plans() method of Org model.
…g_admins' of github.com:DMPRoadmap/roadmap into bug_dcc_592_and_645_deleted-private_plans_visible_to_org_admins
@raycarrick-ed raycarrick-ed merged commit 001e52a into development Feb 1, 2022
@raycarrick-ed raycarrick-ed deleted the bug_dcc_592_and_645_deleted-private_plans_visible_to_org_admins branch February 1, 2022 13:20
@raycarrick-ed raycarrick-ed restored the bug_dcc_592_and_645_deleted-private_plans_visible_to_org_admins branch February 2, 2022 10:15
@raycarrick-ed raycarrick-ed deleted the bug_dcc_592_and_645_deleted-private_plans_visible_to_org_admins branch February 2, 2022 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants