Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Q&A Plugin - changing a discussion to question after posting..
pavsid
New
Hi, i;m using the Q&A plugin, but noticed that if you change a discussion to a question after it's been posted then it doesn't appear in the "Unanswered" section.
It only appears in the "unanswered" section if you post as an actual question in the first place i.e. via /community/post/question
Any ideas? Thanks.
0
Comments
I should also mention that the discussion doesn't have any answers or comments at the time of changing it to a question
Starting to dig into the code base a little more now.
It seems that upon changing the discussion type, the field "QnA" isn't updated. (See method "_DiscussionOptions" in the QnA plugin).
For any questions to appear in "unanswered" the field "QnA" must be set to "Unanswered", which in this case it is set to NULL.
So, we need to check if that discussion has any "answers", and then set the "QnA" field to "Unanswered" or "Answered" as appropriate.
submit issues here
https://github.com/vanilla/addons/issues
grep is your friend.
Done - https://github.com/vanilla/addons/issues/205
I've included my fix, if anyone would like to use it.