DNNCommunity / DNNCommunity/Dnn.CommunityForums
TASK: Stop using "PostId"
- Dominant language
- C#
- Stars
- 18
- Forks
- 23
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 20
Description
As we continue the modernization of DNN Community Forums, there are still some lingering concepts needing attention. One is the use of an artificial concept of "PostId", which is the topicid for originating topic in a thread, but is the replyid for replies to the originating topic. Where this becomes problematic is in code that says postId==topicid, which leads to subtle and hard to diagnose bugs. Example when "quoting" a post, that code uses postId ==topicid to determine if you are quoting the originating topic or a reply. But what happens if the replyid value is the same as the topicid? Your _intention_ is to be quoting the reply but you end up quoting the originating topic. Rare, but it happens.
We need to use a stronger concept like
- creating a truly unique postId and. A table to map to combined topicid/replyid (where replyid is null for originating topic but populated for replies)
- Replaces postId with replyid (if originating topic use null, 0, -1)?
- use contentid which already exists and is equivalent yet unique
Contributor guide
Research direction
Start by tracing the forum code that uses postId, especially quoting logic, and compare it with the existing contentid and topicid/replyid concepts. The issue lists several possible replacement designs; done requires choosing and implementing one consistently, with coverage for a replyid that equals a topicid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100