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.
Options

Q&A Plugin - changing a discussion to question after posting..

pavsidpavsid New
edited April 2015 in Vanilla 2.0 - 2.8

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.

Comments

  • Options
    pavsidpavsid New
    edited April 2015

    I should also mention that the discussion doesn't have any answers or comments at the time of changing it to a question ;)

  • Options

    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.

  • Options

    grep is your friend.

  • Options

    Done - https://github.com/vanilla/addons/issues/205

    I've included my fix, if anyone would like to use it.

Sign In or Register to comment.