FlowFuse / FlowFuse/flowfuse

Usage ping: projectTemplates and projectStacks counts are swapped

Open Beginner friendly
#7,900 0 comments 0 reactions 0 assignees View on GitHub
bug needs-triage
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

### Current Behavior

In [forge/housekeeper/tasks/telemetryMetrics/004-platform.js#L41-L42](https://github.com/FlowFuse/flowfuse/blob/881e2595318cc9d174434308a2c95e21fa277112/forge/housekeeper/tasks/telemetryMetrics/004-platform.js#L41-L42) the two metrics are transposed:

- `platform.counts.projectTemplates` is computed from `ProjectStack.count()`
- `platform.counts.projectStacks` is computed from `ProjectTemplate.count()`

Every ping reports templates as stacks and stacks as templates.

### Expected Behavior

- `projectTemplates` counts `ProjectTemplate`
- `projectStacks` counts `ProjectStack`

### Steps To Reproduce

Code inspection, see link above.

### Environment

- FlowFuse version: main

Contributor guide

Open the contributing guide

Research direction

Open forge/housekeeper/tasks/telemetryMetrics/004-platform.js at lines 41-42 and inspect how projectTemplates and projectStacks are assigned. Correct the model used for each count so templates use ProjectTemplate and stacks use ProjectStack, then verify the telemetry payload reports both metrics under the expected names.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
analytics, backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.