/**
  * Updates the version and associated type of the document if several issues
  * are updated
  *
  * @param $event
  * @param $event_type
  * @param $bug_id
  */
 function actiongroupUpdateData($event, $event_type, $bug_id)
 {
     require_once SPECMANAGEMENT_CORE_URI . 'specmanagement_database_api.php';
     $specmanagement_database_api = new specmanagement_database_api();
     if ($event_type == 'UP_TARGET_VERSION') {
         $target_version = gpc_get_string('target_version', null);
         $p_version_id = null;
         if (!(is_null($target_version) || $target_version == '')) {
             $version_id = version_get_id($target_version);
             $version_obj = $specmanagement_database_api->get_plugin_version_row_by_version_id($version_id);
             $p_version_id = $version_obj[0];
         }
         $specmanagement_database_api->update_source_version($bug_id, $p_version_id);
     }
 }