flarum / flarum/issue-archive

Wrong discussionCount in API/tags

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

For some reason, i see a wrong discussionCount in tags api.

Example:
https://flarum.it/t/feedback => 5 discussion

API endpoint:

```javascript
{
"type": "tags",
"id": "6",
"attributes": {
"name": "Feedback",
"description": "Per proporre o discutere su nuove feauture per Flarum o il suo design. Per problemi utilizza il tag Supporto.",
"slug": "feedback",
"color": "#a945ba",
"backgroundUrl": null,
"backgroundMode": null,
"icon": "fas fa-comment-dots",
"discussionCount": 3,
"position": 2,
"defaultSort": null,
"isChild": false,
"isHidden": false,
"lastPostedAt": "2021-10-13T20:46:29+00:00",
"canStartDiscussion": true,
"canAddToDiscussion": true,
"isRestricted": false,
"isQnA": true,
"reminders": true
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the API/tags endpoint and compare its discussionCount for the Feedback tag with the five discussions shown at https://flarum.it/t/feedback. Trace how the JSON attributes are produced and verify that the reported count matches the discussions represented by the tag; the issue is done when the endpoint reports the correct value.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.