AIRAVATA-3085 Specify group-resource-profile-id in pga_config.php
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index 920d938..5a85cc8 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -212,7 +212,12 @@
          /**
           * Data Sharing enabled
           */
-          'data-sharing-enabled' => false
+          'data-sharing-enabled' => false,
+
+        /**
+         * Group Resource Profile ID to use when submitting experiments
+         */
+        'group-resource-profile-id' => '',
     ],
 
     /**
@@ -306,4 +311,4 @@
          */
         'google-analytics-id' => ''
     ]
-);
\ No newline at end of file
+);
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index a6b40ac..17738f1 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -335,6 +335,9 @@
             $userConfigData->userDN = $_POST["userDN"];
         }
         $userConfigData->useUserCRPref = isset($_POST['use-user-cr-pref']) ? true : false;
+        if (isset(Config::get('pga_config.airavata')['group-resource-profile-id'])) {
+            $userConfigData->groupResourceProfileId = Config::get('pga_config.airavata')['group-resource-profile-id'];
+        }
         ExperimentUtilities::create_experiment_folder_path($_POST['project'], $_POST['experiment-name']);
         $userConfigData->experimentDataDir = ExperimentUtilities::$experimentPath;
         $applicationInputs = AppUtilities::get_application_inputs($_POST['application']);
@@ -721,6 +724,9 @@
             // In case the gateway-data-store-resource-id has changed since the
             // original experiment was created, update in this experiment
             $experiment->userConfigurationData->storageId = Config::get('pga_config.airavata')['gateway-data-store-resource-id'];
+            if (isset(Config::get('pga_config.airavata')['group-resource-profile-id'])) {
+                $userConfigData->groupResourceProfileId = Config::get('pga_config.airavata')['group-resource-profile-id'];
+            }
             Airavata::updateExperiment(Session::get('authz-token'), $cloneId, $experiment);
 
             $share = SharingUtilities::getAllUserPermissions($expId, ResourceType::EXPERIMENT);
@@ -1396,6 +1402,9 @@
             $userConfigDataUpdated->userDN = $input["userDN"];
         }
         $userConfigDataUpdated->useUserCRPref = isset($_POST['use-user-cr-pref']) ? true : false;
+        if (isset(Config::get('pga_config.airavata')['group-resource-profile-id'])) {
+            $userConfigData->groupResourceProfileId = Config::get('pga_config.airavata')['group-resource-profile-id'];
+        }
 
         $experiment->userConfigurationData = $userConfigDataUpdated;