Problem/Motivation
The total count is not returned along with the view.
Proposed resolution
Add the count field to the meta section of the response, like in jsonapi_extras.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3187221-total_count-5.patch | 7.66 KB | deciphered |
| #4 | 3187221-total_count-4.patch | 6.23 KB | deciphered |
| #4 | 3187221-total_count-4-test_only.patch | 4.2 KB | deciphered |
| #2 | 3187221-2.patch | 2 KB | blazey |
Issue fork jsonapi_views-3187221
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
blazey commentedComment #3
decipheredI have manually tested this, and I can see the existing tests are passing. Great work.
It will need tests added.
Comment #4
decipheredI've added two patches, a test only to fail and the combined patch.
There are commented out tests in the patch, as the numbers don't appear correct based on the test data, and in cases where a display doesn't have a pager it returns
nullinstead of a total count.More work will be required.
Comment #5
decipheredUpdated patch with fix for
nullcounts, and updated tests.Comment #7
decipheredCommitted. Thanks for the patch @blazey.