\unikent\FootprintsTicket

A Footprints Ticket object.

Examples

Standard Ticket Example.

<?php
/**
 * Footprints API for is-dev applications.
 * Note: This relies on the internal API maintained by Operations.
 */

require_once("vendor/autoload.php");

$ticket = new \unikent\Footprints\Ticket("My Example Ticket");
$ticket->set_emails(false, false, false);
$ticket->set_priority("Normal");
$ticket->set_user("sk");
$ticket->set_type("Incident");
$ticket->set_category("Web");
$ticket->add_assignees(array(
    "Learning and Research Systems",
    "sk"
));

$ticket->add_entry("We did this cool thing the other day!");
$ticket->add_technical_note("Something is broken.");
$ticket->add_entry("Oh, it isnt working.");
$ticket->add_technical_note("Hah it was that function I wrote a long time ago.");
$ticket->add_entry("Fixed!");

$ticket->set_status("Resolved");

echo $ticket->create();

Standard Ticket Example with asynchronous creation.

<?php
/**
 * Footprints API for is-dev applications.
 * Note: This relies on the internal API maintained by Operations.
 */

require_once("vendor/autoload.php");

$ticket = new \unikent\Footprints\Ticket("My Example Ticket");
$ticket->set_emails(false, false, false);
$ticket->set_priority("Normal");
$ticket->set_user("sk");
$ticket->set_type("Incident");
$ticket->set_category("Web");
$ticket->add_assignees(array(
    "Learning and Research Systems",
    "sk"
));

$ticket->add_entry("We did this cool thing the other day!");
$ticket->add_entry("Oh, it isnt working.");
$ticket->add_entry("Fixed!");

$ticket->set_status("Resolved");

echo $ticket->create_async();

Summary

Methods
Properties
Constants
get_workspaces()
get_priorities()
get_statuses()
get_types()
get_categories()
set_title()
set_user()
add_technical_note()
add_assignee()
add_assignees()
add_cc()
add_ccs()
add_entry()
set_priority()
set_status()
set_type()
set_category()
set_emails()
add_ci_link()
add_server_link()
add_ticket_link()
add_change_request_link()
get_footprints_entry()
create()
create_async()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_workspaces()

get_workspaces() 

Returns a list of valid workspaces.

get_priorities()

get_priorities() 

Returns a list of valid priorities.

get_statuses()

get_statuses() 

Returns a list of valid statuses.

get_types()

get_types() 

Returns a list of valid ticket types.

get_categories()

get_categories() 

Returns a list of valid ticket categories.

set_title()

set_title(string  $title) 

Set the ticket title.

Parameters

string $title

The title of the ticket.

set_user()

set_user(string  $username) 

Set the ticket's user.

Parameters

string $username

The username of the user.

add_technical_note()

add_technical_note(string  $note) 

Add a technical note to the ticket.

Parameters

string $note

The note.

add_assignee()

add_assignee(array  $assignee) 

Add an assignee to the ticket.

Parameters

array $assignee

The username of the user or the name of the team.

add_assignees()

add_assignees(string|array  $assignees) 

Add assignees to the ticket.

Parameters

string|array $assignees

The username(s) of the user or the name(s) of the team(s).

add_cc()

add_cc(string  $cc, boolean  $permanent = true) 

Add a CC to the ticket.

Parameters

string $cc

The username (or the email) of the recipient.

boolean $permanent

Is the CC permanent or just for this update?

add_ccs()

add_ccs(string|array  $ccs, boolean  $permanent = true) 

Add CCs to the ticket.

Parameters

string|array $ccs

The username (or the email) of the recipient.

boolean $permanent

Is the CC permanent or just for this update?

add_entry()

add_entry(string  $contents) 

Add an entry (description) to this ticket.

Parameters

string $contents

The contents of this entry.

set_priority()

set_priority(string  $priority) 

Set ticket priority.

Parameters

string $priority

The priority of the ticket.

set_status()

set_status(string  $status) 

Set ticket status.

Parameters

string $status

The status of the ticket.

set_type()

set_type(string  $type) 

Set ticket type.

Parameters

string $type

The type of the ticket.

set_category()

set_category(string  $category) 

Set ticket category.

Parameters

string $category

The category of the ticket.

set_emails()

set_emails(boolean  $assignees = true, boolean  $contact = true, boolean  $cc = true) 

Who should be emailed about this ticket? Note: Footprints emails assignees anyway.

But maybe the bug will be fixed one day!

Parameters

boolean $assignees

Should assignees be emailed?

boolean $contact

Should contacts be emailed?

boolean $cc

Should cc'd addresses be emailed?

add_ci_link()

add_ci_link(string|array  $type, string|array  $name) 

Link to an object in the CMDB.

Parameters

string|array $type

The type(s) of the link.

string|array $name

The name(s) of the link.

add_server_link()

add_server_link(string|array  $hostname) 

Short-hand to link the ticket to a server.

Parameters

string|array $hostname

The hostname of the server, or an array of hostnames.

add_ticket_link()

add_ticket_link(string  $number, string  $workspace = 2) 

Link the ticket to another ticket.

Parameters

string $number

The number of the ticket.

string $workspace

The workspace of the ticket.

add_change_request_link()

add_change_request_link(string  $number) 

Link the ticket to a CR.

Parameters

string $number

The number of the ticket.

get_footprints_entry()

get_footprints_entry() 

Coalesces everything into a Footprints object.

create()

create() : string

Send the ticket to FP!

Returns

string —

Footprints ticket number, or an error.

create_async()

create_async() 

Send ticket asynchronously.