fix: Hold status is added in the report
This commit is contained in:
parent
073dcf7e42
commit
3efd411ddb
@ -42,6 +42,7 @@ frappe.query_reports["Issue Summary"] = {
|
||||
"",
|
||||
{label: __('Open'), value: 'Open'},
|
||||
{label: __('Replied'), value: 'Replied'},
|
||||
{label: __('Hold'), value: 'Hold'},
|
||||
{label: __('Resolved'), value: 'Resolved'},
|
||||
{label: __('Closed'), value: 'Closed'}
|
||||
]
|
||||
|
@ -62,7 +62,7 @@ class IssueSummary(object):
|
||||
'width': 200
|
||||
})
|
||||
|
||||
self.statuses = ['Open', 'Replied', 'Resolved', 'Closed']
|
||||
self.statuses = ['Open', 'Replied', 'Hold', 'Resolved', 'Closed']
|
||||
for status in self.statuses:
|
||||
self.columns.append({
|
||||
'label': _(status),
|
||||
@ -265,6 +265,7 @@ class IssueSummary(object):
|
||||
labels = []
|
||||
open_issues = []
|
||||
replied_issues = []
|
||||
hold_issues = []
|
||||
resolved_issues = []
|
||||
closed_issues = []
|
||||
|
||||
@ -277,6 +278,7 @@ class IssueSummary(object):
|
||||
labels.append(entry.get(entity_field))
|
||||
open_issues.append(entry.get('open'))
|
||||
replied_issues.append(entry.get('replied'))
|
||||
hold_issues.append(entry.get('hold'))
|
||||
resolved_issues.append(entry.get('resolved'))
|
||||
closed_issues.append(entry.get('closed'))
|
||||
|
||||
@ -292,6 +294,10 @@ class IssueSummary(object):
|
||||
'name': 'Replied',
|
||||
'values': replied_issues[:30]
|
||||
},
|
||||
{
|
||||
'name': 'Hold',
|
||||
'values': hold_issues[:30]
|
||||
},
|
||||
{
|
||||
'name': 'Resolved',
|
||||
'values': resolved_issues[:30]
|
||||
@ -313,12 +319,14 @@ class IssueSummary(object):
|
||||
|
||||
open_issues = 0
|
||||
replied = 0
|
||||
hold = 0
|
||||
resolved = 0
|
||||
closed = 0
|
||||
|
||||
for entry in self.data:
|
||||
open_issues += entry.get('open')
|
||||
replied += entry.get('replied')
|
||||
hold += entry.get('hold')
|
||||
resolved += entry.get('resolved')
|
||||
closed += entry.get('closed')
|
||||
|
||||
@ -335,6 +343,12 @@ class IssueSummary(object):
|
||||
'label': _('Replied'),
|
||||
'datatype': 'Int',
|
||||
},
|
||||
{
|
||||
'value': hold,
|
||||
'indicator': 'Grey',
|
||||
'label': _('Hold'),
|
||||
'datatype': 'Int',
|
||||
},
|
||||
{
|
||||
'value': resolved,
|
||||
'indicator': 'Green',
|
||||
|
Loading…
x
Reference in New Issue
Block a user