What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

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
  q.id as [Post Link],
  q.closeddate,
  ph.comment
from
  posts q
  join posthistory ph on (q.id = ph.postid)
where
  ph.PostHistoryTypeId = 10
  and ph.comment = 102
  and q.id 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 at 16:38

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged .