When adding a dependency, the current issue is not shown in the list anymore.

Signed-off-by: Konrad <konrad@kola-entertainments.de>
This commit is contained in:
Konrad Langenberg 2017-10-31 08:02:36 +01:00 committed by Konrad
parent 53ec08fc71
commit 14aa1d2052
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 8 additions and 2 deletions

View File

@ -2009,11 +2009,15 @@ function showAddDependencyModal() {
function buildIssuesList() {
// Get a list of issues
var repolink = $('#repolink').val();
var issueIndex = $('#issueIndex').val();
$.getJSON( '/api/v1/repos' + repolink + '/issues', function( data ) {
$.each(data, function (i, issue) {
//$('#newDependency').append('<option value="' + issue.id + '"><b>#' + issue.number + '</b> ' + issue.title + '</option>');
$('.new-dependency-dropdown').append('<div class="item" data-value="' + issue.id + '"><b>#' + issue.number + '</b> ' + issue.title + '</div>');
if(issue.number != issueIndex) {
//$('#newDependency').append('<option value="' + issue.id + '"><b>#' + issue.number + '</b> ' + issue.title + '</option>');
$('.new-dependency-dropdown').append('<div class="item" data-value="' + issue.id + '"><b>#' + issue.number + '</b> ' + issue.title + '</div>');
}
});
$('.new-dependency-drop-list').dropdown({

View File

@ -288,6 +288,8 @@
</div>
<input type="hidden" id="repolink" value="{{$.RepoLink}}">
<!-- I know, there is probably a better way to do this -->
<input type="hidden" id="issueIndex" value="{{.Issue.Index}}"/>
<div class="ui basic modal remove-dependency">
<div class="ui icon header">