Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Fix incorrect responses count for form list view #262

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

whitef0x0
Copy link
Member

This PR fixes the incorrect responses count for each form in the form list view.

Description

This feature was broken when we stopped storing form submissions as subdocuments in the Form Schema. In order to improve performance we have used MongoDB's aggregration feature to quickly find the number of form submissions for all of a given users' forms.

Motivation and Context

This is required as currently the responses count is not returning the correct count of submissions for each form in the form list view.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 26.667% when pulling ed6d917 on fixResponseCountOnFormList into 9d51608 on 2.20.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants