|
9 | 9 | along with CodevTT. If not, see <http://www.gnu.org/licenses/>.
|
10 | 10 | */
|
11 | 11 |
|
| 12 | +/* ================================================== |
| 13 | + * ==== ACTIONS A EFFECTUER APRES EXECUTION ===== |
| 14 | + * |
| 15 | + * - supprimer les droits d'administration mantis du user 'manager' (qui est temporairement admin, le compte administrator ayant ete desactive) |
| 16 | + * => il n'y aura plus aucun admin mantis, il faut reactiver administrator avec phpmyadmin... |
| 17 | + * |
| 18 | + * - cloturer les commandes qui ne sont pas interessantes pour la demo (n'en laisser que 2 ou 3) |
| 19 | + * - postionner le filtre des commandes pour user1 et manager pour ne pas afficher les commandes cloturees |
| 20 | + * - verifier les plugins affichés dans chaque dashboard |
| 21 | + * - supprimer user1 de la team 23 |
| 22 | + * - desactiver les doodles ? |
| 23 | + * |
| 24 | + */ |
| 25 | + |
| 26 | + |
| 27 | + |
12 | 28 | $logger = Logger::getLogger("create_fake_db");
|
13 | 29 |
|
14 | 30 | # Make sure this script doesn't run via the webserver
|
15 | 31 | if( php_sapi_name() != 'cli' ) {
|
16 | 32 | echo "create_fake_db.php is not allowed to run through the webserver.\n ";
|
17 |
| - $logger->error("send_timesheet_emails.php is not allowed to run through the webserver."); |
| 33 | + $logger->error("create_fake_db.php is not allowed to run through the webserver."); |
18 | 34 | exit( 1 );
|
19 | 35 | }
|
20 | 36 |
|
| 37 | + $stprojId=73; // 73 =TachesAnnexes RSI_TMA_Sante // 24; |
| 38 | + $mgrId=2; // 37; |
| 39 | + $usrId=134; // 44 |
| 40 | + $lbayleId=2; |
| 41 | + $demoTeamId=20; //11; // RSI_TMA_Sante |
21 | 42 |
|
22 | 43 |
|
23 | 44 |
|
@@ -64,7 +85,7 @@ function create_fake_db($formattedFieldList) {
|
64 | 85 | updateProjects();
|
65 | 86 |
|
66 | 87 |
|
67 |
| - echo "- Clean issues...<br>"; flush(); |
| 88 | + echo "- Clean issues...\n"; flush(); |
68 | 89 | $j = 0;
|
69 | 90 |
|
70 | 91 | // all prj except SideTasksProjects (and externalTasksPrj)
|
@@ -113,7 +134,7 @@ function create_fake_db($formattedFieldList) {
|
113 | 134 | } // proj
|
114 | 135 |
|
115 | 136 | // commands
|
116 |
| - echo "- Clean commands...<br>"; flush(); |
| 137 | + echo "- Clean commands...\n"; flush(); |
117 | 138 | execQuery("UPDATE codev_command_table SET `reporter` = 'Joe the customer'");
|
118 | 139 | execQuery("UPDATE codev_command_table SET `description` = 'fake description...'");
|
119 | 140 |
|
@@ -159,11 +180,16 @@ function create_fake_db($formattedFieldList) {
|
159 | 180 |
|
160 | 181 |
|
161 | 182 | function updateUsers() {
|
162 |
| - echo "- Clean users...<br>"; flush(); |
| 183 | + echo "- Clean users...\n"; flush(); |
163 | 184 |
|
| 185 | + global $usrId; |
| 186 | + global $mgrId; |
| 187 | + global $lbayleId; |
| 188 | +/* |
164 | 189 | $mgrId=37;
|
165 | 190 | $usrId=41; // 44
|
166 | 191 | $lbayleId=2;
|
| 192 | + */ |
167 | 193 | $query = "SELECT id from `mantis_user_table` WHERE id NOT IN (1, $lbayleId, $mgrId, $usrId)"; // administrator, manager, lbayle, user1
|
168 | 194 | $result1 = execQuery($query);
|
169 | 195 | $i = 0;
|
@@ -206,12 +232,18 @@ function updateUsers() {
|
206 | 232 |
|
207 | 233 | function updateTeams() {
|
208 | 234 |
|
209 |
| - echo "- Clean teams...<br>"; flush(); |
210 |
| - |
| 235 | + echo "- Clean teams...\n"; flush(); |
| 236 | + |
| 237 | + global $mgrId; |
| 238 | + global $lbayleId; |
| 239 | + global $demoTeamId; |
| 240 | + global $stprojId; |
| 241 | + /* |
211 | 242 | $mgrId=37;
|
212 | 243 | $lbayleId=2;
|
213 | 244 | $demoTeamId=11;
|
214 | 245 | $stprojId=24;
|
| 246 | + */ |
215 | 247 |
|
216 | 248 | execQuery("UPDATE `codev_team_table` SET `leader_id` = '$lbayleId' ");
|
217 | 249 |
|
@@ -239,7 +271,7 @@ function updateTeams() {
|
239 | 271 |
|
240 | 272 | function updateProjects() {
|
241 | 273 |
|
242 |
| - echo "- Clean projects...<br>"; flush(); |
| 274 | + echo "- Clean projects...\n"; flush(); |
243 | 275 |
|
244 | 276 | $stprojId=24;
|
245 | 277 | $extprojId= Config::getInstance()->getValue(Config::id_externalTasksProject); // 3
|
@@ -291,5 +323,5 @@ function i18n() {
|
291 | 323 |
|
292 | 324 | create_fake_db($formattedFieldList);
|
293 | 325 |
|
294 |
| - echo "Done.<br>"; |
| 326 | + echo "Done.\n"; |
295 | 327 |
|
0 commit comments