Add support for changing "Product Version" of multiple bugs at once.

Includes string changes for English only.

diff --git a/bug_actiongroup.php b/bug_actiongroup.php
index 7c0ab32..4b5661a 100644
--- a/bug_actiongroup.php
+++ b/bug_actiongroup.php
@@ -244,6 +244,23 @@ foreach( $f_bug_arr as $t_bug_id ) {
 		}
 		break;
 
+	case 'UP_PRODUCT_VERSION':
+		$f_product_version = gpc_get_string( 'product_version' );
+		$t_project_id = bug_get_field( $t_bug_id, 'project_id' );
+
+		if ( access_has_bug_level( config_get( 'update_bug_threshold' ), $t_bug_id ) ) {
+			if ( $f_product_version === '' || version_get_id( $f_product_version, $t_project_id ) !== false ) {
+				/** @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); */
+				bug_set_field( $t_bug_id, 'version', $f_product_version );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_version' );
+			}
+		} else {
+			$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+		}
+		break;
+
 	case 'UP_FIXED_IN_VERSION':
 		$f_fixed_in_version = gpc_get_string( 'fixed_in_version' );
 		$t_project_id = bug_get_field( $t_bug_id, 'project_id' );
diff --git a/bug_actiongroup_page.php b/bug_actiongroup_page.php
index fe5305e..2554140 100644
--- a/bug_actiongroup_page.php
+++ b/bug_actiongroup_page.php
@@ -198,6 +198,12 @@ switch ( $f_action )  {
 		$t_form					= 'view_status';
 		break;
 
+	case 'UP_PRODUCT_VERSION':
+		$t_question_title		= lang_get( 'product_version_bugs_conf_msg' );
+		$t_button_title			= lang_get( 'product_version_group_bugs_button' );
+		$t_form					= 'product_version';
+		break;
+
 	case 'UP_FIXED_IN_VERSION':
 		$t_question_title		= lang_get( 'fixed_in_version_bugs_conf_msg' );
 		$t_button_title			= lang_get( 'fixed_in_version_group_bugs_button' );
@@ -289,6 +295,7 @@ if ( !$t_finished ) {
 				case 'VIEW_STATUS':
 					print_enum_string_option_list( 'view_state', config_get( 'default_bug_view_status' ) );
 					break;
+				case 'UP_PRODUCT_VERSION':
 				case 'UP_TARGET_VERSION':
 				case 'UP_FIXED_IN_VERSION':
 					print_version_option_list( '', $t_project_id, VERSION_ALL );
diff --git a/core/bug_group_action_api.php b/core/bug_group_action_api.php
index fa113b9..5293e00 100644
--- a/core/bug_group_action_api.php
+++ b/core/bug_group_action_api.php
@@ -273,6 +273,12 @@ function bug_group_action_get_commands( $p_project_ids = null ) {
 			$t_commands['EXT_ATTACH_TAGS'] = lang_get( 'actiongroup_menu_attach_tags' );
 		}
 
+		if( !isset( $t_commands['UP_PRODUCT_VERSION'] ) &&
+			version_should_show_product_version( $t_project_id ) &&
+			access_has_project_level( config_get( 'update_bug_threshold', null, null, $t_project_id ), $t_project_id ) ) {
+			$t_commands['UP_PRODUCT_VERSION'] = lang_get( 'actiongroup_menu_update_product_version' );
+		}
+
 		if( !isset( $t_commands['UP_FIXED_IN_VERSION'] ) &&
 			version_should_show_product_version( $t_project_id ) &&
 			access_has_project_level( config_get( 'update_bug_threshold', null, null, $t_project_id ), $t_project_id ) ) {
diff --git a/lang/strings_english.txt b/lang/strings_english.txt
index 60e5055..febcd55 100644
--- a/lang/strings_english.txt
+++ b/lang/strings_english.txt
@@ -47,6 +47,7 @@ $s_actiongroup_menu_update_view_status = 'Update View Status';
 $s_actiongroup_menu_update_category = 'Update Category';
 $s_actiongroup_menu_set_sticky = 'Set/Unset Sticky';
 $s_actiongroup_menu_update_field = 'Update %1$s';
+$s_actiongroup_menu_update_product_version = 'Update Product Version';
 $s_actiongroup_menu_update_target_version = 'Update Target Version';
 $s_actiongroup_menu_update_fixed_in_version = 'Update Fixed in Version';
 $s_actiongroup_menu_update_product_build = 'Update Product Build';
@@ -154,6 +155,7 @@ $s_status_bugs_conf_msg = 'Choose issues status';
 $s_view_status_bugs_conf_msg = 'Choose issues view status';
 $s_category_bugs_conf_msg = 'Choose issues category';
 $s_set_sticky_bugs_conf_msg = 'Are you sure you wish to set/unset these issues sticky?';
+$s_product_version_bugs_conf_msg = 'Update Product Version to';
 $s_fixed_in_version_bugs_conf_msg = 'Update Fixed in Version to';
 $s_target_version_bugs_conf_msg = 'Update Target Version to';
 $s_close_group_bugs_button = 'Close Issues';
@@ -167,6 +169,7 @@ $s_status_group_bugs_button = 'Update Status';
 $s_category_group_bugs_button = 'Update Category';
 $s_view_status_group_bugs_button = 'Update View Status';
 $s_set_sticky_group_bugs_button = 'Set/Unset Sticky';
+$s_product_version_group_bugs_button = 'Update Product Version';
 $s_fixed_in_version_group_bugs_button = 'Update Fixed in Version';
 $s_target_version_group_bugs_button = 'Update Target Version';
 $s_update_severity_title = 'Update Severity';
