Skip to content

Commit

Permalink
feat: add time taken custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
GaturaN committed Jan 14, 2025
1 parent 7b7563b commit c0a9e17
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions assist/assist/doctype/assist/assist.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ function displayElapsedTime(frm) {

if (frm.fields_dict["close_in"]) {
frm.fields_dict["close_in"].$wrapper.html(timeDisplay);
// Set the value to the time_taken field
frm.set_value("time_taken", `${hours}h ${minutes}m ${seconds}s`);
}
}

Expand Down
16 changes: 12 additions & 4 deletions assist/assist/doctype/assist/assist.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"section_break_k93ec",
"first_responded_on",
"resolved_on",
"time_taken",
"pause_start_time",
"amended_from"
],
Expand Down Expand Up @@ -80,14 +81,15 @@
{
"bold": 1,
"fieldname": "raised_by",
"fieldtype": "Data",
"fieldtype": "Link",
"in_filter": 1,
"in_global_search": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Raised By",
"read_only": 1
"options": "User",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
Expand Down Expand Up @@ -344,13 +346,20 @@
"fieldtype": "Data",
"hidden": 1,
"label": "Remaining Time"
},
{
"allow_on_submit": 1,
"fieldname": "time_taken",
"fieldtype": "Data",
"label": "Time Taken",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"is_calendar_and_gantt": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-12-05 15:27:37.148957",
"modified": "2025-01-14 12:46:57.767531",
"modified_by": "Administrator",
"module": "Assist",
"name": "Assist",
Expand All @@ -370,7 +379,6 @@
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
Expand Down
1 change: 0 additions & 1 deletion assist/assist/doctype/assist/assist.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def on_update_after_submit(self):

# Check if the document has been escalated and send a notification
if self.progress_status == "Escalated" and self.escalated_to:
# realtime_notification(self)
escalation_notification(self)

# check if document is ready to close and send a notification
Expand Down

0 comments on commit c0a9e17

Please sign in to comment.