Skip to content

Commit fcb357b

Browse files
committed
fix(targetchange): add users from question of type actors
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 5cee1a5 commit fcb357b

File tree

4 files changed

+51
-4
lines changed

4 files changed

+51
-4
lines changed

install/install.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class PluginFormcreatorInstall {
6262
'2.6' => '2.6.1',
6363
'2.6.1' => '2.6.3',
6464
'2.6.3' => '2.7',
65+
'2.7' => '2.8',
6566
];
6667

6768
/**

install/mysql/plugin_formcreator_empty.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_targetchanges_actors` (
169169
`id` int(11) NOT NULL AUTO_INCREMENT,
170170
`plugin_formcreator_targetchanges_id` int(11) NOT NULL,
171171
`actor_role` enum('requester','observer','assigned') NOT NULL,
172-
`actor_type` enum('creator','validator','person','question_person','group','question_group','supplier','question_supplier') NOT NULL,
172+
`actor_type` enum('creator','validator','person','question_person','group','question_group','supplier','question_supplier','question_actors') NOT NULL,
173173
`actor_value` int(11) DEFAULT NULL,
174174
`use_notification` tinyint(1) NOT NULL DEFAULT '1',
175175
`uuid` varchar(255) DEFAULT NULL,

install/upgrade_to_2.8.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* ---------------------------------------------------------------------
4+
* Formcreator is a plugin which allows creation of custom forms of
5+
* easy access.
6+
* ---------------------------------------------------------------------
7+
* LICENSE
8+
*
9+
* This file is part of Formcreator.
10+
*
11+
* Formcreator is free software; you can redistribute it and/or modify
12+
* it under the terms of the GNU General Public License as published by
13+
* the Free Software Foundation; either version 2 of the License, or
14+
* (at your option) any later version.
15+
*
16+
* Formcreator is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU General Public License
22+
* along with Formcreator. If not, see <http://www.gnu.org/licenses/>.
23+
* ---------------------------------------------------------------------
24+
*
25+
* @copyright Copyright © 2011 - 2019 Teclib'
26+
* @license http://www.gnu.org/licenses/gpl.txt GPLv3+
27+
* @link https://github.com/pluginsGLPI/formcreator/
28+
* @link https://pluginsglpi.github.io/formcreator/
29+
* @link http://plugins.glpi-project.org/#/plugin/formcreator
30+
* ---------------------------------------------------------------------
31+
*/
32+
class PluginFormcreatorUpgradeTo2_8 {
33+
/**
34+
* @param Migration $migration
35+
*/
36+
public function upgrade(Migration $migration) {
37+
global $DB;
38+
39+
$migration->changeField(
40+
'glpi_plugin_formcreator_targetchanges_actors',
41+
'actor_type',
42+
'actor_type',
43+
"ENUM('creator','validator','person','question_person','group','question_group','supplier','question_supplier','question_actors') NOT NULL"
44+
);
45+
}
46+
}

setup.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333

3434
global $CFG_GLPI;
3535
// Version of the plugin
36-
define('PLUGIN_FORMCREATOR_VERSION', '2.7.0');
36+
define('PLUGIN_FORMCREATOR_VERSION', '2.8.0');
3737
// Schema version of this version
38-
define('PLUGIN_FORMCREATOR_SCHEMA_VERSION', '2.7');
38+
define('PLUGIN_FORMCREATOR_SCHEMA_VERSION', '2.8');
3939
// is or is not an official release of the plugin
40-
define('PLUGIN_FORMCREATOR_IS_OFFICIAL_RELEASE', true);
40+
define('PLUGIN_FORMCREATOR_IS_OFFICIAL_RELEASE', false);
4141

4242
// Minimal GLPI version, inclusive
4343
define ('PLUGIN_FORMCREATOR_GLPI_MIN_VERSION', '9.3.0');

0 commit comments

Comments
 (0)