mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
chore: mass trailing whitespace and EOF fixes
This commit is contained in:
@@ -145,4 +145,4 @@ frappe.ui.form.on("Issue", {
|
||||
// frm.timeline.wrapper.data("help-article-event-attached", true);
|
||||
// }
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -182,7 +182,7 @@ class TestFirstResponseTime(TestSetUp):
|
||||
# issue creation and first response are on consecutive days
|
||||
def test_first_response_time_case6(self):
|
||||
"""
|
||||
Test frt when the issue was created before working hours and the first response is also sent before working hours, but on the next day.
|
||||
Test frt when the issue was created before working hours and the first response is also sent before working hours, but on the next day.
|
||||
"""
|
||||
issue = create_issue_and_communication(get_datetime("06-28-2021 6:00"), get_datetime("06-29-2021 6:00"))
|
||||
self.assertEqual(issue.first_response_time, 28800.0)
|
||||
@@ -204,7 +204,7 @@ class TestFirstResponseTime(TestSetUp):
|
||||
def test_first_response_time_case9(self):
|
||||
"""
|
||||
Test frt when the issue was created before working hours and the first response is sent on the next day, which is not a work day.
|
||||
"""
|
||||
"""
|
||||
issue = create_issue_and_communication(get_datetime("06-25-2021 6:00"), get_datetime("06-26-2021 11:00"))
|
||||
self.assertEqual(issue.first_response_time, 28800.0)
|
||||
|
||||
@@ -232,7 +232,7 @@ class TestFirstResponseTime(TestSetUp):
|
||||
def test_first_response_time_case13(self):
|
||||
"""
|
||||
Test frt when the issue was created during working hours and the first response is sent on the next day, which is not a work day.
|
||||
"""
|
||||
"""
|
||||
issue = create_issue_and_communication(get_datetime("06-25-2021 12:00"), get_datetime("06-26-2021 11:00"))
|
||||
self.assertEqual(issue.first_response_time, 21600.0)
|
||||
|
||||
@@ -348,7 +348,7 @@ class TestFirstResponseTime(TestSetUp):
|
||||
"""
|
||||
issue = create_issue_and_communication(get_datetime("06-25-2021 20:00"), get_datetime("06-27-2021 11:00"))
|
||||
self.assertEqual(issue.first_response_time, 1.0)
|
||||
|
||||
|
||||
def create_issue_and_communication(issue_creation, first_responded_on):
|
||||
issue = make_issue(issue_creation, index=1)
|
||||
sender = create_user("test@admin.com")
|
||||
@@ -422,4 +422,4 @@ def create_communication(reference_name, sender, sent_or_received, creation):
|
||||
"creation": creation,
|
||||
"reference_name": reference_name
|
||||
})
|
||||
communication.save()
|
||||
communication.save()
|
||||
|
||||
@@ -8,4 +8,4 @@ from frappe import _
|
||||
from frappe.model.document import Document
|
||||
|
||||
class IssuePriority(Document):
|
||||
pass
|
||||
pass
|
||||
|
||||
@@ -25,4 +25,4 @@ def insert_priority(name):
|
||||
frappe.get_doc({
|
||||
"doctype": "Issue Priority",
|
||||
"name": name
|
||||
}).insert(ignore_permissions=True)
|
||||
}).insert(ignore_permissions=True)
|
||||
|
||||
@@ -246,7 +246,7 @@ def get_active_service_level_agreement_for(doc):
|
||||
filters += [["Service Level Agreement", "default_service_level_agreement", "=", 0]]
|
||||
agreements = frappe.get_all("Service Level Agreement", filters=filters, or_filters=or_filters,
|
||||
fields=["name", "default_priority", "apply_sla_for_resolution", "condition"])
|
||||
|
||||
|
||||
# check if the current document on which SLA is to be applied fulfills all the conditions
|
||||
filtered_agreements = []
|
||||
for agreement in agreements:
|
||||
|
||||
@@ -9,4 +9,4 @@ def get_data():
|
||||
'items': ['Issue']
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,4 +511,4 @@ def make_lead(creation=None, index=0):
|
||||
"creation": creation,
|
||||
"service_level_agreement_creation": creation,
|
||||
"priority": "Medium"
|
||||
}).insert(ignore_permissions=True)
|
||||
}).insert(ignore_permissions=True)
|
||||
|
||||
@@ -32,4 +32,4 @@ def execute(filters=None):
|
||||
ORDER BY creation_date desc
|
||||
''', (filters.from_date, filters.to_date))
|
||||
|
||||
return columns, data
|
||||
return columns, data
|
||||
|
||||
@@ -218,4 +218,4 @@ class IssueAnalytics(object):
|
||||
'datasets': []
|
||||
},
|
||||
'type': 'line'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class TestIssueAnalytics(unittest.TestCase):
|
||||
if current_month_date.year != last_month_date.year:
|
||||
self.current_month += '_' + str(current_month_date.year)
|
||||
self.last_month += '_' + str(last_month_date.year)
|
||||
|
||||
|
||||
def test_issue_analytics(self):
|
||||
create_service_level_agreements_for_issues()
|
||||
create_issue_types()
|
||||
@@ -211,4 +211,4 @@ def create_records():
|
||||
"assign_to": ["test@example.com", "test1@example.com"],
|
||||
"doctype": "Issue",
|
||||
"name": issue.name
|
||||
})
|
||||
})
|
||||
|
||||
@@ -362,4 +362,3 @@ class IssueSummary(object):
|
||||
'datatype': 'Int',
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
frappe.ready(function() {
|
||||
// bind events here
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user