Jump to content

GM ticket assigning


Guest laise

Recommended Posts

attempt to add ticket assigning - can be by name and/or by security level

code:

http://paste2.org/p/964587

sql

delete from `command` where `name` in ('delticket', 'ticket');
insert into `command` (`name`, `security`, `help`) values('delticket','2','Syntax: .delticket all\\r\\n        .delticket #num\\r\\n        .delticket $character_name\\r\\n    .delticket a #num\\rall to dalete all tickets at server, $character_name to delete ticket of this character, #num to delete ticket #num.');
insert into `command` (`name`, `security`, `help`) values('ticket','2','Syntax: .ticket on\\r\\n        .ticket off\\r\\n        .ticket #num\\r\\n        .ticket $character_name\\r\\n    .ticket a #num\\r\\n    .ticket assign $character_name #guid or #num GMLevel\\r\\n    .ticket assign $character_name del\\r\\non/off for GMs to show or not a new ticket directly, $character_name to show ticket of this character, #num to show ticket #num, \\'a\\' to get assigned ticket #num, assign to assign a ticket.');
delete from `mangos_string` where `entry` in ('290', '10000');
insert into `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) values('290','Ticket of %s (Last updated: %s) assigned to: %s , GMLevel: %u :\\n%s ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
insert into `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) values('10000','|cffff0000You have %i assigned tickets|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

sql on characters scheme

ALTER TABLE `character_ticket`     ADD COLUMN `assigned_guid` INT(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `ticket_lastchange`,     ADD COLUMN `assigned_sec_level` TINYINT(3) DEFAULT '0' NOT NULL AFTER `assigned_guid`;

.ticket a #num - will get assigned ticket by number (number in queue is different then normal ticket number)

.ticket a $character_name - will work like normal ticket

.ticket assign $character_name $assign_to_name and/or #level - will assign ticket from player to chosen char with name or to everyone with chosen sec level (note you can assign to non gm character by name but it won't announce to him about ticket - maybe later will add a check)

.ticket assign $character_name del - will delete all assignment on ticket

.delticket a #num - will delete assigned ticket with number

Link to comment
Share on other sites

Looks really cool, maybe you can finish the work that was made for GM Surveys? On retail after a ticket is closed a "You have been chosen to fill out a survey" appears and allows you to fill one out, would be really cool for feedback. I remember seeing some code work done on it in GMTicketHandler.cpp. Also when you assign a ticket to a higher level, could the status of the ticket change to "Your ticket has been escalated" I know all those exist on retail.

Link to comment
Share on other sites

  • 6 months later...

@laise:

Thanks , works like charm!

Maybe an additional option to assign tickets not only per name but also per number would be fine, like: .ticket assign 1 GM_NAME? =)

@fdb_:

I wrote a patch to close tickets instead of deleting them, so tickets stay in your database:

http://paste2.org/p/969283 (it is tested and works fine)

if you now add assigning ticket to gm before closing, it would be the result you wanted =)

Link to comment
Share on other sites

The following is a try to revamp the old ticket engine in a new fashion manner.

It is deeply inspired by laise and Janu work.

Let's go with some specs:

In game commands:

Deleting tickets:

.ticket del all $Char_name (Delete all the tickets created by $Char_name)

.ticket del all (Delete all the tickets in the database !!!)

.ticket del all opened (Delete all open tickets)

.ticket del all closed (Delete all closed tickets)

.ticket del $Ticket_id (Delete ticket $Ticket_id)

.ticket del before $date (Delete tickets before the given date...)

Used to clean the ticket from database.

Delete a ticket (or many tickets) without checking their status, neither if they are assigned.

Deleting tickets commands should be configured as level 3.

Special behaviour:

When the GM select a player, .ticket del all will delete all the tickets opened by this player (including opened/closed/pending tickets)

Closing tickets:

.ticket close all $Char_name (Close all the tickets opened by $Char_name)

.ticket close all (Close all the tickets opened)

.ticket close $Ticket_id (Close the ticket $Ticket_id)

.ticket close $Ticket_id $Reason (Close the ticket $Ticket_id with $Reason)

Closing a ticket (or many tickets) will flag the ticket as closed, without deleting it from the database.

A GM can only close the tickets that are assigned to him or assigned to GM's with lower access rights.

Only assigned tickets can be closed.

Example:

GM_lvl3 can close all the tickets opened by the player JDoe (command: ".ticket close all JDoe") even if the tickets are handled by different GM (GM_lvl1_A and GM_lvl1_B ), but GM_lvl1_A using the same command (".ticket close all JDoe") will result in only closing the tickets he is handling.

Same behavior applies to every commands.

Assigning tickets:

.ticket assign (Assign the current tickets of the selected player to the GM who is writing this command)

.ticket assign $Ticket_id (Assign the $Ticket_id to the GM who is writing the command)

.ticket assign $Ticket_id $GM_Name (Assign the $Ticket_id to $GM_Name)

.ticket assign level $Ticket_Id $level (Set the ticket to be handled by a $level GM)

.ticket assign level $Ticket_Id $level $Reason (Set the ticket to be handled by a $level GM with $Reason)

A GM assigns the tickets with those commands.

A GM can assign a ticket to himself or to lower level GM only.

Requeing tickets:

.ticket requeue $Ticket_id (Requeue the ticket $Ticket_id)

.ticket requeue $Ticket_id $Reason (Requeue the ticket $Ticket_id with $Reason)

Tickets history:

.ticket history $Ticket_id (Show the ticket history)

Basically unassign the ticket.

Additional information:

- Every command should check the GM level to avoid assiging/closing/requeuing/deleting tickets that are handled by higher level GM's.

- $Reason field can be handled as an history field, text format can be discussed later (something like :timestamp: text msg\\n\\r:timestamp: msg2....).

Update of this field occurs:

-- when an escalation is requested,

-- when a requeue is requested,

-- when the ticket is closed.

- The use of SOAP can help to handle almost all the ticketing system from an external adm website.

This is a pretty complete ticket system.

Development start: on-hold.

Due date: to be defined.

If this project has a dev planned I will make a dedicated thread.

Any comments are welcome.

Link to comment
Share on other sites

  • 1 month later...

well going with new ticket system i think database structure should be something like this

id

parent

player

map

x

y

z

category

gm (?)

status

ticket

responce(1-4)

for completly new tickets parent is 0 else it is the id of the previous ticket.

WorldPacket data( SMSG_GMTICKET_GETTICKET, (4+len+1+4+2+4+4) );
data << uint32(status); // standard 0x0A, 0x06 if text present
   if (status == 6)
   {
       data << uint32(123); // unk
       data << (ticket ? ticket->GetText() : ""); // ticket text
       data << uint8(0x7); // ticket category
       data << float(0); // tickets in queue?
       data << float(0); // if > "tickets in queue" then "We are currently experiencing a high volume of petitions."
       data << float(0); // 0 - "Your ticket will be serviced soon", 1 - "Wait time currently unavailable"
       data << uint8(0); // if == 2 and next field == 1 then "Your ticket has been escalated"
       data << uint8(0); // const
   }

i think in packet first could be ticket id. and second to last status.

WorldPacket data(SMSG_GMRESPONSE_RECEIVED, 4+4+len+1+1+1);
   data << uint32(123);
   data << uint32(456);
   data << ticket->GetText(); // issue text
   data << ticket->GetResponse(); // response text 1
   data << uint8(0); // response text 2
   data << uint8(0); // response text 3
   data << uint8(0); // response text 4

recv_data >> map >> x >> y >> z; // last check 2.4.3
   recv_data >> ticketText;
   recv_data.read_skip<uint32>(); // unk1, 11 - talk to gm, 1 - report problem
   recv_data >> isFollowup; // unk2, 1 - followup ticket
   recv_data.read_skip<uint32>(); // unk3, 0
   recv_data.read_skip<uint32>(); // unk4, 0

first read_skip would be category, no?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use