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 „Gefällt mir“

Agree we should fix this, for now pr-welcome

4 „Gefällt mir“

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 „Gefällt mir“

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

Community Notice | Freetrade

into this one:

Community Notice | Freetrade

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 hast du Ideen zu diesen Problemen?

Mir fällt eine Ausnahme ein.

Nehmen wir an, wir haben zwei Themen: A und B, jeweils mit 100 Stimmen, aber 20 der Nutzer, die für A gestimmt haben, haben auch für B gestimmt. Wenn die beiden Themen zusammengeführt werden, ist nicht garantiert, dass das finale Thema 200 Stimmen hat, da es möglicherweise Nutzer gibt, die für beide Themen gestimmt haben, und die Stimmen dann nicht verdoppelt werden.

Die finale Anzahl ist = Anzahl der Nutzer, die für A gestimmt haben + Anzahl der Nutzer, die für B gestimmt haben - Anzahl der Nutzer, die sowohl für A als auch für B gestimmt haben. Im obigen Beispiel (100 + 100 - 20 = 180).

2 „Gefällt mir“

Ich habe hier einige Änderungen vorgenommen und gerade einen Pull-Request eingereicht, um die Sache klarer zu machen. Sobald dieser Pull-Request angenommen wurde, wird der Moderator-Beitrag, der zum ursprünglichen Thema hinzugefügt wurde, so bearbeitet, dass er enthält, wie viele Stimmen verschoben wurden und wie viele nicht verschoben wurden (weil der Benutzer bereits für das Zielthema gestimmt hat).

4 „Gefällt mir“