forked from chaoss/grimoirelab-elk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add-reponse-times-bugzilla' of 'https://github.com/sdue…
…nas/grimoirelab-elk/' Merges chaoss#1171 Closes chaoss#1171
- Loading branch information
Showing
7 changed files
with
268 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
releases/unreleased/new-reponse-times-on-bugzilla-items.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: New reponse times on bugzilla items | ||
category: added | ||
author: Santiago Dueñas <[email protected]> | ||
issue: null | ||
notes: > | ||
The Bugzilla enriched items include two new | ||
fields to track response times on these type | ||
of repositories. | ||
The field `time_to_first_attention` is the | ||
the time expressed in days between the ticket | ||
creation and the first comment from a contributor | ||
different from the author creating the bug. | ||
The field `last_comment_date` is the date of | ||
the last comment posted in the bug. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,8 +181,8 @@ | |
], | ||
"reporter": [ | ||
{ | ||
"__text__": "rocapal@example.org", | ||
"name": "Roberto Calvo" | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
], | ||
"reporter_accessible": [ | ||
|
@@ -507,8 +507,8 @@ | |
], | ||
"reporter": [ | ||
{ | ||
"__text__": "rocapal@example.org", | ||
"name": "Roberto Calvo" | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
], | ||
"reporter_accessible": [ | ||
|
@@ -668,8 +668,8 @@ | |
], | ||
"who": [ | ||
{ | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
"__text__": "dizquierdo@example.org", | ||
"name": "Daniel Izquierdo Cortazar" | ||
} | ||
] | ||
} | ||
|
@@ -1026,8 +1026,8 @@ | |
], | ||
"reporter": [ | ||
{ | ||
"__text__": "rocapal@example.com", | ||
"name": "Roberto Calvo" | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
], | ||
"reporter_accessible": [ | ||
|
@@ -1251,8 +1251,8 @@ | |
], | ||
"reporter": [ | ||
{ | ||
"__text__": "rocapal@example.org", | ||
"name": "Roberto Calvo" | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
], | ||
"reporter_accessible": [ | ||
|
@@ -1446,8 +1446,8 @@ | |
], | ||
"reporter": [ | ||
{ | ||
"__text__": "dizquierdo@example.org", | ||
"name": "Daniel Izquierdo Cortazar" | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
], | ||
"reporter_accessible": [ | ||
|
@@ -1661,7 +1661,7 @@ | |
], | ||
"creation_ts": [ | ||
{ | ||
"__text__": "2015-05-23 06:06:06 +0200" | ||
"__text__": "2013-06-25 11:49:36 +0200" | ||
} | ||
], | ||
"delta_ts": [ | ||
|
@@ -1720,7 +1720,7 @@ | |
], | ||
"bug_when": [ | ||
{ | ||
"__text__": "2013-06-25 11:55:46 +0200" | ||
"__text__": "2013-07-01 12:00:00 +0200" | ||
} | ||
], | ||
"commentid": [ | ||
|
@@ -1740,6 +1740,96 @@ | |
"name": "Santiago Due\u00f1as" | ||
} | ||
] | ||
}, | ||
{ | ||
"__text__": "\n ", | ||
"attachid": [ | ||
{ | ||
"__text__": "172" | ||
} | ||
], | ||
"bug_when": [ | ||
{ | ||
"__text__": "2014-06-25 11:55:46 +0200" | ||
} | ||
], | ||
"commentid": [ | ||
{ | ||
"__text__": "1086" | ||
} | ||
], | ||
"isprivate": "0", | ||
"thetext": [ | ||
{ | ||
"__text__": "This patch is great" | ||
} | ||
], | ||
"who": [ | ||
{ | ||
"__text__": "[email protected]", | ||
"name": "Luis Ca\u00f1as" | ||
} | ||
] | ||
}, | ||
{ | ||
"__text__": "\n ", | ||
"attachid": [ | ||
{ | ||
"__text__": "172" | ||
} | ||
], | ||
"bug_when": [ | ||
{ | ||
"__text__": "2014-06-25 11:55:46 +0200" | ||
} | ||
], | ||
"commentid": [ | ||
{ | ||
"__text__": "1086" | ||
} | ||
], | ||
"isprivate": "0", | ||
"thetext": [ | ||
{ | ||
"__text__": "Thanks!" | ||
} | ||
], | ||
"who": [ | ||
{ | ||
"__text__": "[email protected]", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
] | ||
}, | ||
{ | ||
"__text__": "\n ", | ||
"attachid": [ | ||
{ | ||
"__text__": "172" | ||
} | ||
], | ||
"bug_when": [ | ||
{ | ||
"__text__": "2014-08-01 11:55:46 +0200" | ||
} | ||
], | ||
"commentid": [ | ||
{ | ||
"__text__": "1086" | ||
} | ||
], | ||
"isprivate": "0", | ||
"thetext": [ | ||
{ | ||
"__text__": "Applied" | ||
} | ||
], | ||
"who": [ | ||
{ | ||
"__text__": "[email protected]", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
] | ||
} | ||
], | ||
"op_sys": [ | ||
|
@@ -1770,8 +1860,8 @@ | |
], | ||
"reporter": [ | ||
{ | ||
"__text__": "carlosgc@example.com", | ||
"name": "Carlos Garcia Campos" | ||
"__text__": "sduenas@example.org", | ||
"name": "Santiago Due\u00f1as" | ||
} | ||
], | ||
"reporter_accessible": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
# Alvaro del Castillo <[email protected]> | ||
# Valerio Cosentino <[email protected]> | ||
# | ||
|
||
import logging | ||
import unittest | ||
|
||
|
@@ -93,6 +94,38 @@ def test_enrich_keywords(self): | |
eitem = enrich_backend.get_rich_item(item) | ||
self.assertEqual(eitem['keywords'], []) | ||
|
||
def test_time_to_first_attention(self): | ||
"""Test whether time_to_first_attention is calculated""" | ||
|
||
self._test_raw_to_enrich() | ||
enrich_backend = self.connectors[self.connector][2]() | ||
|
||
expected = [None, None, None, None, None, None, 365] | ||
|
||
for index in range(0, len(self.items)): | ||
eitem = enrich_backend.get_rich_item(self.items[index]) | ||
self.assertEqual(eitem['time_to_first_attention'], expected[index]) | ||
|
||
def test_last_comment_date(self): | ||
"""Test whether last_comment_date is added to the enriched item""" | ||
|
||
self._test_raw_to_enrich() | ||
enrich_backend = self.connectors[self.connector][2]() | ||
|
||
expected = [ | ||
"2013-06-25T11:55:46+02:00", | ||
"2013-06-25T11:55:46+02:00", | ||
None, | ||
"2013-06-25T11:55:46+02:00", | ||
"2013-06-25T11:55:46+02:00", | ||
None, | ||
"2014-08-01T11:55:46+02:00" | ||
] | ||
|
||
for index in range(0, len(self.items)): | ||
eitem = enrich_backend.get_rich_item(self.items[index]) | ||
self.assertEqual(eitem['last_comment_date'], expected[index]) | ||
|
||
def test_raw_to_enrich_sorting_hat(self): | ||
"""Test enrich with SortingHat""" | ||
|
||
|
Oops, something went wrong.