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

paged results of plans does not work on /super_admin/users/:user_id/edit #3069

Closed
nicolasfranck opened this issue Nov 22, 2021 · 7 comments
Closed
Assignees
Labels

Comments

@nicolasfranck
Copy link
Contributor

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

versions v3.0.2 till v3.0.4

Expected behaviour:

Actual behaviour:

When you click either view all, a page number, or whatever you'll get a blank
list of plans.

Steps to reproduce:

  • go the admin > users page
  • click on a user with more than 10 plans (so that paging of plans applicable)
  • click on "next" below the list of plans

Reason: controller DOES return the correct results, but in the wrong format ("html")

@mariapraetzellis
Copy link

mariapraetzellis commented Dec 8, 2021

@johnpinto1 this might be related to #675 in the DCC Roadmap fork?

@johnpinto1
Copy link
Contributor

As this a Roadmap issue as well as a DCC issue I have linked to a comment https://github.com/DigitalCurationCentre/DMPonline-Service/issues/675#issuecomment-990906539

@ojsmaina
Copy link

ojsmaina commented Dec 12, 2021 via email

@johnpinto1
Copy link
Contributor

Thanks for helpful comment @ojsmaina . I think you need to unsubscribe from the email yourself.

@briri
Copy link
Contributor

briri commented Dec 14, 2021

johnpinto1 pushed a commit that referenced this issue Jan 5, 2022
    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
raycarrick-ed pushed a commit that referenced this issue Feb 2, 2022
    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
@mariapraetzellis
Copy link

This was in the last release. We should check to make sure it's addressed. @raycarrick-ed @briri

@pherterich
Copy link

We have closed the corresponding DMPonline issue as this has been fixed on our end, so I will close here assuming John's PR addressed it.

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

6 participants