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

Removing a resource from the project does not affect resource count on dashboard. #674

Closed
linzjax opened this issue Sep 12, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@linzjax
Copy link
Contributor

linzjax commented Sep 12, 2016

Steps to reproduce the error

Attach a resource to a project.
Check the resource count on the dashboard.
Delete the resource from the project.
Check the resource count on the dashboard again.

Actual behavior

Project dashboard reflects total number of resources loaded, regardless of whether or not they're still loaded.

screen shot 2016-09-12 at 1 06 40 pm

screen shot 2016-09-12 at 1 06 37 pm

### Expected behavior

Dashboard count reflects the number of resource currently loaded.

@linzjax linzjax added the bug label Sep 12, 2016
@wonderchook wonderchook modified the milestones: Sprint 8, Sprint 9 Sep 12, 2016
@wonderchook
Copy link
Contributor

@linzjax I'm thinking this doesn't need to be fixed this week, but would be good to get into Sprint 9. Is this something you want to take a stab at?

@seav
Copy link
Contributor

seav commented Sep 12, 2016

Oops. This is related to the work that I did for improving handling of resources. Deleted (archived) resources should not count towards the total. This is easily fixed by filtering the queryset withexclude(archived=True).

One question I had for this was whether to show the true total to those who have the resource.unarchive permission. But I think it would be better and simpler to just show the filtered total to everyone.

@wonderchook
Copy link
Contributor

@seav agreed on showing the filtered total to everyone

@divyabiyani
Copy link

@seav Could you please let me know the file related to this bug so that I can amend the code.

@seav seav self-assigned this Sep 23, 2016
seav added a commit that referenced this issue Sep 23, 2016
oliverroick pushed a commit that referenced this issue Sep 23, 2016
* Fix #674: Fix resource count on project dashboard

* Resolve review feedback
manoramahp pushed a commit to manoramahp/cadasta-platform that referenced this issue Sep 27, 2016
* Fix Cadasta#674: Fix resource count on project dashboard

* Resolve review feedback
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

4 participants