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

The Usage page "No of plans during last year" and "No. plans by template" total for some months differ slightly. #2083

Closed
johnpinto1 opened this issue Apr 12, 2019 · 8 comments
Assignees
Labels

Comments

@johnpinto1
Copy link
Contributor

Expected behaviour:
The No of plans during last year for a given month should be equal to No. plans by template total for the same month period.

Actual behaviour:
In some cases the figures differ. See the Feb-19 in images below. The figures are 5 and a total of 8 respectively.
NoofPlansLastYear
noOfTemplates

The calls
http://localhost:3000/api/v0/statistics/created_plans?range_dates... returns
{"Apr-18":47,"May-18":98,"Jun-18":116,"Jul-18":0,"Aug-18":0,"Sep-18":0,"Oct-18":3,"Nov-18":0,"Dec-18":0,"Jan-19":1,"Feb-19":5,"Mar-19":2}
http://localhost:3000/stat_created_plans_by_template?start_date=2018-04-30 (
[{"count":2,"date":"2019-03-31","by_template":[ ... {"count":8,"date":"2019-02-28","by_template":[{"name":"AHRC Data Management Plan","count":6},{"name":"Standard CRUK Template","count":1},{"name":"Hartstichting","count":1}]}, ...

Steps to reproduce:
Choose the Time period "Last 12 months" for No. of Plans by template. Now total the number of plans for each month by moving the mouse over the stacked bar. Compare these figures with the the corresponding months on the No. plans during last year.
Or you can compare the Ajax requests

@raycarrick-ed
Copy link
Contributor

I think the reworking moving the logic from JS to ruby looks good and could serve as a model for AJAX calls going forward.
@briri

Two very small points:

in _filter.html.erb the "Go" button can overlap with the organisation menu when that menu is quite wide (i.e there are long org names) would it be better perhaps on the next line?

The "Download" buttons all have "open in a new window" attached to them when they in fact open a popup dialog. Is this worthwhile or better just left off as it's not really what it's doing?

that's it. The rest all looks fine.

@briri
Copy link
Contributor

briri commented Jan 21, 2020

thanks @raycarrick-ed. I had done most of my testing as an org admin so didn't notice the issue with the Org dropdown.

Agreed the download buttons should probably not show the 'open in a new window' message. I will address both.

@briri
Copy link
Contributor

briri commented Jan 22, 2020

Moved the org selection in the filter down to its own row (beneath the topic and date filters). We should be able to move it back up next to the dates once we take #2343 which removes that 'topic' filter.

Also removed the 'opens in a new window' class from the download buttons

@magdalenadrafiova
Copy link

this still seem to be an issue see ticket #2119

@magdalenadrafiova
Copy link

This works well now - I logged in and had my org set up as University of Manchester and the numbers were consistent. Closing this

@mariapraetzellis
Copy link

Looks like there is a bug for super admins. When I change the organization in the drop down list it does not update the graphs.

We also need a refresh of data on dmponline dev because it makes it hard to look for stats w/ old data.

BugForSUperAdmin

@briri
Copy link
Contributor

briri commented Feb 14, 2020

We haven't worked on #2343 yet (which involves making those filters update the charts).

Does it display the User/Plan counts if you select an Org and enter dates?

@xsrust xsrust assigned xsrust and unassigned briri and raycarrick-ed Mar 16, 2020
@xsrust xsrust closed this as completed Mar 16, 2020
@xsrust xsrust reopened this Mar 16, 2020
@xsrust
Copy link
Contributor

xsrust commented Mar 17, 2020

Closing this out as the Plan/User counts are filtering correctly based on the org when I try this locally.
I've actually moved the Run your own filter section away from the charts in the PR for #1682 so it does not imply to the user that it will affect the charts.

@xsrust xsrust closed this as completed Mar 17, 2020
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