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: __('Open'), value: 'Open'},
|
||||||
{label: __('Replied'), value: 'Replied'},
|
{label: __('Replied'), value: 'Replied'},
|
||||||
|
{label: __('Hold'), value: 'Hold'},
|
||||||
{label: __('Resolved'), value: 'Resolved'},
|
{label: __('Resolved'), value: 'Resolved'},
|
||||||
{label: __('Closed'), value: 'Closed'}
|
{label: __('Closed'), value: 'Closed'}
|
||||||
]
|
]
|
||||||
|
@ -62,7 +62,7 @@ class IssueSummary(object):
|
|||||||
'width': 200
|
'width': 200
|
||||||
})
|
})
|
||||||
|
|
||||||
self.statuses = ['Open', 'Replied', 'Resolved', 'Closed']
|
self.statuses = ['Open', 'Replied', 'Hold', 'Resolved', 'Closed']
|
||||||
for status in self.statuses:
|
for status in self.statuses:
|
||||||
self.columns.append({
|
self.columns.append({
|
||||||
'label': _(status),
|
'label': _(status),
|
||||||
@ -265,6 +265,7 @@ class IssueSummary(object):
|
|||||||
labels = []
|
labels = []
|
||||||
open_issues = []
|
open_issues = []
|
||||||
replied_issues = []
|
replied_issues = []
|
||||||
|
hold_issues = []
|
||||||
resolved_issues = []
|
resolved_issues = []
|
||||||
closed_issues = []
|
closed_issues = []
|
||||||
|
|
||||||
@ -277,6 +278,7 @@ class IssueSummary(object):
|
|||||||
labels.append(entry.get(entity_field))
|
labels.append(entry.get(entity_field))
|
||||||
open_issues.append(entry.get('open'))
|
open_issues.append(entry.get('open'))
|
||||||
replied_issues.append(entry.get('replied'))
|
replied_issues.append(entry.get('replied'))
|
||||||
|
hold_issues.append(entry.get('hold'))
|
||||||
resolved_issues.append(entry.get('resolved'))
|
resolved_issues.append(entry.get('resolved'))
|
||||||
closed_issues.append(entry.get('closed'))
|
closed_issues.append(entry.get('closed'))
|
||||||
|
|
||||||
@ -292,6 +294,10 @@ class IssueSummary(object):
|
|||||||
'name': 'Replied',
|
'name': 'Replied',
|
||||||
'values': replied_issues[:30]
|
'values': replied_issues[:30]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'name': 'Hold',
|
||||||
|
'values': hold_issues[:30]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'name': 'Resolved',
|
'name': 'Resolved',
|
||||||
'values': resolved_issues[:30]
|
'values': resolved_issues[:30]
|
||||||
@ -313,12 +319,14 @@ class IssueSummary(object):
|
|||||||
|
|
||||||
open_issues = 0
|
open_issues = 0
|
||||||
replied = 0
|
replied = 0
|
||||||
|
hold = 0
|
||||||
resolved = 0
|
resolved = 0
|
||||||
closed = 0
|
closed = 0
|
||||||
|
|
||||||
for entry in self.data:
|
for entry in self.data:
|
||||||
open_issues += entry.get('open')
|
open_issues += entry.get('open')
|
||||||
replied += entry.get('replied')
|
replied += entry.get('replied')
|
||||||
|
hold += entry.get('hold')
|
||||||
resolved += entry.get('resolved')
|
resolved += entry.get('resolved')
|
||||||
closed += entry.get('closed')
|
closed += entry.get('closed')
|
||||||
|
|
||||||
@ -335,6 +343,12 @@ class IssueSummary(object):
|
|||||||
'label': _('Replied'),
|
'label': _('Replied'),
|
||||||
'datatype': 'Int',
|
'datatype': 'Int',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'value': hold,
|
||||||
|
'indicator': 'Grey',
|
||||||
|
'label': _('Hold'),
|
||||||
|
'datatype': 'Int',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'value': resolved,
|
'value': resolved,
|
||||||
'indicator': 'Green',
|
'indicator': 'Green',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user