mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-02-21 21:00:56 +01:00
fix /reports/usermonth/ & /reports/queuemonth/ errors
- indexing was wrong - wrong first month label was used.
This commit is contained in:
parent
50406665c9
commit
b79bb6ac10
@ -881,7 +881,7 @@ def run_report(request, report):
|
|||||||
periods = []
|
periods = []
|
||||||
year, month = first_year, first_month
|
year, month = first_year, first_month
|
||||||
working = True
|
working = True
|
||||||
periods.append("%s %s" % (months[month], year))
|
periods.append("%s %s" % (months[month - 1], year))
|
||||||
|
|
||||||
while working:
|
while working:
|
||||||
month += 1
|
month += 1
|
||||||
@ -951,7 +951,7 @@ def run_report(request, report):
|
|||||||
|
|
||||||
elif report == 'usermonth':
|
elif report == 'usermonth':
|
||||||
metric1 = u'%s' % ticket.get_assigned_to
|
metric1 = u'%s' % ticket.get_assigned_to
|
||||||
metric2 = u'%s %s' % (months[ticket.created.month], ticket.created.year)
|
metric2 = u'%s %s' % (months[ticket.created.month - 1], ticket.created.year)
|
||||||
|
|
||||||
elif report == 'queuepriority':
|
elif report == 'queuepriority':
|
||||||
metric1 = u'%s' % ticket.queue.title
|
metric1 = u'%s' % ticket.queue.title
|
||||||
@ -963,14 +963,14 @@ def run_report(request, report):
|
|||||||
|
|
||||||
elif report == 'queuemonth':
|
elif report == 'queuemonth':
|
||||||
metric1 = u'%s' % ticket.queue.title
|
metric1 = u'%s' % ticket.queue.title
|
||||||
metric2 = u'%s %s' % (months[ticket.created.month], ticket.created.year)
|
metric2 = u'%s %s' % (months[ticket.created.month - 1], ticket.created.year)
|
||||||
|
|
||||||
summarytable[metric1, metric2] += 1
|
summarytable[metric1, metric2] += 1
|
||||||
|
|
||||||
table = []
|
table = []
|
||||||
|
|
||||||
header1 = sorted(set(list( i.encode('utf-8') for i,_ in summarytable.keys() )))
|
header1 = sorted(set(list( i.encode('utf-8') for i,_ in summarytable.keys() )))
|
||||||
|
|
||||||
column_headings = [col1heading] + possible_options
|
column_headings = [col1heading] + possible_options
|
||||||
|
|
||||||
# Pivot the data so that 'header1' fields are always first column
|
# Pivot the data so that 'header1' fields are always first column
|
||||||
|
Loading…
Reference in New Issue
Block a user