-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
362 changed files
with
5,475 additions
and
1,566 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
db/migrations/20241204154709_renamefieldruleactions_migration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace | ||
|
||
use Phinx\Migration\AbstractMigration; | ||
use Phinx\Migration\Manager\Environment; | ||
use Phinx\Config\Config; | ||
use App\v1\Controllers\Toolbox; | ||
use Phinx\Db\Adapter\MysqlAdapter; | ||
|
||
final class RenamefieldruleactionsMigration extends AbstractMigration | ||
{ | ||
public function change(): void | ||
{ | ||
|
||
// ruleactions field mapping | ||
$mapping = [ | ||
'entities_id' => 'entity', | ||
'locations_id' => 'location', | ||
'_groups_id_assign' => 'techniciangroup', | ||
'_groups_id_requester' => 'requestergroup', | ||
'_users_id_observer' => 'watcher', | ||
'itilcategories_id' => 'category', | ||
// olas_id_ttr => | ||
// slas_id_ttr => | ||
// slas_id_tto => | ||
'_groups_id_observer' => 'watchergroup', | ||
'_users_id_requester' => 'requester', | ||
]; | ||
|
||
$builderSelect = $this->getQueryBuilder('select'); | ||
$statement = $builderSelect | ||
->select('*') | ||
->from('ruleactions') | ||
->execute(); | ||
$items = $statement->fetchAll('assoc'); | ||
foreach ($items as $item) | ||
{ | ||
if (isset($mapping[$item['field']])) | ||
{ | ||
$builderUpdate = $this->getQueryBuilder('update'); | ||
$builderUpdate | ||
->update('ruleactions') | ||
->set('field', $mapping[$item['field']]) | ||
->where(['id' => $item['id']]) | ||
->execute(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: API Fusion Resolve IT | ||
version: '1.0' | ||
servers: | ||
- url: https://recette.fusionresolveit.org/jit | ||
components: | ||
securitySchemes: | ||
tokenauth: | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT | ||
cookieauth: | ||
type: apiKey | ||
in: cookie | ||
name: token | ||
paths: | ||
/view/dropdown/rule/criteria: | ||
get: | ||
description: '' | ||
parameters: | ||
- name: q | ||
in: query | ||
description: string to filter, can be empty | ||
required: true | ||
schema: | ||
type: string | ||
- name: itemtype | ||
in: query | ||
description: Itemtype of data to get | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: OK | ||
security: | ||
- cookieauth: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.