chore: mass trailing whitespace and EOF fixes

This commit is contained in:
Ankush Menat
2021-08-19 13:41:10 +05:30
parent 869e36c33a
commit 4551d7d602
1190 changed files with 1352 additions and 1604 deletions

View File

@@ -145,4 +145,4 @@ frappe.ui.form.on("Issue", {
// frm.timeline.wrapper.data("help-article-event-attached", true);
// }
},
});
});

View File

@@ -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()

View File

@@ -8,4 +8,4 @@ from frappe import _
from frappe.model.document import Document
class IssuePriority(Document):
pass
pass

View File

@@ -25,4 +25,4 @@ def insert_priority(name):
frappe.get_doc({
"doctype": "Issue Priority",
"name": name
}).insert(ignore_permissions=True)
}).insert(ignore_permissions=True)

View File

@@ -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:

View File

@@ -9,4 +9,4 @@ def get_data():
'items': ['Issue']
}
]
}
}

View File

@@ -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)

View File

@@ -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

View File

@@ -218,4 +218,4 @@ class IssueAnalytics(object):
'datasets': []
},
'type': 'line'
}
}

View File

@@ -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
})
})

View File

@@ -362,4 +362,3 @@ class IssueSummary(object):
'datatype': 'Int',
}
]

View File

@@ -1,3 +1,3 @@
frappe.ready(function() {
// bind events here
})
})