Skip to content

Commit

Permalink
fix(targetchange): add users from question of type actors
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Mar 4, 2019
1 parent 5cee1a5 commit fcb357b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 4 deletions.
1 change: 1 addition & 0 deletions install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class PluginFormcreatorInstall {
'2.6' => '2.6.1',
'2.6.1' => '2.6.3',
'2.6.3' => '2.7',
'2.7' => '2.8',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion install/mysql/plugin_formcreator_empty.sql
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_targetchanges_actors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_formcreator_targetchanges_id` int(11) NOT NULL,
`actor_role` enum('requester','observer','assigned') NOT NULL,
`actor_type` enum('creator','validator','person','question_person','group','question_group','supplier','question_supplier') NOT NULL,
`actor_type` enum('creator','validator','person','question_person','group','question_group','supplier','question_supplier','question_actors') NOT NULL,
`actor_value` int(11) DEFAULT NULL,
`use_notification` tinyint(1) NOT NULL DEFAULT '1',
`uuid` varchar(255) DEFAULT NULL,
Expand Down
46 changes: 46 additions & 0 deletions install/upgrade_to_2.8.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* ---------------------------------------------------------------------
* Formcreator is a plugin which allows creation of custom forms of
* easy access.
* ---------------------------------------------------------------------
* LICENSE
*
* This file is part of Formcreator.
*
* Formcreator is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Formcreator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
*
* @copyright Copyright © 2011 - 2019 Teclib'
* @license http://www.gnu.org/licenses/gpl.txt GPLv3+
* @link https://github.com/pluginsGLPI/formcreator/
* @link https://pluginsglpi.github.io/formcreator/
* @link http://plugins.glpi-project.org/#/plugin/formcreator
* ---------------------------------------------------------------------
*/
class PluginFormcreatorUpgradeTo2_8 {
/**
* @param Migration $migration
*/
public function upgrade(Migration $migration) {
global $DB;

$migration->changeField(
'glpi_plugin_formcreator_targetchanges_actors',
'actor_type',
'actor_type',
"ENUM('creator','validator','person','question_person','group','question_group','supplier','question_supplier','question_actors') NOT NULL"
);
}
}
6 changes: 3 additions & 3 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

global $CFG_GLPI;
// Version of the plugin
define('PLUGIN_FORMCREATOR_VERSION', '2.7.0');
define('PLUGIN_FORMCREATOR_VERSION', '2.8.0');
// Schema version of this version
define('PLUGIN_FORMCREATOR_SCHEMA_VERSION', '2.7');
define('PLUGIN_FORMCREATOR_SCHEMA_VERSION', '2.8');
// is or is not an official release of the plugin
define('PLUGIN_FORMCREATOR_IS_OFFICIAL_RELEASE', true);
define('PLUGIN_FORMCREATOR_IS_OFFICIAL_RELEASE', false);

// Minimal GLPI version, inclusive
define ('PLUGIN_FORMCREATOR_GLPI_MIN_VERSION', '9.3.0');
Expand Down

0 comments on commit fcb357b

Please sign in to comment.