Skip to content

Commit

Permalink
fix: show resolution time in gridview only if 'apply sla on resolutio…
Browse files Browse the repository at this point in the history
…n' is enabled
  • Loading branch information
ruchamahabal committed May 29, 2021
1 parent 981c23d commit bff1b1f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
// For license information, please see license.txt

frappe.ui.form.on('Service Level Agreement', {
setup: function(frm) {
if (frm.doc.apply_sla_for_resolution) {
frm.get_field('priorities').grid.editable_fields = [
{fieldname: 'priority', columns: 1},
{fieldname: 'default_priority', columns: 1},
{fieldname: 'response_time', columns: 2},
{fieldname: 'resolution_time', columns: 2}
];
} else {
frm.get_field('priorities').grid.editable_fields = [
{fieldname: 'priority', columns: 1},
{fieldname: 'default_priority', columns: 1},
{fieldname: 'response_time', columns: 3},
];
}
},

refresh: function(frm) {
frm.trigger('fetch_status_fields');
frm.trigger('toggle_resolution_fields');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"fieldtype": "Duration",
"hide_days": 1,
"hide_seconds": 1,
"in_list_view": 1,
"label": "Resolution Time"
},
{
Expand Down Expand Up @@ -65,7 +64,7 @@
],
"istable": 1,
"links": [],
"modified": "2021-05-29 14:24:28.643920",
"modified": "2021-05-29 19:52:51.733248",
"modified_by": "Administrator",
"module": "Support",
"name": "Service Level Priority",
Expand Down

0 comments on commit bff1b1f

Please sign in to comment.