:: Version 3.2.0 ::
Use an holiday calendar per country for SLA computation
Prerequisite: You must be familiar with the Syntax used in Tutorials and have already created an extension.
- learning:
- Use an holiday calendar per country for SLA computation
- level:
- Intermediate
- domains:
- XML, SLA, Coverage Windows, Holidays
- min version:
- 2.3.0
This tutorial will explain
-
How to add a link to Holidays Calendar in Coverage Windows
-
How to change SLA computation to take Holidays in account
First of all you need to install SLA considering business hours
Add a link to Holidays Calendar in Coverage Windows
For adding holidaycalendar_id
on
CoverageWindow
class, start with this:
- itop_design
-
<classes> <class id="CoverageWindow" _created_in="combodo-sla-computation" _delta="must_exist"> <fields> <field id="holidaycalendar_id" xsi:type="AttributeExternalKey" _delta="define"> <sql>holidaycalendar_id</sql> <filter>SELECT HolidayCalendar</filter> <dependencies/> <is_null_allowed>true</is_null_allowed> <target_class>HolidayCalendar</target_class> <on_target_delete>DEL_MANUAL</on_target_delete> </field> <field id="holidaycalendar_name" xsi:type="AttributeExternalField" _delta="define"> <extkey_attcode>holidaycalendar_id</extkey_attcode> <target_attcode>name</target_attcode> </field> </fields> <presentation> <details _delta="redefine"> <items> <item id="name"> <rank>10</rank> </item> <item id="description"> <rank>20</rank> </item> <item id="holidaycalendar_id"> <rank>30</rank> </item> </items> </details> </presentation> </class> </classes> <dictionaries> <dictionary id="EN US" _delta="must_exist"> <entries> <entry id="Class:CoverageWindow/Attribute:holidaycalendar_id" _delta="define"><![CDATA[Holiday calendar ]]></entry> <entry id="Class:CoverageWindow/Attribute:holidaycalendar_id+" _delta="define"><![CDATA[]]></entry> <entry id="Class:CoverageWindow/Attribute:holidaycalendar_name" _delta="define"><![CDATA[Holiday calendar name]]></entry> <entry id="Class:CoverageWindow/Attribute:holidaycalendar_name+" _delta="define"><![CDATA[]]></entry> </entries> </dictionary> </dictionaries>
Change SLA computation to take Holidays in account
To change SLA computation, adjust the holidays_oql parameter in the Configuration File of your iTop instance like this:
'combodo-sla-computation' => array ( 'coverage_oql' => 'SELECT CoverageWindow AS cw JOIN lnkCustomerContractToService AS l1 ON l1.coveragewindow_id = cw.id JOIN CustomerContract AS cc ON l1.customercontract_id = cc.id WHERE cc.org_id= :this->org_id AND l1.service_id = :this->service_id', 'holidays_oql' => 'SELECT Holiday AS h JOIN HolidayCalendar AS hc ON h.calendar_id=hc.id JOIN CoverageWindow AS cw ON cw.holidaycalendar_id=hc.id JOIN lnkCustomerContractToService AS l1 ON l1.coveragewindow_id=cw.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :this->org_id AND l1.service_id= :this->service_id', ),
Create yours holidays calendars and link them to the regarding coverage windows
Create your holidays and holidays calendar managing holidays. Join them to your coverage windows and ajust your customers contracts.
You can defined yours calendars by country, team, customer….
3_2_0/customization/multiple-holiday-calendar.txt · Last
modified: 2024/08/13 09:54 (external edit)