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 Mi Piace

Agree we should fix this, for now pr-welcome

4 Mi Piace

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 Mi Piace

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 hai qualche idea su questi problemi?

Posso pensare a un’unica eccezione.

Immaginiamo di avere due argomenti: A e B, ciascuno con 100 voti, ma 20 degli utenti che hanno votato per A hanno votato anche per B. Se i due argomenti vengono uniti, non è garantito che l’argomento finale abbia 200 voti, perché potrebbero esserci alcuni utenti che hanno votato per entrambi gli argomenti e i voti non verranno duplicati.

Il conteggio finale sarà = numero di utenti che hanno votato A + numero di utenti che hanno votato B - numero di utenti che hanno votato sia A che B. Nell’esempio sopra (100 + 100 - 20 = 180).

2 Mi Piace

Ho apportato alcune modifiche qui e ho appena inviato una pull request per rendere le cose più chiare. Dopo l’accettazione di questa pull request, il post del moderatore aggiunto all’argomento originale verrà modificato per indicare quanti voti sono stati spostati e quanti non sono stati spostati (perché l’utente ha già votato per l’argomento di destinazione).

4 Mi Piace