Skip to content

Commit

Permalink
Don't display from if only team_id or agent_id must_change / mist_pro…
Browse files Browse the repository at this point in the history
…mpt...
  • Loading branch information
xtophe38 committed Apr 29, 2021
1 parent 9ad6d66 commit c5a54cb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions assign-to-me.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@
$aExpectedAttributes = $oTicket->GetTransitionAttributes($sStimulus /*, current state*/);
$bAttributesToBeSetForTransition = false;
foreach($aExpectedAttributes as $sAttCode => $iFlag) {
if (($iFlag & (OPT_ATT_MUSTCHANGE | OPT_ATT_MUSTPROMPT)) || (($iFlag & OPT_ATT_MANDATORY) && ($oTicket->Get($sAttCode) == ''))) {
$bAttributesToBeSetForTransition = true;
break;
if (($sAttCode != 'team_id') && ($sAttCode != 'agent_id'))
{
// Attributes team_id and agent_id should not be part of that check
if (($iFlag & (OPT_ATT_MUSTCHANGE | OPT_ATT_MUSTPROMPT)) || (($iFlag & OPT_ATT_MANDATORY) && ($oTicket->Get($sAttCode) == '')))
{
$bAttributesToBeSetForTransition = true;
break;
}
}
}
if (!$bAttributesToBeSetForTransition) {
Expand Down

0 comments on commit c5a54cb

Please sign in to comment.