/**
 * 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() . '&amp;project_id=' . $assigned_project_id . '&amp;handler_id=' . userprojectapi::get_link_user_id($user_id) . '&amp;sticky_issues=on' . '&amp;target_version=' . $target_version . '&amp;sortby=last_updated' . '&amp;dir=DESC' . '&amp;hide_status_id=-2' . '&amp;match_type=0">';
        echo $target_version;
        echo '</a>';
    } else {
        echo $target_version;
    }
    echo '</td>' . PHP_EOL;
}