API endpoint for KPI dashboard - Activities

VERIFIED FIXED

Status

Mozilla Reps
reps.mozilla.org
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: pierros, Assigned: nemo)

Tracking

Details

(Whiteboard: [kb=1699039] )

(Reporter)

Description

3 years ago
Public API endpoint (not advertised) based on the new API

Request /api/kpi_activities/?
query possible parameters:
- Country
- Initiative
- Category (functional area)
- Week span (start week, end week)

Response (json)
- Total to date
- Total this week (and percentage change with previous)
- Total this quarter so far (and percentage change since start of quarter)
- Graph weeks numbers (for each week in the time span:
-- Week # Total
(Reporter)

Updated

3 years ago
Blocks: 1140372
Whiteboard: [kb=1699039]
Group: mozilla-reps-admins
Version: next → unspecified
(Assignee)

Updated

3 years ago
Assignee: nobody → jgiannelos
Blocks: 1149543
(Assignee)

Comment 1

3 years ago
Merged here: https://github.com/mozilla/remo/pull/981
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Comment 2

3 years ago
Commit pushed to master at https://github.com/mozilla/remo

https://github.com/mozilla/remo/commit/4b41a147d6f56cf26cfe35518048a2631630647f
[Fix bug 1144188] Expose API endpoint for activities KPI.

* Add APIView with the stats required for the activities KPI
* Enable filtering on `country`, `functional_areas__name`, `campaign__name`
* Use a generic KPI serializer since output is similar to all endpoints
* Use consistent query params in all API endpoints
* Use `query_params` instead of soon to be deprecated `QUERY_PARAMS`
* Add helper method to calculate quarter dates /w tests
* Add comments to make calculations more readable

Updated

3 years ago
Version: unspecified → next
Verified on stage:

* The end-point is present, exporting the numbers specified in the description.
* Verified that the numbers are correct by querying the database for the weeks displayed in the kpi diagram.
Status: RESOLVED → VERIFIED
(Assignee)

Updated

3 years ago
Version: next → 463
You need to log in before you can comment on or make changes to this bug.