/** * Un-marks an issue as redeemed incident * * @access public * @param resource $rpc_conn The connection resource * @param array $auth Array of authentication information (email, password) * @param integer $issue_id The issue ID */ function unredeemIssue($rpc_conn, $auth, $issue_id) { Command_Line::checkIssuePermissions(&$rpc_conn, $auth, $issue_id); Command_Line::checkIssueAssignment(&$rpc_conn, $auth, $issue_id); $types = Command_Line::promptIncidentTypes(&$rpc_conn, $auth, $issue_id, true); foreach ($types as $type_id => $type_value) { $types[$type_id] = new XML_RPC_Value($type_value, 'string'); } $params = array(new XML_RPC_Value($auth[0], 'string'), new XML_RPC_Value($auth[1], 'string'), new XML_RPC_Value($issue_id, 'int'), new XML_RPC_Value($types, 'struct')); $msg = new XML_RPC_Message("unredeemIssue", $params); $result = $rpc_conn->send($msg); if ($result->faultCode()) { Command_Line::quit($result->faultString()); } echo "OK - Issue #{$issue_id} successfully marked as unredeemed incident.\n"; }