/** * Print the target version in the user row of the plugin table * * @param $data_row * @param $print */ function print_target_version($data_row, $print) { $user_id = $data_row['user_id']; $assigned_project_id = $data_row['assigned_project_id']; $target_version_id = $data_row['target_version_id']; $target_version = ''; $target_version_date = ''; if (strlen($target_version_id) > 0) { $target_version = version_get_field($target_version_id, 'version'); $target_version_date = date('Y-m-d', version_get_field($target_version_id, 'date_order')); } $access_level = user_get_access_level(auth_get_current_user_id(), helper_get_current_project()); userprojectapi::get_cell_highlighting($data_row, 1, 'breakwordwrap'); echo $target_version_date . ' '; if (access_has_global_level($access_level) && !$print) { echo '<a href="search.php?' . userprojectapi::generate_status_link() . '&project_id=' . $assigned_project_id . '&handler_id=' . userprojectapi::get_link_user_id($user_id) . '&sticky_issues=on' . '&target_version=' . $target_version . '&sortby=last_updated' . '&dir=DESC' . '&hide_status_id=-2' . '&match_type=0">'; echo $target_version; echo '</a>'; } else { echo $target_version; } echo '</td>' . PHP_EOL; }