View Issue Details

IDProjectCategoryView StatusLast Update
0012010mantisbtbugtrackerpublic2017-02-22 23:01
Reporterdominik Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.2.1 
Summary0012010: Added config switch for display format of due date
Description

Attached a patch file with a new congig setting which allows to choose whether the due date shall be displayed in short_date_format, normal_date_format or complete_date_format...
Unfortunately I had private files in theses commits so I had to manually remove files -> if you have problems to apply the patch please let me know (or if you know how I can exlude files when creating patches please let me know as well ;-))

Tagspatch

Activities

dominik

dominik

2010-06-09 02:19

reporter  

2010-06-09_due_date_configs.patch (2,615 bytes)   
From c12655f712d4e64835a856f7c2743de73e2b1cef Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
Date: Thu, 27 May 2010 18:06:43 +0200
Subject: [PATCH 05/19] Added config to specifiy a due date format (short, normal or complete_date_format

---
 bug_view_inc.php     |    2 +-
 config_inc.php       |    2 ++
 core/columns_api.php |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bug_view_inc.php b/bug_view_inc.php
index 95b25ee..f5b8389 100644
--- a/bug_view_inc.php
+++ b/bug_view_inc.php
@@ -144,7 +144,7 @@
 
 	if ( $tpl_show_due_date ) {
 		if ( !date_is_null( $tpl_bug->due_date ) ) {
-			$tpl_bug_due_date = date( config_get( 'normal_date_format' ), $tpl_bug->due_date );
+			$tpl_bug_due_date = date( config_get( config_get( 'due_date_date_format' ) ), $tpl_bug->due_date );
 		} else {
 			$tpl_bug_due_date = '';
 		}
diff --git a/core/columns_api.php b/core/columns_api.php
index bdfda57..b2cd5e6 100644
--- a/core/columns_api.php
+++ b/core/columns_api.php
@@ -1327,7 +1327,7 @@ function print_column_due_date( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_
 		echo '<td>';
 	}
 
-	echo string_display_line( date( config_get( 'short_date_format' ), $p_bug->due_date ) );
+	echo string_display_line( date( config_get( config_get( 'due_date_date_format' ) ), $p_bug->due_date ) );
 
 	echo '</td>';
 }
-- 
1.7.0.2.msysgit.0

From 735282382e1263ec227016f53187f460c804369e Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
Date: Wed, 9 Jun 2010 07:36:29 +0200
Subject: [PATCH 20/20] Moved new config options to default config

---
 config_defaults_inc.php |   12 ++++++++++++
 config_inc.php          |    4 ----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/config_defaults_inc.php b/config_defaults_inc.php
index 2df0142..28cfe14 100644
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -999,6 +999,12 @@
 	 * @global string $g_complete_date_format
 	 */
 	$g_complete_date_format = 'Y-m-d H:i T';
+	
+	/**
+	 * due date format (short_date_format, normal_date_format or complete_date_format)
+	 * @global string $g_due_date_format
+	 */
+	$g_due_date_format    = 'short_date_format';
 
 	/**
 	 * jscalendar date format string
@@ -1033,6 +1039,12 @@
 	 * @global string $g_default_timezone
 	 */
 	$g_default_timezone = '';
+	
+	/**
+	 * Enable/disable nusoap timzone correction
+	 * @global string $g_due_date_timezone_correction
+	 */
+	$g_due_date_timezone_correction = OFF;
 
 	/**************************
 	 * MantisBT News Settings *
dominik

dominik

2010-06-09 05:07

reporter  

2010-06-09_due_date_configs_typo_fixed.patch (2,620 bytes)   
From c12655f712d4e64835a856f7c2743de73e2b1cef Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
Date: Thu, 27 May 2010 18:06:43 +0200
Subject: [PATCH 05/19] Added config to specifiy a due date format (short, normal or complete_date_format

---
 bug_view_inc.php     |    2 +-
 config_inc.php       |    2 ++
 core/columns_api.php |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bug_view_inc.php b/bug_view_inc.php
index 95b25ee..f5b8389 100644
--- a/bug_view_inc.php
+++ b/bug_view_inc.php
@@ -144,7 +144,7 @@
 
 	if ( $tpl_show_due_date ) {
 		if ( !date_is_null( $tpl_bug->due_date ) ) {
-			$tpl_bug_due_date = date( config_get( 'normal_date_format' ), $tpl_bug->due_date );
+			$tpl_bug_due_date = date( config_get( config_get( 'due_date_date_format' ) ), $tpl_bug->due_date );
 		} else {
 			$tpl_bug_due_date = '';
 		}
diff --git a/core/columns_api.php b/core/columns_api.php
index bdfda57..b2cd5e6 100644
--- a/core/columns_api.php
+++ b/core/columns_api.php
@@ -1327,7 +1327,7 @@ function print_column_due_date( $p_bug, $p_columns_target = COLUMNS_TARGET_VIEW_
 		echo '<td>';
 	}
 
-	echo string_display_line( date( config_get( 'short_date_format' ), $p_bug->due_date ) );
+	echo string_display_line( date( config_get( config_get( 'due_date_date_format' ) ), $p_bug->due_date ) );
 
 	echo '</td>';
 }
-- 
1.7.0.2.msysgit.0

From 735282382e1263ec227016f53187f460c804369e Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
Date: Wed, 9 Jun 2010 07:36:29 +0200
Subject: [PATCH 20/20] Moved new config options to default config

---
 config_defaults_inc.php |   12 ++++++++++++
 config_inc.php          |    4 ----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/config_defaults_inc.php b/config_defaults_inc.php
index 2df0142..28cfe14 100644
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -999,6 +999,12 @@
 	 * @global string $g_complete_date_format
 	 */
 	$g_complete_date_format = 'Y-m-d H:i T';
+	
+	/**
+	 * due date format (short_date_format, normal_date_format or complete_date_format)
+	 * @global string $g_due_date_format
+	 */
+	$g_due_date_date_format    = 'short_date_format';
 
 	/**
 	 * jscalendar date format string
@@ -1033,6 +1039,12 @@
 	 * @global string $g_default_timezone
 	 */
 	$g_default_timezone = '';
+	
+	/**
+	 * Enable/disable nusoap timzone correction
+	 * @global string $g_due_date_timezone_correction
+	 */
+	$g_due_date_timezone_correction = OFF;
 
 	/**************************
 	 * MantisBT News Settings *

Issue History

Date Modified Username Field Change
2010-06-09 02:19 dominik New Issue
2010-06-09 02:19 dominik File Added: 2010-06-09_due_date_configs.patch
2010-06-09 05:07 dominik File Added: 2010-06-09_due_date_configs_typo_fixed.patch
2014-02-02 12:18 atrol Severity minor => feature
2017-02-22 23:01 vboctor Tag Attached: patch