[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1beta1-110-g637ec5b

Franck Villaume nerville at libremir.placard.fr.eu.org
Tue Jan 23 09:43:56 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.1 has been updated
       via  637ec5bd6d2d6c90448dfedd1a9f8849b1587c4f (commit)
      from  93aa75d696d754252df24ef6c9078917c88244da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=637ec5bd6d2d6c90448dfedd1a9f8849b1587c4f

commit 637ec5bd6d2d6c90448dfedd1a9f8849b1587c4f
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Jan 23 08:43:50 2018 +0000

    tracker: fix default value on priority and assigned_to, fix widget view for non-managers users

diff --git a/src/common/tracker/actions/tracker.php b/src/common/tracker/actions/tracker.php
index ccc2b78..574a8e4 100644
--- a/src/common/tracker/actions/tracker.php
+++ b/src/common/tracker/actions/tracker.php
@@ -67,8 +67,8 @@ switch (getStringFromRequest('func')) {
 		$artifact_group_id = getIntFromRequest('artifact_group_id');
 		$summary = getStringFromRequest('summary');
 		$details = getStringFromRequest('details');
-		$assigned_to = getStringFromRequest('assigned_to');
-		$priority = getStringFromRequest('priority');
+		$assigned_to = getIntFromRequest('assigned_to', 100);
+		$priority = getIntFromRequest('priority', 3);
 		$extra_fields = getStringFromRequest('extra_fields');
 
 		/*
diff --git a/src/common/widget/Widget_TrackerMain.class.php b/src/common/widget/Widget_TrackerMain.class.php
index 1ce9614..c60d9d4 100644
--- a/src/common/widget/Widget_TrackerMain.class.php
+++ b/src/common/widget/Widget_TrackerMain.class.php
@@ -85,9 +85,9 @@ class Widget_TrackerMain extends Widget {
 			$cells[][] = $ath->getName();
 		}
 		$return .= $HTML->multiTableRow(array(), $cells);
-		$cells = array();
-		$cells[][] = html_e('strong', array(), _('Assigned to')._(': '));
 		if (forge_check_perm('tracker', $atid, 'manager')) {
+			$cells = array();
+			$cells[][] = html_e('strong', array(), _('Assigned to')._(': '));
 			if (in_array('assigned_to', $fieldInFormula)) {
 				$class = 'in-formula';
 			} else {
@@ -98,10 +98,13 @@ class Widget_TrackerMain extends Widget {
 			} else {
 				$cells[][] = $ath->technicianBox('assigned_to', $assigned_to, true, 'none', -1, '', false, array('form' => 'trackerform', 'class' => $class));
 			}
-		} else {
+			$return .= $HTML->multiTableRow(array(), $cells);
+		} elseif ($func == 'detail') {
+			$cells = array();
+			$cells[][] = html_e('strong', array(), _('Assigned to')._(': '));
 			$cells[][] = $ah->getAssignedRealName().' ('.$ah->getAssignedUnixName().')';
+			$return .= $HTML->multiTableRow(array(), $cells);
 		}
-		$return .= $HTML->multiTableRow(array(), $cells);
 		if (!$ath->usesCustomStatuses()) {
 			$cells = array();
 			$cells[][] = html_e('strong', array(), _('State')._(': '));
@@ -121,9 +124,9 @@ class Widget_TrackerMain extends Widget {
 			}
 			$return .= $HTML->multiTableRow(array(), $cells);
 		}
-		$cells = array();
-		$cells[][] = html_e('strong', array(), _('Priority')._(': '));
 		if (forge_check_perm('tracker', $atid, 'manager')) {
+			$cells = array();
+			$cells[][] = html_e('strong', array(), _('Priority')._(': '));
 			if (in_array('priority', $fieldInFormula)) {
 				$class = 'in-formula';
 			} else {
@@ -134,10 +137,13 @@ class Widget_TrackerMain extends Widget {
 			} else {
 				$cells[][] = $ath->priorityBox('priority', $priority, false, array('form' => 'trackerform', 'class' => $class));
 			}
-		} else {
+			$return .= $HTML->multiTableRow(array(), $cells);
+		} elseif ($func == 'detail') {
+			$cells = array();
+			$cells[][] = html_e('strong', array(), _('Priority')._(': '));
 			$cells[][] = $ah->getPriority();
+			$return .= $HTML->multiTableRow(array(), $cells);
 		}
-		$return .= $HTML->multiTableRow(array(), $cells);
 		$return .= $HTML->listTableBottom();
 		if (forge_check_perm('tracker', $atid, 'tech')) {
 			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'), 'onClick' => 'iefixform()')));

-----------------------------------------------------------------------

Summary of changes:
 src/common/tracker/actions/tracker.php         |  4 ++--
 src/common/widget/Widget_TrackerMain.class.php | 22 ++++++++++++++--------
 2 files changed, 16 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list