Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion api/pages/issue/trends.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ def run(API, environ, indata, session):
body = query
)
no_closers_before = res['aggregations']['closer']['value']

issuesRatioBefore = round(float(no_issues_closed_before) / no_issues_created_before, 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @amunz

Suggested change
issuesRatioBefore = round(float(no_issues_closed_before) / no_issues_created_before, 2)
issues_ratio_before = round(float(no_issues_closed_before) / no_issues_created_before, 2)§

Let's make it python style. ;)

issuesRatioAfter = str(round(float(no_issues_closed) / no_issues_created, 2))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
issuesRatioAfter = str(round(float(no_issues_closed) / no_issues_created, 2))
issues_ratio_after = str(round(float(no_issues_closed) / no_issues_created, 2))


trends = {
"created": {
Expand All @@ -346,6 +347,11 @@ def run(API, environ, indata, session):
'before': no_closers_before,
'after': no_closers,
'title': "People closing issues this period"
},
"ratio":{
'before': 0,
'after': 0,
'title': "Issues Closed / Issues Opened Ratio: "+issuesRatioAfter
}
}

Expand Down