Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Trello Ticket left-overs #559

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 0 additions & 84 deletions docs/.public/openapi/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6238,90 +6238,6 @@
},
"response": []
},
{
"name": "GET api\/ticket-settings",
"request": {
"url": {
"host": "{{baseUrl}}",
"path": "api\/ticket-settings",
"query": [],
"raw": "{{baseUrl}}\/api\/ticket-settings"
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application\/json"
},
{
"key": "Accept",
"value": "application\/json"
}
],
"body": null,
"description": "",
"auth": {
"type": "noauth"
}
},
"response": [
{
"header": [
{
"key": "cache-control",
"value": "no-cache, private"
},
{
"key": "content-type",
"value": "application\/json"
},
{
"key": "access-control-allow-origin",
"value": "*"
}
],
"code": 500,
"body": "{\n \"message\": \"Server Error\"\n}",
"name": ""
}
]
},
{
"name": "PUT api\/ticket-settings\/{ticketSettings}",
"request": {
"url": {
"host": "{{baseUrl}}",
"path": "api\/ticket-settings\/:ticketSettings",
"query": [],
"raw": "{{baseUrl}}\/api\/ticket-settings\/:ticketSettings",
"variable": [
{
"id": "ticketSettings",
"key": "ticketSettings",
"value": "a",
"description": ""
}
]
},
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application\/json"
},
{
"key": "Accept",
"value": "application\/json"
}
],
"body": null,
"description": "",
"auth": {
"type": "noauth"
}
},
"response": []
},
{
"name": "GET api\/settings\/main",
"request": {
Expand Down
41 changes: 0 additions & 41 deletions docs/.public/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5288,47 +5288,6 @@ paths:
required: true
schema:
type: string
/api/ticket-settings:
get:
summary: ''
operationId: getApiTicketSettings
description: ''
parameters: []
responses:
500:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'Server Error'
properties:
message:
type: string
example: 'Server Error'
tags:
- Endpoints
security: []
'/api/ticket-settings/{ticketSettings}':
put:
summary: ''
operationId: putApiTicketSettingsTicketSettings
description: ''
parameters: []
responses: { }
tags:
- Endpoints
security: []
parameters:
-
in: path
name: ticketSettings
description: ''
example: a
required: true
schema:
type: string
/api/settings/main:
get:
summary: ''
Expand Down
5 changes: 0 additions & 5 deletions src/backend/app/Exceptions/TrelloAPIException.php

This file was deleted.

8 changes: 1 addition & 7 deletions src/backend/app/Http/Controllers/AgentTicketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,14 @@
use Inensus\Ticket\Services\TicketUserService;

class AgentTicketController extends Controller {
private $board;
private $card;

public function __construct(
private AgentTicketService $agentTicketService,
private PersonTicketService $personTicketService,
private AgentService $agentService,
private TicketService $ticketService,
private PersonService $personService,
private TicketUserService $ticketUserService,
) {
// $this->board = $this->boardService->initializeBoard($this->ticketUserService);
// $this->card = $this->cardService->initalizeList($this->board);
}
) {}

public function index(Request $request): ApiResource {
$agent = $this->agentService->getByAuthenticatedUser();
Expand Down
31 changes: 0 additions & 31 deletions src/backend/app/Http/Controllers/TicketSettingsController.php

This file was deleted.

1 change: 0 additions & 1 deletion src/backend/database/factories/TicketFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class TicketFactory extends Factory {
*/
public function definition() {
return [
'ticket_id' => strval($this->faker->uuid),
'creator_id' => $this->faker->numberBetween(1, 10),
'creator_type' => $this->faker->randomElement(['user', 'agent']),
'assigned_id' => $this->faker->numberBetween(1, 10),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php

use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
Expand All @@ -21,15 +19,6 @@ public function up() {
$table->string('api_key');
$table->timestamps();
});

DB::connection('tenant')->table('ticket_settings')->insert([
'name' => 'Trello',
'api_token' => '----',
'api_url' => 'https://api.trello.com/1',
'api_key' => '----',
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
]);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::connection('tenant')->dropIfExists('ticket_settings');
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::connection('tenant')->create('ticket_settings', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('api_token');
$table->string('api_url');
$table->string('api_key');
$table->timestamps();
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::connection('tenant')->table('tickets', function (Blueprint $table) {
$table->dropColumn('ticket_id');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::connection('tenant')->table('tickets', function (Blueprint $table) {
$table->string('ticket_id');
});
}
};
2 changes: 0 additions & 2 deletions src/backend/database/seeders/TicketSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Illuminate\Console\View\Components\Info;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Inensus\Ticket\Models\TicketCategory;
use MPM\DatabaseProxy\DatabaseProxyManagerService;

Expand Down Expand Up @@ -169,7 +168,6 @@ private function generateTicket() {
$status = rand(0, 1);

$ticket = (new TicketFactory())->make([
'ticket_id' => Str::random(10),
'creator_type' => 'admin',
'creator_id' => $randomCreator->id,
'status' => $status,
Expand Down
Loading
Loading