Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Database schema documentation for the public data dump and SEDE for PostHistory says:

Comment: This field will contain the comment made by the user who edited a post. If PostHistoryTypeId = 10, this field contains the CloseReasonId of the close reason:
1: Exact Duplicate
2: Off-topic
3: Subjective and argumentative
4: Not a real question
7: Too localized
10: General reference
20: Noise or pointless (Meta sites only)

With the new close reasons, these are site specific ones in the 100+ range.

For the most part, reason 102 on Programmers.SE appears to be the 'recommend a tool' close reason. However, this does not appear to be consistent.

The following query: Selection of questions with confusing comment / close reason is, well, confusing. I've selected a few questions that were closed recently (to avoid any possible problems with changing close reasons of June/July).

The SQL of the query is:

select as [Post Link],
  posts q
  join posthistory ph on ( = ph.postid)
  ph.PostHistoryTypeId = 10
  and ph.comment = 102
  and in (213960, 213983, 140658, 214117, 10920)

The results are:

id     closeddate          comment 
------ ------------------- ------- 
10920  2013-10-11 17:16:47 102     
140658 2013-10-11 07:58:04 102     
214117 2013-10-11 07:53:30 102     
213983 2013-10-11 21:56:31 102     
213960 2013-10-12 13:53:56 102     

Of these:

  • 10920 - career or education advice.
  • 140657 - recommend a tool, library or favorite off-site resource.
  • 214117 - custom reason.
  • 213983 - recommend a tool, library or favorite off-site resource.
  • 213960 - custom reason.

Am I misreading/using the comment field? Is there some documentation missing on what it means? Is there some glitch/bug in loading the data into Data.SE?

Or at its real core, how do I get all the questions that were closed for "recommend a tool, library or favorite off-site resource" and only the questions that were closed for that reason? Is the data wrong? Or am I doing something wrong?

share|improve this question
Pending close votes are present in the database, but not those same votes after closure has completed. Grmbl. – Martijn Pieters Jul 28 '14 at 16:38

For the most part, reason 102 on Programmers.SE appears to be the 'recommend a tool' close reason.

No, reason 102 is any reason of the "off-topic" category. See the query Show all types.

The reason "recommend a tool" is off-topic reason listed with Id=8 in the table CloseAsOffTopicReasonTypes. The problem is that this Id number can't be matched to anything because the OffTopicReasonType is not in the PostHistory table. It logically belongs to the Text column of that table, which contains all of the other information in the closure notice: the list of those who voted to close, and (for duplicates) the original question and whether the dupehammer was used.

Or perhaps OffTopicReasonType can be given a column of its own, alongside the existing "Comment" column, which contains the category of closure reason.

Is this a bug or missing feature? I can't tell.

share|improve this answer

You must log in to answer this question.