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

Merge Development for v3.0.5 #3108

Merged
merged 73 commits into from
Feb 14, 2022
Merged

Merge Development for v3.0.5 #3108

merged 73 commits into from
Feb 14, 2022

Conversation

briri
Copy link
Contributor

@briri briri commented Feb 14, 2022

Bug Fixes:

briri and others added 30 commits October 7, 2021 15:20
contributor form configurable.

Fix for #2941

Changes:
  - Added a property a boolean valued property config.x.application.display_contributor_phone_number to config/initializers/_dmproadmap.rb.
  - Wrapped the phone number field in
app/views/contributors/_form.html.erb in a if Rails.configuration.x.application.display_contributor_phone_number statement.
form for Plan based on whether email and/or name are required.

Fix for DCC bug #2983

Changes:
 - Added two new properties to config/initializers/_dmproadmap.rb
   (both devault to false):
   config.x.application.require_contributor_name = false
   config.x.application.require_contributor_email = false
 -In Contributor model the private method name_or_email_presence()
  has been updated to take account of the above mentioned property
settings.
    pagination of user's plans broken.

    Fix for issue #3069 and DCC issue
    https://github.com/DigitalCurationCentre/DMPonline-Service/issues/675.

    Changes:
      - Replaced view files /paginable/plans/org_admin_other_user with /paginable/plans/_index.html.erb
        with extra checks for plan.owner.present? as missing plan.owner broke a DCC user's plans being render by org_admin.
      - Replaced partial with '/paginable/plans/org_admin_other_user'  with '/paginable/plans/index',
         replaced action'org_admin_other_user' with 'index' in paginable_renderiser() method in views
        /org_admin/users/edit.html.erb. /org_admin/users/plans.html.erb and /super_admin/users/edit.html.erb.
      - In Paginable::PlansController replaced -
        # GET /paginable/plans/org_admin/:page  with # GET /paginable/users/:id/plans
        associated with method org_admin_other_user()  renamed index()
      - Routes replaced
        get "org_admin_other_user/:page", action: :org_admin_other_user,
                                        on: :collection, as: :org_admin_other_user
        # Paginable actions for users
        resources :users, only: [] do
          get "index/:page", action: :index, on: :collection, as: :index

        with

        resources :users, only: %i[index] do
           member do
             resources :plans, only: %(index)
           end
        end
… 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.
exception occuring for an answer with question options selected but text
nil. Link to issue
https://github.com/DigitalCurationCentre/DMPonline-Service/issues/674

Change to app/models/concerns/exportable_plan.rb,
we replaced line
   answer_text += answer.text if answer.answered?
with answer.text present check
   answer_text += answer.text if answer.answered? && answer.text.present?
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",
…r pointed oout that the Plan Owner email was missing in call /api/v0/statistics/plans.

DCC issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/453

Changed app/views/api/v0/statistics/plans.json.jbuilder to include owner
of Plan. So extra fragment of json in each Plan now includes

"owner": {
        "email": "[email protected]"
      },
as in previous version of Roadmap.
user_id set. This has proved in several cases.

Fix for DCC bug https://github.com/DigitalCurationCentre/DMPonline-Service/issues/688

Change in the Plan model method owner_and_coowners() we check that each
role we currently get also has associated user that is not nil.
Updated PDF coversheet to always show the creator of the DMP
user_id set. This has proved in several cases.

Fix for DCC bug https://github.com/DigitalCurationCentre/DMPonline-Service/issues/688

Change in the Plan model method owner_and_coowners() we check that each
role we currently get also has associated user that is not nil.
…DMPRoadmap/roadmap into bug_dcc_668-admin_not_able_to_see_plans
…o_see_plans

DCC Bug 668 - Fix for issue of roles in a plan that does not have a
…r pointed oout that the Plan Owner email was missing in call /api/v0/statistics/plans.

DCC issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/453

Changed app/views/api/v0/statistics/plans.json.jbuilder to include owner
of Plan. So extra fragment of json in each Plan now includes

"owner": {
        "email": "[email protected]"
      },
as in previous version of Roadmap.
…ithub.com:DMPRoadmap/roadmap into bug_dcc-453_api_not_providing_owner_email_anymore
various minor rubocop fixes
…g_owner_email_anymore

Bug dcc 453 api not providing owner email anymore
John Pinto and others added 29 commits February 1, 2022 12:28
… 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
…private_plans_visible_to_org_admins

Bug DCC Issues 592, 645 - Fix for Org Admins seeing deleted Plans for…
…hub.com:DMPRoadmap/roadmap into bug_dcc_674_csv_download_plans_fails_for_admins
…ns_fails_for_admins

Issue DCC-674: Fix for broken CSV Download noticed because a nil
    pagination of user's plans broken.

    Fix for issue #3069 and DCC issue
    https://github.com/DigitalCurationCentre/DMPonline-Service/issues/675.

    Changes:
      - Replaced view files /paginable/plans/org_admin_other_user with /paginable/plans/_index.html.erb
        with extra checks for plan.owner.present? as missing plan.owner broke a DCC user's plans being render by org_admin.
      - Replaced partial with '/paginable/plans/org_admin_other_user'  with '/paginable/plans/index',
         replaced action'org_admin_other_user' with 'index' in paginable_renderiser() method in views
        /org_admin/users/edit.html.erb. /org_admin/users/plans.html.erb and /super_admin/users/edit.html.erb.
      - In Paginable::PlansController replaced -
        # GET /paginable/plans/org_admin/:page  with # GET /paginable/users/:id/plans
        associated with method org_admin_other_user()  renamed index()
      - Routes replaced
        get "org_admin_other_user/:page", action: :org_admin_other_user,
                                        on: :collection, as: :org_admin_other_user
        # Paginable actions for users
        resources :users, only: [] do
          get "index/:page", action: :index, on: :collection, as: :index

        with

        resources :users, only: %i[index] do
           member do
             resources :plans, only: %(index)
           end
        end
…esults_on_plans_org_admin_other_user_breaks

 Issue#3069 - (DCC Issue 675) - Org Admin and Super Admin searches and
form for Plan based on whether email and/or name are required.

Fix for DCC bug #2983

Changes:
 - Added two new properties to config/initializers/_dmproadmap.rb
   (both devault to false):
   config.x.application.require_contributor_name = false
   config.x.application.require_contributor_email = false
 -In Contributor model the private method name_or_email_presence()
  has been updated to take account of the above mentioned property
settings.
… of github.com:DMPRoadmap/roadmap into bug_DCC2983-possible_to_add_contributor_without_a_name
typo
rubocop stuff. Single line ifs and use of zero?
…contributor_without_a_name

Issue#dcc2983 - Fix for preventing adding a Contributor via Contributor
V0.

Changes:
- replaced wrongly named param :page_size with :per_page that is used in
pagination in app/controllers/api/v0/base_controller.rb
- added a before_action :page_params to app/controllers/api/v0/plans_controller.rb
- added code to retreive :per_page param to scope in
app/controllers/concerns/paginable.rb.
@briri briri merged commit c76d896 into master Feb 14, 2022
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