Skip to content

Commit

Permalink
fix: Only calculate first_respone_time if SLA is set (#27789) (#27793)
Browse files Browse the repository at this point in the history
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
(cherry picked from commit ad03eb2)

Co-authored-by: Ganga Manoj <ganga.manoj98@gmail.com>
  • Loading branch information
mergify[bot] and GangaManoj authored Oct 5, 2021
1 parent 046ec92 commit 32d72fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/support/doctype/issue/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def get_time_in_timedelta(time):
def set_first_response_time(communication, method):
if communication.get('reference_doctype') == "Issue":
issue = get_parent_doc(communication)
if is_first_response(issue):
if is_first_response(issue) and issue.service_level_agreement:
first_response_time = calculate_first_response_time(issue, get_datetime(issue.first_responded_on))
issue.db_set("first_response_time", first_response_time)

Expand Down

0 comments on commit 32d72fd

Please sign in to comment.