/** * Muestra la imagen correspondiente al estado actual del proyecto. * * @param int $projectId * @param string $serviceTypeName * @param string $textLabel */ function showImageHeader($projectId, $serviceTypeName, $textLabel, $totalIssueForRead) { $unread = ''; $value = ''; if ($totalIssueForRead > 0) { $unread = '_unread'; $value = ' (' . $totalIssueForRead . ')'; } $active = ''; if (getProjectId() == $projectId) { $active = '_active'; } echo '<div class="service_icon" id="' . $serviceTypeName . '_service' . $unread . '_icon' . $active . '"> <span class="title_client_zone_menu">'; getValue($textLabel); echo $value; echo '</span></div>'; }
} return null; } error_log("Processing subject: " . $_POST['Subject']); $action = new Action(); foreach ($TRACKS_CONFIG as $tracks) { if (useTracks($tracks)) { if (!$action->valid) { bounce($tracks, $action, $action->err); continue; } $context_id = getContextId($tracks, $action); if ($context_id === false) { continue; } $project_id = getProjectId($tracks, $action); if ($project_id === false) { continue; } $rawxml = '<todo><description>' . xmlentities($action->description) . '</description><context_id>' . $context_id . '</context_id>'; if (!is_null($project_id)) { $rawxml .= '<project_id>' . $project_id . '</project_id>'; } if (!is_null($action->note)) { $rawxml .= '<notes>' . xmlentities($action->note) . '</notes>'; } $rawxml .= '</todo>'; if (postData($tracks, 'todos.xml', $rawxml) !== false) { error_log('Written new todo!'); } }
function reportAttachments($type, $data, $history_id) { $connection = connectToDb(); $project_id = getProjectId($connection, $history_id); $output = ""; $headers = array("Attachment Name", "Story Name", "Story ID", "Created At", "Attachment ID"); if ($type == "html") { $output .= '<thead><tr>'; foreach ($headers as $header) { $output .= '<th>' . $header . '</th>'; } $output .= '</tr></thead>'; $output .= '<tbody>'; foreach ($data as $value) { $id_link = "https://www.pivotaltracker.com/n/projects/" . $project_id . "/stories/" . $value["story_id"]; $items_array = array(); $items_array[] = '<a href="' . $value["link"] . '" download="' . htmlspecialchars($value["title"]) . '">' . htmlspecialchars($value["title"]) . '</a>'; $items_array[] = '<a href="' . $id_link . '"> ' . $value["story_name"] . '</a>'; $items_array[] = '<a href="' . $id_link . '"> ' . $value["story_id"] . '</a>'; $items_array[] = $value["created_at"]; $items_array[] = $value["attachment_id"]; $items_string = "<td>" . implode("</td><td>", $items_array) . "</td>"; $output .= "<tr>" . $items_string . "</tr>" . "\n"; } $output .= '</tbody>'; return $output; } elseif ($type == "csv") { foreach ($headers as $header) { $output .= '"'; $output .= $header; if ($header === end($headers)) { $output .= '"'; } else { $output .= '",'; } } $headers[] = "Link"; $output .= "\n"; foreach ($data as $value) { $items_array = array(); $items_array[] = $value["title"]; $items_array[] = $value["attachment_id"]; $items_array[] = $value["link"]; $items_string = implode("\",\"", $items_array); $output .= "\"" . $items_string . "\"\n"; } return $output; } else { return "Incorrect type, please use html or csv"; } }
/** * Se listan todas las categorías pertenecientes al proyecto seleccionado. * * @deprecated * @return array */ public function getCategoriesByProject() { $result = ''; try { $result = $this->proxySoap->mc_project_get_categories($this->currentUser, $this->currentPassword, getProjectId()); } catch (Exception $e) { } return $result; }