Blackout policy A active Saturday 23:50-00:50. No change to existing events, events are blacked out during this time, events remain blacked out at end of timeframe. Blackout policy B active Sunday 03:00-04:00. No change to existing events, events are blacked out during this time, events are reopened at end of timeframe. An event matches the selector for both policies, arrives on Saturday during blackout policy A and is blacked out as expected. It remains blacked out after timeframe for policy A has ended. As the event matched the selector for policy B, then once timeframe for policy B has ended, the event reopens. This is not the expected behaviour as policy B should not reopen the event. |
Modify the action im_blackout_actions.reopen in pw\server\etc\<cell>\kb\bin\im_blackout_actions.mrl to use opqry. It will need to be modified to look as follows: action im_blackout_actions.reopen: IM_BLACKOUT_POLICY ($POL) using ALL { IM_BLACKOUT_EVENT_TABLE ($BET) where [$BET.policy_udid == $POL.mc_udid] EVENT ($EV) where [$EV.mc_ueid == $BET.event_ueid AND $EV.status == BLACKOUT] } { if (opqry($EV, $POL.name, "BLACKED_OUT", $OLD_CNT, $OP_NR)) then { $EV.status = OPEN; opadd($EV, $POL.name, "REOPENED", ""); } } IM_CI_BLACKOUT_POLICY ($POL) using ALL { IM_BLACKOUT_EVENT_TABLE ($BET) where [$BET.policy_udid == $POL.mc_udid] EVENT ($EV) where [$EV.mc_ueid == $BET.event_ueid AND $EV.status == BLACKOUT] } { if (opqry($EV, $POL.name, "BLACKED_OUT", $OLD_CNT, $OP_NR)) then { $EV.status = OPEN; opadd($EV, $POL.name, "REOPENED", ""); } } END Recompile the cell with 'mccomp -n <cell>' and restart the cell. |