fix: change response and resolution fieldtype to Duration in SLA
This commit is contained in:
parent
0e3a16e267
commit
ec24afb283
@ -30,19 +30,8 @@ class ServiceLevelAgreement(Document):
|
||||
if priority.default_priority:
|
||||
default_priority.append(priority.default_priority)
|
||||
|
||||
if priority.response_time_period == "Hour":
|
||||
response = priority.response_time * 0.0416667
|
||||
elif priority.response_time_period == "Day":
|
||||
response = priority.response_time
|
||||
elif priority.response_time_period == "Week":
|
||||
response = priority.response_time * 7
|
||||
|
||||
if priority.resolution_time_period == "Hour":
|
||||
resolution = priority.resolution_time * 0.0416667
|
||||
elif priority.resolution_time_period == "Day":
|
||||
resolution = priority.resolution_time
|
||||
elif priority.resolution_time_period == "Week":
|
||||
resolution = priority.resolution_time * 7
|
||||
response = priority.response_time
|
||||
resolution = priority.resolution_time
|
||||
|
||||
if response > resolution:
|
||||
frappe.throw(_("Response Time for {0} at index {1} can't be greater than Resolution Time.").format(priority.priority, priority.idx))
|
||||
@ -109,9 +98,7 @@ class ServiceLevelAgreement(Document):
|
||||
return frappe._dict({
|
||||
"priority": priority.priority,
|
||||
"response_time": priority.response_time,
|
||||
"response_time_period": priority.response_time_period,
|
||||
"resolution_time": priority.resolution_time,
|
||||
"resolution_time_period": priority.resolution_time_period
|
||||
"resolution_time": priority.resolution_time
|
||||
})
|
||||
|
||||
def check_agreement_status():
|
||||
|
@ -10,10 +10,8 @@
|
||||
"default_priority",
|
||||
"sb_00",
|
||||
"response_time",
|
||||
"response_time_period",
|
||||
"cb_00",
|
||||
"resolution_time",
|
||||
"resolution_time_period"
|
||||
"resolution_time"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@ -31,7 +29,7 @@
|
||||
{
|
||||
"columns": 2,
|
||||
"fieldname": "resolution_time",
|
||||
"fieldtype": "Int",
|
||||
"fieldtype": "Duration",
|
||||
"in_list_view": 1,
|
||||
"label": "Resolution Time"
|
||||
},
|
||||
@ -39,22 +37,6 @@
|
||||
"fieldname": "cb_00",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"columns": 2,
|
||||
"fieldname": "response_time_period",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Response Time Period",
|
||||
"options": "Hour\nDay\nWeek"
|
||||
},
|
||||
{
|
||||
"columns": 2,
|
||||
"fieldname": "resolution_time_period",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Resolution Time Period",
|
||||
"options": "Hour\nDay\nWeek"
|
||||
},
|
||||
{
|
||||
"fieldname": "cb_01",
|
||||
"fieldtype": "Column Break"
|
||||
@ -70,14 +52,14 @@
|
||||
{
|
||||
"columns": 2,
|
||||
"fieldname": "response_time",
|
||||
"fieldtype": "Int",
|
||||
"fieldtype": "Duration",
|
||||
"in_list_view": 1,
|
||||
"label": "First Response Time"
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-04-24 14:50:13.774308",
|
||||
"modified": "2020-05-04 22:08:04.503949",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Support",
|
||||
"name": "Service Level Priority",
|
||||
|
Loading…
Reference in New Issue
Block a user