Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit b0d2153

Browse files
committed
Merge branch 'release/4.2.0'
2 parents 583f8a1 + 8edc409 commit b0d2153

14 files changed

+252
-226
lines changed

inc/mantis.class.php

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,15 @@ static function updateTicket() {
320320
if (self::checkAllMantisBTStatus($list_ticket_mantis, $etat_mantis)) {
321321

322322
$info_solved = self::getInfoSolved($list_ticket_mantis);
323-
$item->fields['status'] = $itemType::SOLVED;
324-
$item->fields['solvedate'] = date("Y-m-d");
325-
$item->fields['solution'] = $info_solved;
326-
$item->fields['solutiontypes_id'] = $conf->getField('solutiontypes_id');
327-
$item->fields['users_id'] = $conf->getField('users_id');
328-
$item->update($item->fields);
329323

324+
$solution = new ITILSolution();
325+
$solution->add([
326+
'itemtype' => $item->getType(),
327+
'items_id' => $item->fields['id'],
328+
'solutiontypes_id' => $conf->getField('solutiontypes_id'),
329+
'content' => Toolbox::addslashes_deep($info_solved),
330+
'_from_mantis' => true,
331+
]);
330332
}
331333
}
332334
}
@@ -1044,4 +1046,20 @@ public static function getAllLinkBetweenGlpiAndMantis() {
10441046

10451047
return $DB->query("SELECT `glpi_plugin_mantis_mantis`.* FROM `glpi_plugin_mantis_mantis`");
10461048
}
1049+
1050+
/**
1051+
* Force solution user when solution comes from Mantis.
1052+
*
1053+
* @param ITILSolution $solution
1054+
*
1055+
* @return void
1056+
*/
1057+
public static function forceSolutionUserOnSolutionAdd(ITILSolution $solution) {
1058+
if (array_key_exists('_from_mantis', $solution->input) && $solution->input['_from_mantis']) {
1059+
$conf = new PluginMantisConfig();
1060+
$conf->getFromDB(1);
1061+
$solution->input['users_id'] = $conf->getField('users_id');
1062+
unset($solution->input['_from_mantis']);
1063+
}
1064+
}
10471065
}

locales/cs_CZ.mo

3 Bytes
Binary file not shown.

locales/cs_CZ.po

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-06-25 12:35+0000\n"
11+
"POT-Creation-Date: 2018-07-06 09:37+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>, 2018\n"
1414
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/teclib/teams/28042/cs_CZ/)\n"
@@ -28,7 +28,7 @@ msgstr "Hlášení neexistuje v MantisBT"
2828

2929
#: ajax/ajax.php:172 ajax/ajax.php:213
3030
msgid "This GLPi object is already linked to the selected MantisBT issue"
31-
msgstr "Tento GLPi objekt už s označeným MantisBT hlášením je propojen"
31+
msgstr "Tento GLPi objekt už je s označeným MantisBT hlášením propojen"
3232

3333
#: ajax/ajax.php:176 ajax/ajax.php:218
3434
msgid "This MantisBT issue is closed"
@@ -66,31 +66,31 @@ msgstr "Výchozí stav zaškrtávací kolonky"
6666
msgid "Forward document(s)"
6767
msgstr "Přeposlat dokumenty"
6868

69-
#: inc/userpref.class.php:130 inc/mantis.class.php:686
69+
#: inc/userpref.class.php:130 inc/mantis.class.php:688
7070
msgid "Forward ticket followup"
7171
msgstr "Přeposlat komunikaci navazující na požadavek"
7272

73-
#: inc/userpref.class.php:136 inc/mantis.class.php:694
73+
#: inc/userpref.class.php:136 inc/mantis.class.php:696
7474
msgid "Forward ticket tasks"
7575
msgstr "Přeposlat úkoly plynoucí z požadavku"
7676

77-
#: inc/userpref.class.php:142 inc/mantis.class.php:701
78-
#: inc/mantis.class.php:847
77+
#: inc/userpref.class.php:142 inc/mantis.class.php:703
78+
#: inc/mantis.class.php:849
7979
msgid "Forward title"
8080
msgstr "Přeposlat nadpis"
8181

82-
#: inc/userpref.class.php:148 inc/mantis.class.php:707
83-
#: inc/mantis.class.php:853
82+
#: inc/userpref.class.php:148 inc/mantis.class.php:709
83+
#: inc/mantis.class.php:855
8484
msgid "Forward description"
8585
msgstr "Přeposlat popis"
8686

87-
#: inc/userpref.class.php:154 inc/mantis.class.php:713
88-
#: inc/mantis.class.php:859
87+
#: inc/userpref.class.php:154 inc/mantis.class.php:715
88+
#: inc/mantis.class.php:861
8989
msgid "Forward category"
9090
msgstr "Přeposlat kategorii"
9191

92-
#: inc/userpref.class.php:160 inc/mantis.class.php:720
93-
#: inc/mantis.class.php:866
92+
#: inc/userpref.class.php:160 inc/mantis.class.php:722
93+
#: inc/mantis.class.php:868
9494
msgid "Forward linked tickets"
9595
msgstr "Přeposlat propojené požadavky"
9696

@@ -147,7 +147,7 @@ msgstr "Typ přílohy přenášené do MantisBT"
147147
msgid "MantisBT field for GLPI fields"
148148
msgstr "Kolonky v MantisBT pro kolonky z GLPi"
149149

150-
#: inc/config.class.php:184 inc/mantis.class.php:667 inc/mantis.class.php:792
150+
#: inc/config.class.php:184 inc/mantis.class.php:669 inc/mantis.class.php:794
151151
msgid "MantisBT field for the link URL to the GLPi object"
152152
msgstr "Kolonka v MantisBT pro URL odkazu na GLPi objekt"
153153

@@ -167,7 +167,7 @@ msgstr "GLPi uživatel který řeší požadavek?"
167167
msgid "Test the connection"
168168
msgstr "Vyzkoušet spojení"
169169

170-
#: inc/mantis.class.php:178 setup.php:84
170+
#: inc/mantis.class.php:178 setup.php:88
171171
msgid "MantisBT synchronization"
172172
msgstr "Synchronizace s MantisBT"
173173

@@ -205,99 +205,99 @@ msgstr "GLPi soubor [%1$s] už v MantisBT hlášení existuje."
205205
msgid "GLPi object [%1$s:%2$s] is already solved or closed."
206206
msgstr "GLPi objekt [%1$s:%2$s] už je vyřešený nebo uzavřený."
207207

208-
#: inc/mantis.class.php:334
208+
#: inc/mantis.class.php:336
209209
msgid "Plugin configuration is not correct (MantisBT status is missing)"
210210
msgstr "Nastavení zásuvného modulu není správné (chybí stav v MantisBT)"
211211

212-
#: inc/mantis.class.php:509
212+
#: inc/mantis.class.php:511
213213
msgid "Plugin configuration is not correct (connection error)."
214214
msgstr "Nastavení zásuvného modulu není správné (chyba spojení)."
215215

216-
#: inc/mantis.class.php:543 inc/mantis.class.php:563
216+
#: inc/mantis.class.php:545 inc/mantis.class.php:565
217217
msgid "Link to an existing MantisBT issue"
218218
msgstr "Propojit s existujícím hlášením v MantisBT"
219219

220-
#: inc/mantis.class.php:552 inc/mantis.class.php:568 inc/mantis.class.php:765
220+
#: inc/mantis.class.php:554 inc/mantis.class.php:570 inc/mantis.class.php:767
221221
msgid "Create a new MantisBT issue"
222222
msgstr "Vytvořit nové hlášení v MantisBT"
223223

224-
#: inc/mantis.class.php:558
224+
#: inc/mantis.class.php:560
225225
msgid "MantisBT actions"
226226
msgstr "Akce s MantisBT"
227227

228-
#: inc/mantis.class.php:596
228+
#: inc/mantis.class.php:598
229229
msgid "What do you want to do ?"
230230
msgstr "Co chcete udělat?"
231231

232-
#: inc/mantis.class.php:600
232+
#: inc/mantis.class.php:602
233233
msgid "Only delete link between GLPi object AND MantisBT issue."
234234
msgstr "Pouze smazat propojení mezi GLPi objektem a hlášením v MantisBT."
235235

236-
#: inc/mantis.class.php:606
236+
#: inc/mantis.class.php:608
237237
msgid "Force delete MantisBT issue (and GLPi object link)."
238238
msgstr "Vynutit smazání hlášení v MantisBT (a propojení na GLPi objekt)."
239239

240-
#: inc/mantis.class.php:649
240+
#: inc/mantis.class.php:651
241241
msgid "Link to an existing MantisBT issue."
242242
msgstr "Propojit s existujícím hlášením v MantisBT."
243243

244-
#: inc/mantis.class.php:652
244+
#: inc/mantis.class.php:654
245245
msgid "Id of MantisBT issue"
246246
msgstr "Identifikátor hlášení v MantisBT"
247247

248-
#: inc/mantis.class.php:655
248+
#: inc/mantis.class.php:657
249249
msgid "Click to load issue from MantisBT"
250250
msgstr "Kliknutím načtěte hlášení z MantisBT"
251251

252-
#: inc/mantis.class.php:660 inc/mantis.class.php:785
252+
#: inc/mantis.class.php:662 inc/mantis.class.php:787
253253
msgid "MantisBT field for GLPi fields"
254254
msgstr "Kolonky v MantisBT pro ty z GLPi"
255255

256-
#: inc/mantis.class.php:675 inc/mantis.class.php:821
256+
#: inc/mantis.class.php:677 inc/mantis.class.php:823
257257
msgid "Attachments"
258258
msgstr "Přílohy"
259259

260-
#: inc/mantis.class.php:678 inc/mantis.class.php:824
260+
#: inc/mantis.class.php:680 inc/mantis.class.php:826
261261
msgid "Forward attachments"
262262
msgstr "Přeposlat přílohy"
263263

264-
#: inc/mantis.class.php:768
264+
#: inc/mantis.class.php:770
265265
msgid "Exact MantisBT project name"
266266
msgstr "Přesný název projektu v MantisBT"
267267

268-
#: inc/mantis.class.php:773
268+
#: inc/mantis.class.php:775
269269
msgid "Click to load project from MantisBT"
270270
msgstr "Kliknutím načtěte projekt z MantisBT"
271271

272-
#: inc/mantis.class.php:816
272+
#: inc/mantis.class.php:818
273273
msgid "Steps to reproduce"
274274
msgstr "Kroky vedoucí k zopakování"
275275

276-
#: inc/mantis.class.php:832
276+
#: inc/mantis.class.php:834
277277
msgid "Forward followups"
278278
msgstr "Přeposlat následnou komunikaci"
279279

280-
#: inc/mantis.class.php:840
280+
#: inc/mantis.class.php:842
281281
msgid "Forward tasks"
282282
msgstr "Přeposlat úkoly"
283283

284-
#: inc/mantis.class.php:871
284+
#: inc/mantis.class.php:873
285285
msgid "Link"
286286
msgstr "Odkaz"
287287

288-
#: inc/mantis.class.php:912
288+
#: inc/mantis.class.php:914
289289
msgid "List of linked MantisBT issues"
290290
msgstr "Seznam odkazovaných hlášení v MantisBT"
291291

292-
#: inc/mantis.class.php:957
292+
#: inc/mantis.class.php:959
293293
msgid "Error when loading MantisBT issue"
294294
msgstr "Chyba při načítání hlášení z MantisBT"
295295

296-
#: inc/mantis.class.php:988
296+
#: inc/mantis.class.php:990
297297
msgid "This GLPi object is not linked to MantisBT"
298298
msgstr "Tento GLPi objekt není propojen s MantisBT"
299299

300-
#: inc/mantis.class.php:994
300+
#: inc/mantis.class.php:996
301301
msgid "Escalation to MantisBT is neutralized by GLPi status"
302302
msgstr "Eskalace do MantisBT je neutralizována stavem v GLPi"
303303

@@ -358,7 +358,7 @@ msgstr "Chyba při hledání MantisBT požadavku „%1$s“ => „%2$s“"
358358
#, php-format
359359
msgid "Error retrieving the id of the project by it's name '%1$s' => '%2$s'"
360360
msgstr ""
361-
"Chyba při získávání identifikátoru projekty pomocí jeho názvu „%1$s“ => "
361+
"Chyba při získávání identifikátoru projektu pomocí jeho názvu „%1$s“ => "
362362
"„%2$s“"
363363

364364
#: inc/mantisws.class.php:362
@@ -459,7 +459,7 @@ msgstr ""
459459

460460
#: inc/issue.class.php:883
461461
msgid "No follow-up"
462-
msgstr "Žádná následná komunikace"
462+
msgstr "Žádná doplňující komunikace"
463463

464464
#: inc/issue.class.php:918
465465
#, php-format

locales/en_GB.mo

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)