--- eventum-new/ajax/order.php 2008-10-15 02:02:25.000000000 +0300 +++ eventum-new/ajax/order.php 2008-10-15 02:02:25.000000000 +0300 @@ -0,0 +1,72 @@ + $nID) { + if ($nID != $before_filterd[$key]) { + if ($nID) { + $stmt = "UPDATE + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + SET + isu_order = " . $order[$before_filterd[$key]] . " + WHERE + isu_iss_id = $nID AND + isu_usr_id = $usr_id"; + $res = $GLOBALS["db_api"]->dbh->query($stmt); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + die('update failed'); + } + } + } +} --- eventum/ajax/update.php 2008-10-15 01:46:20.000000000 +0300 +++ eventum-new/ajax/update.php 2008-10-15 02:02:25.000000000 +0300 @@ -0,0 +1,30 @@ + array( "title" => ev_gettext("Expected Resolution Date") - ) + ), + "isu_order" => array( + "title" => ev_gettext("Order") + ), ) ); return $columns[$page]; --- eventum/include/class.issue.php 2008-10-15 01:46:20.000000000 +0300 +++ eventum-new/include/class.issue.php 2008-10-15 02:02:25.000000000 +0300 @@ -1356,6 +1356,7 @@ Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); return -1; } else { + Issue::moveOrderForAllUsers($issue_id, 1000); $prj_id = Issue::getProjectID($issue_id); // record the change @@ -1659,6 +1660,176 @@ } } + /** + * Method used to update the a single detail field of a specific issue. + * + * @param integer $issue_id + * @param string $field_name + * @param string $field_value + * @param string $field_type string or integer (for escape) + * @return integer 1 on success, -1 otherwise + */ + function updateField($issue_id, $field_name, $filed_value) { + + $issue_id = Misc::escapeInteger($issue_id); + + $usr_id = Auth::getUserID(); + $prj_id = Issue::getProjectID($issue_id); + + // get all of the 'current' information of this issue + $current = Issue::getDetails($issue_id); + + $stmt = "UPDATE + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue + SET + iss_updated_date='" . Date_API::getCurrentDateGMT() . "', + iss_last_public_action_date='" . Date_API::getCurrentDateGMT() . "', + iss_last_public_action_type='updated'"; + + switch ($field_name) { + case 'category': + $stmt .= ", iss_prc_id = " . Misc::escapeInteger($filed_value); + break; + case 'release': + $stmt .= ", iss_pre_id = " . Misc::escapeInteger($filed_value); + break; + case 'expected_resolution_date': + $stmt .= ", iss_expected_resolution_date = '" . Misc::escapeString($filed_value) . "'"; + break; + case 'release': + $stmt .= ", iss_pre_id = " . Misc::escapeInteger($filed_value); + break; + case 'priority': + $stmt .= ", iss_pri_id = " . Misc::escapeInteger($filed_value); + break; + case 'status': + $stmt .= ", iss_sta_id = " . Misc::escapeInteger($filed_value); + break; + case 'resolution': + $stmt .= ", iss_res_id = " . Misc::escapeInteger($filed_value); + break; + case 'summary': + $stmt .= ", iss_summary = '" . Misc::escapeString($filed_value) . "'"; + break; + case 'description': + $stmt .= ", iss_description = '" . Misc::escapeString($filed_value) . "'"; + break; + case 'estimated_dev_time': + $stmt .= ", iss_dev_time = '" . Misc::escapeString($filed_value) . "'"; + break; + case 'percent_complete': + $stmt .= ", iss_percent_complete = '" . Misc::escapeString($filed_value) . "'"; + break; + case 'trigger_reminders': + $stmt .= ", iss_trigger_reminders = " . Misc::escapeInteger($filed_value); + break; + case 'group': + $stmt .= ", iss_grp_id = " . Misc::escapeInteger($filed_value); + break; + case 'private': + $stmt .= ", iss_private = " . Misc::escapeInteger($filed_value); + break; + default: + Error_Handler::logError("Unknown field name $field_name", __FILE__, __LINE__); + return -1; + break; + } + + $stmt .= " + WHERE + iss_id=$issue_id"; + + $res = $GLOBALS["db_api"]->dbh->query($stmt); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } else { + $new = array( + 'category' => $current['iss_prc_id'], + 'release' => $current['iss_pre_id'], + 'expected_resolution_date' => $current['iss_expected_resolution_date'], + 'release' => $current['iss_pre_id'], + 'priority' => $current['iss_pri_id'], + 'status' => $current['iss_sta_id'], + 'resolution' => $current['iss_res_id'], + 'summary' => $current['iss_summary'], + 'description' => $current['iss_description'], + 'estimated_dev_time' => $current['iss_dev_time'], + 'percent_complete' => $current['iss_percent_complete'], + 'trigger_reminders' => $current['iss_trigger_reminders'], + 'group' => $current['iss_grp_id'], + 'iss_private' => $current['private'] + ); + $new[$field_name] = $filed_value; + + // add change to the history (only for changes on specific fields?) + $updated_fields = array(); + if ($field_name == 'expected_resolution_date' && $current["iss_expected_resolution_date"] != $filed_value) { + $updated_fields["Expected Resolution Date"] = History::formatChanges($current["iss_expected_resolution_date"], $filed_value); + } + if ($field_name == 'category' && $current["iss_prc_id"] != $filed_value) { + $updated_fields["Category"] = History::formatChanges(Category::getTitle($current["iss_prc_id"]), Category::getTitle($filed_value)); + } + if ($field_name == 'release' && $current["iss_pre_id"] != $filed_value) { + $updated_fields["Release"] = History::formatChanges(Release::getTitle($current["iss_pre_id"]), Release::getTitle($filed_value)); + } + if ($field_name == 'priority' && $current["iss_pri_id"] != $filed_value) { + $updated_fields["Priority"] = History::formatChanges(Priority::getTitle($current["iss_pri_id"]), Priority::getTitle($filed_value)); + Workflow::handlePriorityChange($prj_id, $issue_id, $usr_id, $current, $new); + } + if ($field_name == 'status' && $current["iss_sta_id"] != $filed_value) { + // clear out the last-triggered-reminder flag when changing the status of an issue + Reminder_Action::clearLastTriggered($issue_id); + + // if old status was closed and new status is not, clear closed data from issue. + $old_status_details = Status::getDetails($current['iss_sta_id']); + if ($old_status_details['sta_is_closed'] == 1) { + $new_status_details = Status::getDetails($filed_value); + if ($new_status_details['sta_is_closed'] != 1) { + Issue::clearClosed($issue_id); + } + } + $updated_fields["Status"] = History::formatChanges(Status::getStatusTitle($current["iss_sta_id"]), Status::getStatusTitle($filed_value)); + } + if ($field_name == 'resolution' && $current["iss_res_id"] != $filed_value) { + $updated_fields["Resolution"] = History::formatChanges(Resolution::getTitle($current["iss_res_id"]), Resolution::getTitle($filed_value)); + } + if ($field_name == 'estimated_dev_time' && $current["iss_dev_time"] != $filed_value) { + $updated_fields["Estimated Dev. Time"] = History::formatChanges(Misc::getFormattedTime(($current["iss_dev_time"]*60)), Misc::getFormattedTime(($filed_value*60))); + } + if ($field_name == 'summary' && $current["iss_summary"] != $filed_value) { + $updated_fields["Summary"] = ''; + } + if ($field_name == 'description' && $current["iss_description"] != $filed_value) { + $updated_fields["Description"] = ''; + } + if ($field_name == 'private' && ($filed_value != $current['iss_private'])) { + $updated_fields["Private"] = History::formatChanges(Misc::getBooleanDisplayValue($current['iss_private']), Misc::getBooleanDisplayValue($filed_value)); + } + if (count($updated_fields) > 0) { + // log the changes + $changes = ''; + $i = 0; + foreach ($updated_fields as $key => $value) { + if ($i > 0) { + $changes .= "; "; + } + if (($key != "Summary") && ($key != "Description")) { + $changes .= "$key: $value"; + } else { + $changes .= "$key"; + } + $i++; + } + + History::add($issue_id, $usr_id, History::getTypeID('issue_updated'), "Issue updated ($changes) by " . User::getFullName($usr_id)); + // send notifications for the issue being updated + Notification::notifyIssueUpdated($issue_id, $current, $new); + } + } + return 1; + } + /** * Move the issue to a new project @@ -1820,16 +1991,33 @@ { $issue_id = Misc::escapeInteger($issue_id); $assignee_usr_id = Misc::escapeInteger($assignee_usr_id); + $order = 1; + // move all orders down to free "order space" for this new association + $stmt = "UPDATE + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + SET + isu_order = isu_order + 1 + WHERE + isu_usr_id = $assignee_usr_id AND + isu_order >= $order"; + $res = $GLOBALS["db_api"]->dbh->query($stmt); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } + // insert the new association $stmt = "INSERT INTO " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user ( isu_iss_id, isu_usr_id, - isu_assigned_date + isu_assigned_date, + isu_order ) VALUES ( $issue_id, $assignee_usr_id, - '" . Date_API::getCurrentDateGMT() . "' + '" . Date_API::getCurrentDateGMT() . "', + $order )"; $res = $GLOBALS["db_api"]->dbh->query($stmt); if (PEAR::isError($res)) { @@ -1844,6 +2032,78 @@ } } + /** + * Method used to get the order list to be rearranged + * + * @access private + * @param string $issue_id The issue ID or a comma seperated list of IDs already prepared for giving to mysql + * @param string $usr_id The user to remove. When not specified, all users are taken as to be removed for that issue + * @return mixed delete order list to be rearranged. Used as a parameter to the method of rearranging the order. + */ + function getDeleteUserAssociationOrderList($issue_id, $usr_id = "") + { + // find all affected associantion orders + $stmt = "SELECT isu_usr_id, isu_order FROM + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + WHERE + isu_iss_id IN ($issue_id)"; + if ($usr_id !== FALSE) { + $stmt.= " AND isu_usr_id IN ($usr_id)"; + } + $stmt.= "ORDER BY isu_order"; + $res = $GLOBALS["db_api"]->dbh->getAll($stmt, DB_FETCHMODE_ASSOC); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } else { + $deleted_orders = array(); + foreach ($res as $row) { + if (empty($deleted_orders[$row['isu_usr_id']])) { + $deleted_orders[$row['isu_usr_id']] = array(); + } + $deleted_orders[$row['isu_usr_id']] [] = $row['isu_order']; + } + return $deleted_orders; + } + } + + /** + * + * Method used to rearrange order list in the db according to known deleted records + * + * @access private + * @param mixed deleteorder list + * @return void + */ + function rearrangeDeleteUserAssociationOrderList($delete_order_list) + { + if (empty($delete_order_list) || (!is_array($delete_order_list))) { + return -1; + } + foreach ($delete_order_list as $isu_usr_id => $orders) { + for ($i = 0; $i < count($orders); $i++) { // traverse all deleted orders + // move the orders after them up to take the "order space" of the deleted records + $stmt = "UPDATE + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + SET + isu_order = isu_order - " . ($i+1) . " + WHERE + isu_usr_id = $isu_usr_id AND + isu_order > " . $orders[$i]; + if ($i < count($orders) - 1) { + $stmt.= " AND + isu_order < " . $orders[$i+1]; + } + $res = $GLOBALS["db_api"]->dbh->query($stmt); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } + } + } + return 1; + } + /** * Method used to delete all user assignments for a specific issue. @@ -1859,6 +2119,7 @@ if (is_array($issue_id)) { $issue_id = implode(", ", $issue_id); } + $deleted_order_list = Issue::getDeleteUserAssociationOrderList($issue_id); $stmt = "DELETE FROM " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user WHERE @@ -1871,6 +2132,7 @@ if ($usr_id) { History::add($issue_id, $usr_id, History::getTypeID('user_all_unassociated'), 'Issue assignments removed by ' . User::getFullName($usr_id)); } + Issue::rearrangeDeleteUserAsssociationOrderList($deleted_order_list); return 1; } } @@ -1889,6 +2151,7 @@ { $issue_id = Misc::escapeInteger($issue_id); $usr_id = Misc::escapeInteger($usr_id); + $delete_order_list = Issue::getDeleteUserAssociationOrderList($issue_id, $usr_id); $stmt = "DELETE FROM " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user WHERE @@ -1903,6 +2166,7 @@ History::add($issue_id, Auth::getUserID(), History::getTypeID('user_unassociated'), User::getFullName($usr_id) . ' removed from issue by ' . User::getFullName(Auth::getUserID())); } + Issue::rearrangeDeleteUserAssociationOrderList($delete_order_list); return 1; } } @@ -2379,6 +2643,11 @@ { $sort_by = Issue::getParam('sort_by'); $sort_order = Issue::getParam('sort_order'); + $users = Issue::getParam('users'); + if (empty($users) && ($sort_by == 'isu_order')) { // Sorting by isu_order is impossible when no user specified + unset($sort_by); + unset($sort_order); + } $rows = Issue::getParam('rows'); $hide_closed = Issue::getParam('hide_closed'); if ($hide_closed === '') { @@ -2483,6 +2752,7 @@ "last_action_date" => "desc", "usr_full_name" => "asc", "iss_expected_resolution_date" => "desc", + "isu_order" => "desc", ); foreach ($custom_fields as $fld_id => $fld_name) { @@ -3275,6 +3545,8 @@ $ids = implode(", ", $ids); $stmt = "SELECT isu_iss_id, + isu_order, + isu_usr_id, usr_full_name FROM " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user, @@ -3286,6 +3558,7 @@ if (PEAR::isError($res)) { Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); } else { + // gather names of the users assigned to each issue $t = array(); for ($i = 0; $i < count($res); $i++) { if (!empty($t[$res[$i]['isu_iss_id']])) { @@ -3294,9 +3567,18 @@ $t[$res[$i]['isu_iss_id']] = $res[$i]['usr_full_name']; } } + // gather orders + $o = array(); + for ($i = 0; $i < count($res); $i++) { + if (empty($o[$res[$i]['isu_iss_id']])) { + $o[$res[$i]['isu_iss_id']] = array(); + } + $o[$res[$i]['isu_iss_id']][$res[$i]['isu_usr_id']] = $res[$i]['isu_order']; + } // now populate the $result variable again for ($i = 0; $i < count($result); $i++) { @$result[$i]['assigned_users'] = $t[$result[$i]['iss_id']]; + @$result[$i]['assigned_users_order'] = $o[$result[$i]['iss_id']]; } } } @@ -4264,6 +4546,7 @@ Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); return -1; } + Issue::moveOrderForAllUsers($issue_id, 1); } @@ -4322,8 +4605,127 @@ } return $returns[$msg_id]; } + + /** + * Reorders user's issues as requested by user + * @access public + * @param $usr_id User to be reordered + * @param $issue_id Issue or array of issues to be moved + * @param $neworder The new order of the issues + * @return void + */ + function reorderUserIssues($usr_id, $issue_id, $neworder) + { + if (!isset($usr_id) || !isset($issue_id) || !isset($neworder)) { + return false; + } + if (!is_numeric($usr_id) || !is_numeric($neworder)) { + return false; + } + $usr_id = Misc::escapeInteger($usr_id); + $issue_id = Misc::escapeInteger($issue_id); + $neworder = Misc::escapeInteger($neworder); + if (is_array($issue_id)) { + $issue_count = count($issue_id); + $issue_id_str = implode(", ", $issue_id); + } else { + $issue_count = 1; + $issue_id_str = $issue_id; + $issue_id = array($issue_id); + } + // do a nasty pretending to be deleting stuff so that reordering happens as if these elements were deleted + $orderlist = Issue::getDeleteUserAssociationOrderList($issue_id_str, $usr_id); + Issue::rearrangeDeleteUserAssociationOrderList($orderlist); + // move down the orders to free the "order space" needed + $stmt = "UPDATE + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + SET + isu_order = isu_order + $issue_count + WHERE + isu_usr_id = $usr_id AND + isu_order >= $neworder"; + $res = $GLOBALS["db_api"]->dbh->query($stmt); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } + //update the order for the issues being moved + $i = 0; + foreach ($issue_id as $iss_id) { + $stmt = "UPDATE + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + SET + isu_order = " . ($neworder + $i) . " + WHERE + isu_usr_id = $usr_id AND + isu_iss_id = $iss_id"; + $res = $GLOBALS["db_api"]->dbh->query($stmt); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } + $i++; + } + } + + + /** + * Get users issue order list + * @access public + * @param $user_id User + * @param $order_list Order of the issues + * @return void + */ + function getIssueOrderByUser($usr_id) { + + if (!is_numeric($usr_id)) { + return false; + } + + $stmt = "SELECT + isu_iss_id, isu_order + FROM + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + WHERE + isu_usr_id = " . $usr_id ; + + $order_list = array(); + + $res = $GLOBALS["db_api"]->dbh->getAll($stmt, DB_FETCHMODE_ASSOC); + + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return array(); + } else { + foreach ($res as $row) { + $order_list[$row["isu_iss_id"]] = $row["isu_order"]; + } + } + return $order_list; + } + + function moveOrderForAllUsers($issue_id, $neworder) + { + // Move the issue to the top priority for the ppl it's assigned to + $stmt = "SELECT isu_usr_id FROM + " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_user + WHERE + isu_iss_id = " . Misc::escapeInteger($issue_id); + $res = $GLOBALS["db_api"]->dbh->getAll($stmt, DB_FETCHMODE_ASSOC); + if (PEAR::isError($res)) { + Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__); + return -1; + } + foreach ($res as $row) { + Issue::reorderUserIssues($row["isu_usr_id"], $issue_id, $neworder); + } + } + } + + + // benchmarking the included file (aka setup time) if (APP_BENCHMARK) { $GLOBALS['bench']->setMarker('Included Issue Class'); --- eventum-r3749/js/global.js~ 2008-10-15 02:03:48.000000000 +0300 +++ eventum-r3749/js/global.js 2008-10-15 02:06:00.000000000 +0300 @@ -799,4 +799,39 @@ }); }); }); + +$(document).ready(function() { + // dialog type calender isn't working in Konqueror beacuse it's not a supported browser for either jQuery or jQuery UI + // http://groups.google.com/group/jquery-ui/browse_thread/thread/ea61238c34cb5f33/046837b02fb90b5c + if (navigator.appName != 'Konqueror') { + $(".inline_date_pick").click(function() { + var masterObj = this; + var masterObjPos = $(masterObj).offset(); + // offset gives uses top and left but datepicker needs pageX and pageY + var masterObjPos = {pageX: masterObjPos.left, pageY: masterObjPos.top}; + $(this).datepicker( + // we use dialog type calender so we won't haveto have a hidden element on the page + 'dialog', + // selected date + masterObj.innerHTML, + // onclick handler + function (date, dteObj) { + fieldName = masterObj.id.substr(0,masterObj.id.indexOf('|')); + issueID = masterObj.id.substr(masterObj.id.indexOf('|')+1); + $.post("/ajax/update.php", {fieldName: fieldName, issueID: issueID, day: dteObj.selectedDay, month: (dteObj.selectedMonth+1), year: dteObj.selectedYear}, function(data) { + if (data.length > 0) { + masterObj.innerHTML = data; + } + }, "text"); + }, + // config + {dateFormat: 'dd M yy', duration: ""}, + // position of the datepicker calender - taken from div's offset + masterObjPos + ); + return false; + }); + } +}); + //--> --- eventum/list.php 2008-10-15 01:46:20.000000000 +0300 +++ eventum-new/list.php 2008-10-15 02:02:25.000000000 +0300 @@ -67,6 +67,11 @@ $profile['sort_by'] . "&sort_order=" . $profile['sort_order']); } +@$reorder_usr_id = $_REQUEST["reorder_user"]; +@$reorder_issue_id = $_REQUEST["reorder_source"]; +@$reorder_neworder = $_REQUEST["reorder_neworder"]; +Issue::reorderUserIssues($reorder_usr_id, $reorder_issue_id, $reorder_neworder); + $options = Issue::saveSearchParams(); $tpl->assign("options", $options); $tpl->assign("sorting", Issue::getSortingInfo($options)); @@ -90,6 +95,21 @@ } $assign_options += $users; +// get the isu_order (assignated users) ordering user +if (!empty($options["users"])) { + if ($options["users"] == -2) { + $isu_order_user = $usr_id; + } else + if ($options["users"] > 0) { + $isu_order_user = $options["users"]; + } else { + unset($isu_order_user); + } +} else { + unset($isu_order_user); +} +$tpl->assign("isu_order_user", $isu_order_user); + $list = Issue::getListing($prj_id, $options, $pagerRow, $rows); $tpl->assign("list", $list["list"]); $tpl->assign("list_info", $list["info"]); --- eventum/templates/list.tpl.html 2008-10-15 01:46:20.000000000 +0300 +++ eventum-new/templates/list.tpl.html 2008-10-15 02:02:25.000000000 +0300 @@ -89,6 +89,28 @@ f.target = '_popup'; f.submit(); } +function reorderBulk(order_user, neworder) +{ + url = page_url + "?"; + url += "reorder_user=" + order_user; + + items = document.getElementsByName("item[]"); + checkedcount = 0; + for (var i = 0; i < items.length; i++) { + if (items[i].checked) { + url += "&reorder_source[" + checkedcount + "]=" + items[i].value; + checkedcount++; + } + } + if (checkedcount == 0) { + alert('{/literal}{t escape=js}Please choose which issues to move to the new place.{/t}{literal}'); + return false; + } + + url += "&reorder_neworder=" + neworder; + + window.location.href = url; +} function hideClosed(f) { if (f.hide_closed.checked) { @@ -150,6 +172,13 @@ f.go.disabled = true; } } +function updateCustomFields(issue_id) +{ + var features = 'width=560,height=460,top=30,left=30,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,status=no'; + var customWin = window.open('custom_fields.php?issue_id=' + issue_id, '_custom_fields', features); + customWin.focus(); + return false; +} //--> {/literal} @@ -166,11 +195,11 @@ - - +
+ - + {if $current_role > $roles.developer} {/foreach} - {else} + {elseif $field_name != 'isu_order' || $isu_order_user} + {section name="i" loop=$list} - = $roles.developer AND $list[i].iqu_status > 0}style="text-decoration: line-through;"{/if}> + = $roles.developer AND $list[i].iqu_status > 0}style="text-decoration: line-through;"{/if} id="{$list[i].iss_id}" {if !$list[i].assigned_users_order[$current_user_id]}class="nodrag"{/if}> {if $current_role > $roles.developer} {/if} {foreach from=$columns item=column key=field_name} {if $field_name == 'custom_fields'} {foreach from=$list[i].custom_field key=fld_id item=fld_value} - {/foreach} - {else} + {elseif $field_name != 'isu_order' || $isu_order_user} {/if} @@ -297,10 +334,11 @@ {/section} - + +
- +
{t}Search Results{/t} ({$list_info.total_rows} {t}issues found{/t}{if $list_info.end_offset > 0}, {math equation="x + 1" x=$list_info.start_offset} - {$list_info.end_offset} {t}shown{/t}{/if}) {include file="help_link.tpl.html" topic="list"} @@ -190,7 +219,7 @@
@@ -205,7 +234,7 @@ {if $sorting.images[$fld_name_id] != ""}{/if} {if $field_name == 'iss_summary'} @@ -221,6 +250,9 @@
{elseif $sorting.links[$field_name] != ''} {$column.title} + {if $field_name == 'isu_order'} +
{$users[$isu_order_user]} + {/if} {if $sorting.images[$field_name] != ""}{/if} {else} {$column.title} @@ -229,19 +261,20 @@ {/if} {/foreach}
- {$fld_value|formatCustomValue:$fld_id:$list[i].iss_id} + + {$fld_value|formatCustomValue:$fld_id:$list[i].iss_id} {if $field_name == 'iss_id'} {$list[i].iss_id} @@ -276,7 +309,7 @@ {elseif $field_name == 'iss_percent_complete'} {$list[i].iss_percent_complete|escape:"html"}% {elseif $field_name == 'iss_expected_resolution_date'} - {$list[i].iss_expected_resolution_date|escape:"html"} +
{$list[i].iss_expected_resolution_date|escape:"html"} 
{elseif $field_name == 'iss_summary'} {$list[i].iss_summary|escape:"html"} {if $list[i].redeemed} @@ -285,6 +318,10 @@ {if $list[i].iss_private == 1} [Private] {/if} + {elseif $field_name == 'isu_order'} + {if $list[i].assigned_users_order[$current_user_id]} + move + {/if} {/if}
- +
{if $current_role > $roles.developer} @@ -352,6 +390,29 @@

- + {include file="app_info.tpl.html"} -{include file="footer.tpl.html"} +{include file="footer.tpl.html"} \ No newline at end of file --- /dev/null 2006-03-28 14:00:37.000000000 +0300 +++ ./order_patch-patch.sql 2008-08-27 17:16:21.444016830 +0300 @@ -0,0 +1,5 @@ +ALTER TABLE eventum_issue_user + ADD isu_order int(11) NOT NULL DEFAULT '0' AFTER isu_assigned_date, + ADD INDEX isu_order (isu_order); +// set at least some order for now +update eventum_issue_user set isu_order=isu_iss_id;