mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 07:50:57 +01:00
Swap duplicate close status on Ponder for invalid
Summary: Until we have a proper close as duplicate workflow for Ponder, remove the option with something more sensible. Test Plan: Closed a question as invalid, saw it closed and in feed. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14007
This commit is contained in:
parent
7904d4c29c
commit
d718415868
3 changed files with 16 additions and 14 deletions
2
resources/sql/autopatches/20150829.ponder.dupe.1.sql
Normal file
2
resources/sql/autopatches/20150829.ponder.dupe.1.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
UPDATE {$NAMESPACE}_ponder.ponder_question
|
||||
SET status = 'invalid' WHERE status = 'duplicate';
|
|
@ -5,14 +5,14 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
const STATUS_OPEN = 'open';
|
||||
const STATUS_CLOSED_RESOLVED = 'resolved';
|
||||
const STATUS_CLOSED_OBSOLETE = 'obsolete';
|
||||
const STATUS_CLOSED_DUPLICATE = 'duplicate';
|
||||
const STATUS_CLOSED_INVALID = 'invalid';
|
||||
|
||||
public static function getQuestionStatusMap() {
|
||||
return array(
|
||||
self::STATUS_OPEN => pht('Open'),
|
||||
self::STATUS_CLOSED_RESOLVED => pht('Closed, Resolved'),
|
||||
self::STATUS_CLOSED_OBSOLETE => pht('Closed, Obsolete'),
|
||||
self::STATUS_CLOSED_DUPLICATE => pht('Closed, Duplicate'),
|
||||
self::STATUS_CLOSED_INVALID => pht('Closed, Invalid'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
self::STATUS_OPEN => pht('Open'),
|
||||
self::STATUS_CLOSED_RESOLVED => pht('Closed, Resolved'),
|
||||
self::STATUS_CLOSED_OBSOLETE => pht('Closed, Obsolete'),
|
||||
self::STATUS_CLOSED_DUPLICATE => pht('Closed, Duplicate'),
|
||||
self::STATUS_CLOSED_INVALID => pht('Closed, Invalid'),
|
||||
);
|
||||
return idx($map, $status, pht('Unknown'));
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
self::STATUS_OPEN => pht('Open'),
|
||||
self::STATUS_CLOSED_RESOLVED => pht('Resolved'),
|
||||
self::STATUS_CLOSED_OBSOLETE => pht('Obsolete'),
|
||||
self::STATUS_CLOSED_DUPLICATE => pht('Duplicate'),
|
||||
self::STATUS_CLOSED_INVALID => pht('Invalid'),
|
||||
);
|
||||
return idx($map, $status, pht('Unknown'));
|
||||
}
|
||||
|
@ -43,9 +43,9 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
self::STATUS_CLOSED_RESOLVED =>
|
||||
pht('This question has been answered or resolved.'),
|
||||
self::STATUS_CLOSED_OBSOLETE =>
|
||||
pht('This question is no longer valid or out of date.'),
|
||||
self::STATUS_CLOSED_DUPLICATE =>
|
||||
pht('This question is a duplicate of another question.'),
|
||||
pht('This question is out of date.'),
|
||||
self::STATUS_CLOSED_INVALID =>
|
||||
pht('This question is invalid.'),
|
||||
);
|
||||
return idx($map, $status, pht('Unknown'));
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
self::STATUS_OPEN => PHUITagView::COLOR_BLUE,
|
||||
self::STATUS_CLOSED_RESOLVED => PHUITagView::COLOR_BLACK,
|
||||
self::STATUS_CLOSED_OBSOLETE => PHUITagView::COLOR_BLACK,
|
||||
self::STATUS_CLOSED_DUPLICATE => PHUITagView::COLOR_BLACK,
|
||||
self::STATUS_CLOSED_INVALID => PHUITagView::COLOR_BLACK,
|
||||
);
|
||||
|
||||
return idx($map, $status);
|
||||
|
@ -66,7 +66,7 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
self::STATUS_OPEN => 'fa-question-circle',
|
||||
self::STATUS_CLOSED_RESOLVED => 'fa-check',
|
||||
self::STATUS_CLOSED_OBSOLETE => 'fa-ban',
|
||||
self::STATUS_CLOSED_DUPLICATE => 'fa-clone',
|
||||
self::STATUS_CLOSED_INVALID => 'fa-ban',
|
||||
);
|
||||
|
||||
return idx($map, $status);
|
||||
|
@ -82,7 +82,7 @@ final class PonderQuestionStatus extends PonderConstants {
|
|||
return array(
|
||||
self::STATUS_CLOSED_RESOLVED,
|
||||
self::STATUS_CLOSED_OBSOLETE,
|
||||
self::STATUS_CLOSED_DUPLICATE,
|
||||
self::STATUS_CLOSED_INVALID,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -100,9 +100,9 @@ final class PonderQuestionTransaction
|
|||
return pht(
|
||||
'%s closed this question as obsolete.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
case PonderQuestionStatus::STATUS_CLOSED_DUPLICATE:
|
||||
case PonderQuestionStatus::STATUS_CLOSED_INVALID:
|
||||
return pht(
|
||||
'%s closed this question as a duplicate.',
|
||||
'%s closed this question as invalid.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
}
|
||||
}
|
||||
|
@ -272,9 +272,9 @@ final class PonderQuestionTransaction
|
|||
'%s closed %s as resolved.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
case PonderQuestionStatus::STATUS_CLOSED_DUPLICATE:
|
||||
case PonderQuestionStatus::STATUS_CLOSED_INVALID:
|
||||
return pht(
|
||||
'%s closed %s as duplicate.',
|
||||
'%s closed %s as invalid.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
$this->renderHandleLink($object_phid));
|
||||
case PonderQuestionStatus::STATUS_CLOSED_OBSOLETE:
|
||||
|
|
Loading…
Reference in a new issue