Bug 1278746 - Add the ability to set block,depends on,see also fields (#1662) r=emorley

This commit is contained in:
KWierso 2016-09-06 18:46:36 +01:00 коммит произвёл GitHub
Родитель d32319a5d9
Коммит 8ef82f44dc
5 изменённых файлов: 28 добавлений и 0 удалений

Просмотреть файл

@ -74,6 +74,9 @@ def test_create_unauthenticated_bug(webapp, eleven_jobs_stored, activate_respons
assert requestdata['comment_tags'] == "treeherder"
assert requestdata['version'] == "4.0.17"
assert requestdata['keywords'] == "intermittent-failure"
assert requestdata['depends_on'] == "123"
assert requestdata['blocks'] == "1234"
assert requestdata['see_also'] == "12345"
resp_body = {"id": 323}
return(200, headers, json.dumps(resp_body))
@ -95,6 +98,9 @@ def test_create_unauthenticated_bug(webapp, eleven_jobs_stored, activate_respons
"comment": "Intermittent Description",
"comment_tags": "treeherder",
"keywords": "intermittent-failure",
"depends_on": "123",
"blocks": "1234",
"see_also": "12345",
}
)

Просмотреть файл

@ -34,6 +34,9 @@ class BugzillaViewSet(viewsets.ViewSet):
'component': params.get("component"),
'summary': params.get("summary"),
'keywords': params.get("keywords"),
'blocks': params.get("blocks"),
'depends_on': params.get("depends_on"),
'see_also': params.get("see_also"),
'version': params.get("version"),
'description': description,
'comment_tags': "treeherder",

Просмотреть файл

@ -69,3 +69,9 @@
overflow: auto;
clear:both;
}
#modalRelatedBugs {
padding-top: 10px;
padding-right:10.5%;
float: right;
}

Просмотреть файл

@ -177,6 +177,10 @@ treeherder.controller('BugFilerCtrl', [
var keywords = $scope.isIntermittent ? "intermittent-failure" : "";
var blocks = $scope.modalBlocks;
var dependsOn = $scope.modalDependsOn;
var seeAlso = $scope.modalSeeAlso;
// Fetch product information from bugzilla to get version numbers, then submit the new bug
// Only request the versions because some products take quite a long time to fetch the full object
$.ajax("https://bugzilla.mozilla.org/rest/product/" + productString + "?include_fields=versions").done(function(productJSON) {
@ -196,6 +200,9 @@ treeherder.controller('BugFilerCtrl', [
"summary": summarystring,
"keywords": keywords,
"version": version.name,
"blocks": blocks,
"depends_on": dependsOn,
"see_also": seeAlso,
"comment": descriptionStrings,
"comment_tags": "treeherder"
}

Просмотреть файл

@ -67,6 +67,12 @@
ng-checked="true" />
This is an intermittent failure
</label>
<div id="modalRelatedBugs">
<input type="text" ng-model="modalBlocks" placeholder="Blocks" uib-tooltip="Comma-separated list of bugs" tooltip-placement="bottom" />
<input type="text" ng-model="modalDependsOn" placeholder="Depends on" uib-tooltip="Comma-separated list of bugs" tooltip-placement="bottom" />
<input type="text" ng-model="modalSeeAlso" placeholder="See also" uib-tooltip="Comma-separated list of bugs" tooltip-placement="bottom" />
</div>
</div>
<div id="modalBottomDiv">