Current Design
When we search the API for questions, one of the fields provided is closed_reason
. This is a sample of the results:
{
"question_id": 14707,
"creation_date": 1380431224,
"last_activity_date": 1380431224,
"score": -1,
"answer_count": 0,
"closed_date": 1380460217,
"title": "What is considered an actual termination date?",
"tags": [
"termination",
"quitting"
],
"closed_reason": "off-topic",
"view_count": 39,
"owner": {
"user_id": 10659,
"display_name": "Jon Smeeth",
"reputation": 1,
"user_type": "registered",
"profile_image": "https://www.gravatar.com/avatar/9dd9f1275a6193c18702f2adf332285b?s=128&d=identicon&r=PG&f=1",
"link": "http://workplace.stackexchange.com/users/10659/jon-smeeth"
},
"link": "http://workplace.stackexchange.com/questions/14707/what-is-considered-an-actual-termination-date",
"is_answered": false
},
In this case, the closed_reason
is listed solely as 'off-topic'. On The Workplace, there are two site-specific closed reasons:
- Questions seeking advice on what job to take, what skills to learn, etc. are off-topic as the answers are rarely useful to anyone else.
- Questions seeking legal advice are off-topic as they require answers by legal professionals. See: What is asking for legal advice?
This question was closed for the second reason, but there is absolutely no way to determine that from the API results.
Feature Request
Questions that have a site-specific off-topic close reason should have a custom closed_reason
result in the API. Questions that are closed as a custom off-topic reasons should retain the current off-topic closed_reason
. For instance, in this case the custom closed_reason
would be legal
as selected by moderators or the community when the site-specific closed reasons are chosen.
e.g.
"closed_reason": "legal",
Alternatively, an additional field could be added to the API called closed_description
or something of the sort that will either return the site-specific close reason description, or the custom reason entered in to the box.
e.g.
"closed_reason": "off-topic",
"closed_description": "Questions seeking legal advice are off-topic as they require answers by legal professionals. See: What is asking for legal advice?"
Benefits
Site-specific closed reasons tend to be very different and useful to distinguish between. To figure out which things should be added as site-specific close reasons in the future, the custom closed reasons people enter would be useful, either as an API call, or by being able to distinguish custom closed questions from others on the list.