$format .= _(' using ')."'".htmlentities($sep)."'"._(' as separator.');
?>
<p><?php echo _('This page allows you to export the items using a CSV (<a href="http://en.wikipedia.org/wiki/Comma-separated_values">Comma Separated Values</a>) File. This format can be used to view your entries using your favorite spreadsheet software.'); ?></p>
-<h2><?php echo _('Export as a CSV file'); ?></h2>
-
-<strong><?php echo _('Selected CSV Format')._(': '); ?></strong>CSV<?php echo $format.' '.util_make_link($url.'&func=format_csv', $HTML->getConfigurePic(_('Modify this CSV format.'))); ?>
<?php
+echo $HTML->information(_('By default, export uses filter as setup in the browse page. To overwrite, please use Advanced Options'));
+echo html_e('h2', array(), _('Export as a CSV file'));
+echo html_e('strong', array(), _('Selected CSV Format')._(': ')).'CSV'.$format.' '.util_make_link($url.'&func=format_csv', $HTML->getConfigurePic(_('Modify this CSV format.')));
echo $HTML->openForm(array('action' => $url.'&func=downloadcsv', 'method' => 'post'));
echo html_ao('fieldset', array('id' => 'fieldset1_closed', 'class' => 'coolfieldset'));
echo html_e('legend', array(), _('Advanced Options'));
echo html_ao('div');
+echo html_e('p', array(), _('Overwrite default filter. (No filtering)')._(': ').html_e('input', array('type' => 'checkbox', 'name' => 'overwrite_filter', 'value' => 'overwrite')));
$attrsInputLimitByStartDate = array('type' => 'checkbox', 'id' => 'limitByLastModifiedDate', 'name' => 'limitByLastModifiedDate', 'value' => 1, 'title' => _('Set last modified date limitation for this export. If not enable, not limitation.'));
$attrsDatePickerLimitByStartDate = array('id' => 'datepicker_start', 'name' => '_changed_from', 'size' => 10, 'maxlength' => 10, 'disabled' => 'disabled');
echo html_e('p', array(), _('Set dates')._(': ').html_e('br').
_('From')._(': ').html_e('input', $attrsInputLimitByStartDate).html_e('input', $attrsDatePickerLimitByStartDate));
echo html_ac(html_ap() - 2);
-echo html_e('input', array('type' => 'submit', 'value' => _('Download CSV file')));
+echo html_e('p', array(), html_e('input', array('type' => 'submit', 'value' => _('Download CSV file'))));
echo $HTML->closeForm();
$ath->footer();
$headers = getIntFromRequest('headers');
$sep = getFilteredStringFromRequest('sep', '/^[,;]$/', ',');
-$date = date('Y-m-d-His');
$date_format = _('Y-m-d');
sysdebug_off();
header('Content-type: text/csv');
-header('Content-disposition: filename="trackers-'.$date.'.csv"');
+header('Content-disposition: filename="trackers-'.date('Y-m-d-His').'.csv"');
$offset = getStringFromRequest('offset');
$_sort_col = getStringFromRequest('_sort_col');
$_assigned_to = getIntFromRequest('_assigned_to');
$_status = getIntFromRequest('_status');
$received_changed_from = getStringFromRequest('_changed_from', 0);
+$overwrite_filter = getStringFromRequest('overwrite_filter', false);
+if ($overwrite_filter) {
+ $set = $overwrite_filter;
+}
if ($received_changed_from) {
$arrDateBegin = DateTime::createFromFormat($date_format, $received_changed_from);
$_changed_from = $arrDateBegin->getTimestamp();
'group_artifact_id'=>'xsd:int',
'assigned_to'=>'xsd:int',
'status'=>'xsd:int',
- 'changed_from' => 'xsd:int'
+ 'changed_from' => 'xsd:int',
+ 'overwrite_query' => 'xsd:int'
),
array('getArtifactsResponse'=>'tns:ArrayOfArtifact'),
$uri,$uri.'#getArtifacts','rpc','encoded'
'group_artifact_id'=>'xsd:int',
'assigned_to'=>'xsd:int',
'status'=>'xsd:int',
- 'changed_from' => 'xsd:int'
+ 'changed_from' => 'xsd:int',
+ 'overwrite_query' => 'xsd:int'
),
array('getArtifactsResponse'=>'tns:ArrayOfFlattedArtifact'),
$uri,$uri.'#getFlattedArtifacts','rpc','encoded'
//
// getArtifacts
//
-function getArtifacts($session_ser, $group_id, $group_artifact_id, $assigned_to, $status, $changed_from) {
+function getArtifacts($session_ser, $group_id, $group_artifact_id, $assigned_to, $status, $changed_from, $overwrite_query) {
continue_session($session_ser);
$grp = group_get_object($group_id);
if (!$grp || !is_object($grp)) {
}
// this is a bit hacky...
- if ($assigned_to || $status) {
+ if ($overwrite_query) {
+ $set = 'overwrite';
+ } elseif ($assigned_to || $status) {
$set = "custom";
} else {
$set = false;
//
// getFlattedArtifacts
//
-function getFlattedArtifacts($session_ser, $group_id, $group_artifact_id, $assigned_to, $status, $changed_from) {
+function getFlattedArtifacts($session_ser, $group_id, $group_artifact_id, $assigned_to, $status, $changed_from, $overwrite_query) {
continue_session($session_ser);
$grp = group_get_object($group_id);
if (!$grp || !is_object($grp)) {
}
// this is a bit hacky...
- if ($assigned_to || $status) {
+ if ($overwrite_query) {
+ $set = 'overwrite';
+ } elseif ($assigned_to || $status) {
$set = "custom";
} else {
$set = false;