[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1273-g356f8c4

Franck Villaume nerville at libremir.placard.fr.eu.org
Fri Dec 23 17:59:50 CET 2016


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, master has been updated
       via  356f8c439e4262df13c6e3326ec3d837f9f0a9b7 (commit)
       via  8810b50e9cf21ce6cc1e4e9129629edae8ac7816 (commit)
       via  5e8ce4eba2c8f45b727c6322a586ba2de754a658 (commit)
      from  03422333273f04d185358c69f75614179b12f236 (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=356f8c439e4262df13c6e3326ec3d837f9f0a9b7

commit 356f8c439e4262df13c6e3326ec3d837f9f0a9b7
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 23 17:59:28 2016 +0100

    sync CHANGES

diff --git a/src/CHANGES b/src/CHANGES
index 693105b..5684aa1 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -32,6 +32,7 @@ FusionForge 6.X:
 * Tracker: add new extrafield: text regex (TrivialDev)
 * Tracker: add new extrafield: User (TrivialDev)
 * Tracker: add new extrafield: DateTime (TrivialDev)
+* Tracker: add new extrafield: Release (TrivialDev)
 * Tracker: add support for mandatory fields on workflow of artifact (TrivialDev)
 * Tracker: add support for description on extrafield to be used in tooltip (TrivialDev)
 * Tracker: fix extrafield cloning when not using default template fusionforge project [#829] (TrivialDev)

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=8810b50e9cf21ce6cc1e4e9129629edae8ac7816

commit 8810b50e9cf21ce6cc1e4e9129629edae8ac7816
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 23 17:58:38 2016 +0100

    release extrafield: use standard role model to filter packages. Remove filtering option in configuration that does not fit with role model

diff --git a/src/common/tracker/include/ArtifactTypeHtml.class.php b/src/common/tracker/include/ArtifactTypeHtml.class.php
index 93000b0..4f81f88 100644
--- a/src/common/tracker/include/ArtifactTypeHtml.class.php
+++ b/src/common/tracker/include/ArtifactTypeHtml.class.php
@@ -777,7 +777,7 @@ class ArtifactTypeHtml extends ArtifactType {
 	 * @param	array		$attrs
 	 * @return	string		HTML code for the box and choices
 	 */
-	function renderReleaseField ($extra_field_id,$checked='xzxz',$show_100=false,$text_100='none',$show_any=false,$text_any='Any', $allowed=false, $attrs = array ()) {
+	function renderReleaseField($extra_field_id, $checked = 'xzxz', $show_100 = false, $text_100 = 'none', $show_any = false, $text_any = 'Any', $allowed = false, $attrs = array ()) {
 		if ($text_100 == 'none'){
 			$text_100=_('None');
 		}
@@ -792,22 +792,21 @@ class ArtifactTypeHtml extends ArtifactType {
 			$selectedPackagesId[$i]=$arr[$i]['element_name'];
 		}
 
-		$packages = get_frs_packages($this->getGroup());
+		$fpFactory = new FRSPackageFactory($this->getGroup());
+		$packages = $fpFactory->getFRSs(true);
 		uasort($packages, 'compareObjectName');
 		foreach ($packages as $package) {
-			if (in_array($package->getID(), $selectedPackagesId)) {
-				$releases = $package->getReleases();
-				uasort($releases, 'compareObjectName');
-				foreach ($releases as $release) {
-					$optGroup[] = $package->getName();
-					$releasesArray[$release->getID()] = $release->getName();
-				}
+			$releases = $package->getReleases();
+			uasort($releases, 'compareObjectName');
+			foreach ($releases as $release) {
+				$optGroup[] = $package->getName();
+				$releasesArray[$release->getID()] = $release->getName();
 			}
 		}
 
 		$keys = array_keys($releasesArray);
 		$vals = array_values($releasesArray);
-		return html_build_select_box_from_arrays ($keys,$vals,'extra_fields['.$extra_field_id.']',$checked,$show_100,$text_100,$show_any,$text_any, $allowed, $attrs, $releasesAttrs, array(), $optGroup);
+		return html_build_select_box_from_arrays($keys, $vals, 'extra_fields['.$extra_field_id.']', $checked, $show_100, $text_100, $show_any, $text_any, $allowed, $attrs, $releasesAttrs, array(), $optGroup);
 	}
 
 	/**
diff --git a/src/common/tracker/views/form-addextrafield.php b/src/common/tracker/views/form-addextrafield.php
index ffa02c2..70b20ba 100644
--- a/src/common/tracker/views/form-addextrafield.php
+++ b/src/common/tracker/views/form-addextrafield.php
@@ -151,9 +151,6 @@ if ($rows > 0) {
 			case ARTIFACT_EXTRAFIELDTYPE_USER:
 				echo util_make_link('/tracker/admin/?add_opt=1&boxid='.$efarr[$i]['extra_field_id'].'&group_id='.$group_id.'&atid='.$ath->getID(), '['._('Add/remove roles for user choices').']');
 				break;
-			case ARTIFACT_EXTRAFIELDTYPE_RELEASE:
-				echo util_make_link('/tracker/admin/?add_opt=1&boxid='.$efarr[$i]['extra_field_id'].'&group_id='.$group_id.'&atid='.$ath->getID(), '['._('Add/remove packages for release choices').']');
-				break;
 			case ARTIFACT_EXTRAFIELDTYPE_SELECT:
 			case ARTIFACT_EXTRAFIELDTYPE_RADIO:
 			case ARTIFACT_EXTRAFIELDTYPE_CHECKBOX:
diff --git a/src/common/tracker/views/form-addextrafieldoption.php b/src/common/tracker/views/form-addextrafieldoption.php
index 4dae8fb..40ed4b1 100644
--- a/src/common/tracker/views/form-addextrafieldoption.php
+++ b/src/common/tracker/views/form-addextrafieldoption.php
@@ -78,28 +78,6 @@ if (!$ac || !is_object($ac)) {
 			echo html_e('input', array('type'=>'submit', 'name'=>'post_changes', 'value'=>_('Submit')));
 			echo $HTML->closeForm();
 			break;
-		case ARTIFACT_EXTRAFIELDTYPE_RELEASE:
-			$vals = array();
-			// specific for release select box
-			echo html_e('p',array(),_('Choose packages used for the release select box'));
-			$g=$ath->getGroup();
-			$packages = get_frs_packages($g);
-			foreach ($packages as $package) {
-				$vals[$package->getID()]=$package->getName();
-			}
-			// end
-			asort($vals,SORT_FLAG_CASE);
-			$rows=count($efearr);
-			$checked_array = array();
-			for ($i=0; $i < $rows; $i++) {
-				$checked_array []= $efearr[$i]['element_name'];
-			}
-			echo $HTML->openForm(array('action' => '/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID().'&boxid='.$boxid, 'method' => 'post'));
-			echo html_e('input', array('type'=>'hidden', 'name'=>'update_checked_opt', 'value'=>'y'));
-			echo html_build_checkboxes_from_array($vals, 'element', $checked_array, true, false);
-			echo html_e('input', array('type'=>'submit', 'name'=>'post_changes', 'value'=>_('Submit')));
-			echo $HTML->closeForm();
-			break;
 		default:
 			$rows=count($efearr);
 			if ($rows > 0) {

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=5e8ce4eba2c8f45b727c6322a586ba2de754a658

commit 5e8ce4eba2c8f45b727c6322a586ba2de754a658
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 23 17:56:35 2016 +0100

    less code

diff --git a/src/www/include/html.php b/src/www/include/html.php
index f4fd0d4..fc220e6 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -1000,10 +1000,8 @@ function html_build_checkboxes_from_arrays($vals, $texts, $check_name, $checked=
 							});
 						//]]';
 		$return .= html_e('script', array( 'type'=>'text/javascript'), $javascript);
-		$return .= html_ao('p');
-		$return .= html_e('input', array_merge( array( 'type' => 'checkbox', 'name' => 'checkall_'.$check_name, 'id' => 'checkall_'.$check_name ), $attrs_checkall));
-		$return .= html_e('label', array_merge( array( 'for' => 'checkall_'.$check_name), $title), _('Check all'), false);
-		$return .= html_ac(html_ap() - 1);
+		$return .= html_p('p', array(), html_e('input', array_merge( array( 'type' => 'checkbox', 'name' => 'checkall_'.$check_name, 'id' => 'checkall_'.$check_name ), $attrs_checkall)).
+						html_e('label', array_merge( array( 'for' => 'checkall_'.$check_name), $title), _('Check all'), false));
 	}
 
 	if (isset($attrs['required']) && $attrs['required']=='required') {

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

Summary of changes:
 src/CHANGES                                        |  1 +
 .../tracker/include/ArtifactTypeHtml.class.php     | 19 +++++++++----------
 src/common/tracker/views/form-addextrafield.php    |  3 ---
 .../tracker/views/form-addextrafieldoption.php     | 22 ----------------------
 src/www/include/html.php                           |  6 ++----
 5 files changed, 12 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list