Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.5k views
in Q2A Core by
edited by

This week it happened... someone posted a question twice, nobody deleted the duplicate, and the conversation got split into two.  Time for a question merging plugin!

So, what needs to be done?  Obviously, all answers and comments have to be moved, that's easy.

Votes have to be merged, tags have to be merged(?), views have to be merged... what else?  What if the question's content is a bit different?  I guess an optional content merge is a good idea too...

Okay, here's a basic merge plugin:

https://github.com/NoahY/q2a-post-merge

What it does:

- moves comments and answers from one question to another, then deletes the first question
- includes an ajax preview call to show which posts are affected
- stores redirect info for deleted questions in postmeta

It's alpha code, for sure; needs more testing, but seems to work as expected, afaics.

Screenshot:

by
I've forked the repo and created a new version with some bugfixes and improvements, as stated in this post: http://www.question2answer.org/qa/45474

2 Answers

+2 votes
by

Noah, think about this one:

On who's name are the questions going to be merged?

The first person who asked something? The question with the most valuable content?

Maybe, co-authors?

By the way, how are you planning to 'merge' votes and views?

Add them together and divide it by the amount? Or just add them all together?

by
Ah, well pointed out... I missed that, thinking about how in the case I mentioned it was the same poster in each.  Obviously, the majority case is when it is two different posters.

In that case, I guess you don't merge points, votes or views.  Merging is one way, anyway, so you specify which is being merged from and which to.  I assume that is fair, since a duplicate question shouldn't be encouraged.

I guess you also don't merge tags or content either.  You just move answers and comments, no?

Maybe marking as a duplicate and putting a link is more appropriate in most cases... but doesn't SO have some merging function in cases where it is the exact same question and all you want to do is have the answers in one place?

I guess after you merge you have to recalculate points as well.  Anything else to recalculate?  You delete the merged post, so it is all taken care of, isn't it?
by
But if i do not have sequential numbers to merge but for example 5 - 89 - 173 - 742 - 1258 etc .
How can i merge in this way?
+2 votes
by

Dear Noah,

it would be great to have a derivate of this plugin, for instance called q2a-move-one-answer

Giving the option to move one answer separately with its comments to another question specified.

Advantages:

  • each answer could be moved to a different question
  • no need to delete the question (can be marked as duplicate!)
  • gives admin more control overall

I posted this idea in your github issue list: https://github.com/NoahY/q2a-post-merge/issues/2

Thanks if you would find the time!
Kai
 

...