Support merging of 2 topics with voting

I had people two topics in a voting category which were essentially the same request, so I merged all comments from Topic B to Topic A, and now Topic A has no votes.

Has anyone seen an issue where votes on Topic A are lost/reset after moving a number of commits into it from Topic B?

I think I did, but don’t know if there’s any place I can tell if a Topic A ever got votes. If they were logged anywhere, I’d love to know so I can check.

7 个赞

Agree we should fix this, for now pr-welcome

4 个赞

Hello,

This PR should fix this.

Let’s say we have topics A and B. When topic A is merged into topic B, all users who voted topic A will automatically vote B and their votes for A will be removed.

6 个赞

Are there any exceptions to this rule? I’ve noticed some inconsistent behaviour e.g. when I merged this topic:

Let users specify number of shares while buying - Ideas 💡 - Freetrade Community

into this one:

Buy an specific number of shares rather than a £ amount - Ideas 💡 - Freetrade Community

not all of the votes were carried across the latter topic. IIRC only 16 made it across.

Yes, I’ve experienced the same thing. We’re regularly merging topics. Our process is to merge to the oldest topic to preserve the chronological order of the posts. When this happen we lose the votes for the other topics.

@dan 对这些 issue 有什么想法吗?

我能想到的一个例外情况是:

假设有两个主题 A 和 B,每个主题各有 100 票,但有 20 位用户同时对 A 和 B 投了票。如果将这两个主题合并,最终主题的票数并不一定是 200 票,因为可能存在对两个主题都投票的用户,他们的票数不会被重复计算。

最终票数 = 投票 A 的用户数 + 投票 B 的用户数 - 同时对 A 和 B 投票的用户数。在上面的例子中(100 + 100 - 20 = 180)。

2 个赞

我在此做了一些修改,并刚刚提交了一个拉取请求,以使内容更清晰。该拉取请求被接受后,添加到原始主题中的版主帖子将被编辑,以包含已迁移的票数以及未迁移的票数(因为用户已经为目的地主题投过票)。

4 个赞