Change class. More...

List of all members.

Public Member Functions

 canAdminActors ()
 canAssign ()
 canAssignToMe ()
 canSolve ()
 canViewItem ()
 Is the current user have right to show the current change ?
 canApprove ()
 Is the current user have right to approve solution of the current change ?
 canCreateItem ()
 Is the current user have right to create the current change ?
 pre_deleteItem ()
 Actions done before the DELETE of the item in the database / Maybe used to add another check for deletion.
 getTabNameForItem (CommonGLPI $item, $withtemplate=0)
 Get Tab Name used for itemtype.
 defineTabs ($options=array())
 Define tabs to display.
 cleanDBonPurge ()
 Actions done when item is deleted from the database.
 prepareInputForUpdate ($input)
 Prepare input datas for updating the item.
 pre_updateInDB ()
 Actions done before the UPDATE of the item in the database.
 post_updateItem ($history=1)
 Actions done after the UPDATE of the item in the database.
 prepareInputForAdd ($input)
 Prepare input datas for adding the item.
 post_addItem ()
 Actions done after the ADD of the item in the database.
 getSearchOptions ()
 Get the Search options for the given Type.
 showForm ($ID, $options=array())
 showAnalysisForm ()
 Form to add an analysis to a change.
 showPlanForm ()
 Form to add an analysis to a change.

Static Public Member Functions

static getTypeName ($nb=0)
 Name of the type.
static canCreate ()
 Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)
static canView ()
 Have I the global right to "view" the Object.
static displayTabContentForItem (CommonGLPI $item, $tabnum=1, $withtemplate=0)
 show Tab content
static getDefaultSearchRequest ()
 Get default values to search engine to override.
static getAllStatusArray ($withmetaforsearch=false)
 get the change status list To be overridden by class
static getClosedStatusArray ()
 Get the ITIL object closed status list To be overridden by class.
static getSolvedStatusArray ()
 Get the ITIL object solved or observe status list To be overridden by class.
static getNewStatusArray ()
 Get the ITIL object new status list.
static getProcessStatusArray ()
 Get the ITIL object test, qualification or accepted status list To be overridden by class.

Public Attributes

 $dohistory = true
 Make an history of the changes.
 $userlinkclass = 'Change_User'
 $grouplinkclass = 'Change_Group'
 $supplierlinkclass = 'Change_Supplier'
const MATRIX_FIELD = 'priority_matrix'
const URGENCY_MASK_FIELD = 'urgency_mask'
const IMPACT_MASK_FIELD = 'impact_mask'
const STATUS_MATRIX_FIELD = 'change_status'

Detailed Description

Change class.

Definition at line 39 of file change.class.php.


Member Function Documentation

Reimplemented from CommonITILObject.

Definition at line 66 of file change.class.php.

References haveRight().

Is the current user have right to approve solution of the current change ?

Returns:
boolean

Definition at line 136 of file change.class.php.

References $_SESSION, Session\getLoginUserID(), CommonITILObject\haveAGroup(), CommonITILObject\isUser(), and CommonITILActor\REQUESTER.

canAssign ( )

Reimplemented from CommonITILObject.

Definition at line 71 of file change.class.php.

References haveRight().

Definition at line 76 of file change.class.php.

References haveRight().

static canCreate ( ) [static]

Have I the global right to "create" the Object May be overloaded if needed (ex KnowbaseItem)

Returns:
booleen

Reimplemented from CommonDBTM.

Definition at line 95 of file change.class.php.

References haveRight().

Is the current user have right to create the current change ?

Returns:
boolean

Reimplemented from CommonDBTM.

Definition at line 150 of file change.class.php.

References CommonDBTM\getEntityID(), Session\haveAccessToEntity(), and haveRight().

static canView ( ) [static]

Have I the global right to "view" the Object.

Default is true and check entity if the objet is entity assign

May be overloaded if needed

Returns:
booleen

Reimplemented from CommonDBTM.

Definition at line 100 of file change.class.php.

References Session\haveRight().

Actions done when item is deleted from the database.

Returns:
nothing

TODO uncomment when changetask OK

Reimplemented from CommonITILObject.

Definition at line 247 of file change.class.php.

References $DB.

defineTabs ( options = array())

Define tabs to display.

NB : Only called for existing object

Parameters:
$optionsarray
  • withtemplate is a template view ?
Returns:
array containing the onglets

TODO add stats

Reimplemented from CommonGLPI.

Definition at line 229 of file change.class.php.

References $options, CommonGLPI\addStandardTab(), and getTypeName().

static displayTabContentForItem ( CommonGLPI item,
tabnum = 1,
withtemplate = 0 
) [static]

show Tab content

Since:
version 0.83
Parameters:
$itemCommonGLPI object for which the tab need to be displayed
$tabnuminteger tab number (default 1)
$withtemplateboolean is a template object ? (default 0)
Returns:
true

Reimplemented from CommonGLPI.

Definition at line 195 of file change.class.php.

References $_POST, CommonGLPI\getType(), Change_Problem\showForProblem(), and Change_Ticket\showForTicket().

static getAllStatusArray ( withmetaforsearch = false) [static]

get the change status list To be overridden by class

Parameters:
$withmetaforsearchboolean (default false)
Returns:
an array

TODO to be done : try to keep closed. Is abandonned usable ? TODO define standard function to check solved / closed status

Reimplemented from CommonITILObject.

Definition at line 592 of file change.class.php.

References __(), and _x().

Referenced by Profile\showFormLifeCycle().

static getClosedStatusArray ( ) [static]

Get the ITIL object closed status list To be overridden by class.

Since:
version 0.83
Returns:
an array

Reimplemented from CommonITILObject.

Definition at line 634 of file change.class.php.

Referenced by canSolve().

static getDefaultSearchRequest ( ) [static]

Get default values to search engine to override.

Definition at line 374 of file change.class.php.

static getNewStatusArray ( ) [static]

Get the ITIL object new status list.

Since:
version 0.83.8
Returns:
an array

Reimplemented from CommonITILObject.

Definition at line 663 of file change.class.php.

static getProcessStatusArray ( ) [static]

Get the ITIL object test, qualification or accepted status list To be overridden by class.

Since:
version 0.83
Returns:
an array

Definition at line 675 of file change.class.php.

Get the Search options for the given Type.

This should be overloaded in Class

Returns:
an array of search options More information on https://forge.indepnet.net/wiki/glpi/SearchEngine

TODO define when task created

Reimplemented from CommonDBTM.

Definition at line 386 of file change.class.php.

References __(), _n(), CommonITILObject\getSearchOptionsActors(), and CommonDBTM\getTable().

static getSolvedStatusArray ( ) [static]

Get the ITIL object solved or observe status list To be overridden by class.

Since:
version 0.83
Returns:
an array

Reimplemented from CommonITILObject.

Definition at line 650 of file change.class.php.

getTabNameForItem ( CommonGLPI item,
withtemplate = 0 
)

Get Tab Name used for itemtype.

NB : Only called for existing object Must check right on what will be displayed + template

Since:
version 0.83
Parameters:
$itemCommonDBTM object for which the tab need to be displayed
$withtemplateboolean is a template object ? (default 0)
Returns:
string tab name

Reimplemented from CommonGLPI.

Definition at line 166 of file change.class.php.

References $_SESSION, $nb, __(), countElementsInTable(), CommonGLPI\createTabEntry(), and CommonGLPI\getType().

static getTypeName ( nb = 0) [static]

Name of the type.

Parameters:
$nb: number of item in the type (default 0)

Reimplemented from CommonGLPI.

Definition at line 61 of file change.class.php.

References $nb, and _n().

Referenced by defineTabs(), Change_Ticket\showForChange(), and Change_Problem\showForChange().

Actions done after the ADD of the item in the database.

Returns:
nothing

TODO add linked tickets and linked hardware (to problem and tickets) create standard function

Reimplemented from CommonITILObject.

Definition at line 323 of file change.class.php.

References $CFG_GLPI, $problem, $ticket, CommonGLPI\$type, CommonDBTM\getFromDB(), and NotificationEvent\raiseEvent().

post_updateItem ( history = 1)

Actions done after the UPDATE of the item in the database.

Parameters:
$historystore changes history ? (default 1)
Returns:
nothing

TODO auto solve tickets / changes ?

Reimplemented from CommonDBTM.

Definition at line 276 of file change.class.php.

References $CFG_GLPI, CommonDBTM\getFromDB(), and NotificationEvent\raiseEvent().

Actions done before the DELETE of the item in the database / Maybe used to add another check for deletion.

Returns:
bool : true if item need to be deleted else false

Reimplemented from CommonDBTM.

Definition at line 159 of file change.class.php.

References NotificationEvent\raiseEvent().

Actions done before the UPDATE of the item in the database.

Returns:
nothing

Reimplemented from CommonITILObject.

Definition at line 271 of file change.class.php.

prepareInputForAdd ( input)

Prepare input datas for adding the item.

Parameters:
$inputdatas used to add the item
Returns:
the modified $input array

Reimplemented from CommonITILObject.

Definition at line 316 of file change.class.php.

References $input.

prepareInputForUpdate ( input)

Prepare input datas for updating the item.

Parameters:
$inputdatas used to update the item
Returns:
the modified $input array

Reimplemented from CommonITILObject.

Definition at line 261 of file change.class.php.

References $input.

Form to add an analysis to a change.

Definition at line 992 of file change.class.php.

References $options, CommonDBTM\can(), CommonDBTM\check(), CommonDBTM\getField(), CommonDBTM\showFormButtons(), and CommonDBTM\showFormHeader().


Member Data Documentation

$dohistory = true

Make an history of the changes.

Reimplemented from CommonDBTM.

Definition at line 42 of file change.class.php.

$grouplinkclass = 'Change_Group'

Reimplemented from CommonITILObject.

Definition at line 46 of file change.class.php.

$supplierlinkclass = 'Change_Supplier'

Reimplemented from CommonITILObject.

Definition at line 47 of file change.class.php.

$userlinkclass = 'Change_User'

Reimplemented from CommonITILObject.

Definition at line 45 of file change.class.php.

const IMPACT_MASK_FIELD = 'impact_mask'

Reimplemented from CommonITILObject.

Definition at line 52 of file change.class.php.

const MATRIX_FIELD = 'priority_matrix'

Reimplemented from CommonITILObject.

Definition at line 50 of file change.class.php.

const STATUS_MATRIX_FIELD = 'change_status'

Reimplemented from CommonITILObject.

Definition at line 53 of file change.class.php.

const URGENCY_MASK_FIELD = 'urgency_mask'

Reimplemented from CommonITILObject.

Definition at line 51 of file change.class.php.


The documentation for this class was generated from the following file: