Skip to content

Commit 58ea066

Browse files
AdrienClairembaultbtry
authored andcommitted
fix(issue): Show pending / accepted forms search results
1 parent 6487611 commit 58ea066

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

hook.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ function plugin_formcreator_addWhere($link, $nott, $itemtype, $ID, $val, $search
243243
$tocheck = $item->getNewStatusArray();
244244
break;
245245

246+
case Ticket::WAITING:
247+
$tocheck = $item->getPendingStatusArray();
248+
break;
249+
250+
case Ticket::CLOSED:
251+
$tocheck = $item->getClosedStatusArray();
252+
break;
253+
246254
case 'process' :
247255
// getProcessStatusArray should be an abstract method of CommonITILObject
248256
$tocheck = $item->getProcessStatusArray();

inc/issue.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,15 +864,19 @@ public static function giveItem($itemtype, $option_id, $data, $num) {
864864
}
865865

866866
static function getClosedStatusArray() {
867-
return Ticket::getClosedStatusArray();
867+
return [...Ticket::getClosedStatusArray(), PluginFormcreatorFormAnswer::STATUS_ACCEPTED];
868868
}
869869

870870
static function getSolvedStatusArray() {
871871
return [...Ticket::getSolvedStatusArray(), PluginFormcreatorFormAnswer::STATUS_REFUSED];
872872
}
873873

874874
static function getNewStatusArray() {
875-
return [Ticket::INCOMING, PluginFormcreatorFormAnswer::STATUS_WAITING, PluginFormcreatorFormAnswer::STATUS_ACCEPTED];
875+
return [Ticket::INCOMING];
876+
}
877+
878+
static function getPendingStatusArray() {
879+
return [Ticket::WAITING, PluginFormcreatorFormAnswer::STATUS_WAITING];
876880
}
877881

878882
static function getProcessStatusArray() {

0 commit comments

Comments
 (0)