Add assign to sprint button in issues

stable
Álex Hermida 2018-07-11 13:34:05 +02:00 committed by Alex Hermida
parent 9f22c12b3d
commit 4c44c17521
4 changed files with 49 additions and 0 deletions

View File

@ -689,3 +689,43 @@ PromoteIssueToUsButtonDirective = ($rootScope, $repo, $confirm, $translate) ->
module.directive("tgPromoteIssueToUsButton", ["$rootScope", "$tgRepo", "$tgConfirm", "$translate" module.directive("tgPromoteIssueToUsButton", ["$rootScope", "$tgRepo", "$tgConfirm", "$translate"
PromoteIssueToUsButtonDirective]) PromoteIssueToUsButtonDirective])
#############################################################################
## Add Issue to Sprint button directive
#############################################################################
AssignSprintToIssueButtonDirective = ($rootScope, $repo, $translate, lightboxService) ->
link = ($scope, $el, $attrs, $model) ->
$el.on "click", "a", (event) ->
event.preventDefault()
event.stopPropagation()
issue = $model.$modelValue
title = $translate.instant("ISSUES.ACTION_ASSIGN_SPRINT")
# scope.selectProject(selectedProjectId).then () =>
# lightboxService.open(el.find(".lightbox-create-related-user-stories"))
# if ctrl.disabled()
# return
# $el.find(".lightbox-assign-sprint-to-issue").popover().open()
lightboxService.open($el.find(".lightbox-assign-sprint-to-issue"))
# $scope.new = {
# projectId: projectId,
# milestoneId: milestoneId
# }
$scope.$on "$destroy", ->
$el.off()
return {
link: link
restrict: "EA"
require: "ngModel"
templateUrl: "issue/assign-sprint-to-issue-button.html"
}
module.directive("tgAssignSprintToIssueButton", ["$rootScope", "$tgRepo", "$translate"
"lightboxService", AssignSprintToIssueButtonDirective] )

View File

@ -1424,6 +1424,8 @@
"SECTION_NAME": "Issue", "SECTION_NAME": "Issue",
"ACTION_NEW_ISSUE": "+ NEW ISSUE", "ACTION_NEW_ISSUE": "+ NEW ISSUE",
"ACTION_PROMOTE_TO_US": "Promote to User Story", "ACTION_PROMOTE_TO_US": "Promote to User Story",
"ACTION_ASSIGN_SPRINT": "Add issue to Sprint",
"ACTION_REMOVE_FROM_SPRINT": "Remove issue from Sprint {{ sprintName }}",
"PROMOTED": "This issue has been promoted to US:", "PROMOTED": "This issue has been promoted to US:",
"EXTERNAL_REFERENCE": "This issue has been created from", "EXTERNAL_REFERENCE": "This issue has been created from",
"GO_TO_EXTERNAL_REFERENCE": "Go to origin", "GO_TO_EXTERNAL_REFERENCE": "Go to origin",
@ -1431,6 +1433,8 @@
"LIGHTBOX_TITLE_BLOKING_ISSUE": "Blocking issue", "LIGHTBOX_TITLE_BLOKING_ISSUE": "Blocking issue",
"LINK_TASKBOARD": "Taskboard", "LINK_TASKBOARD": "Taskboard",
"TITLE_LINK_TASKBOARD": "Go to the taskboard", "TITLE_LINK_TASKBOARD": "Go to the taskboard",
"FILTER_SPRINTS": "Filter Sprints",
"CHOOSE_SPRINT": "What's the user Sprint?",
"FIELDS": { "FIELDS": {
"PRIORITY": "Priority", "PRIORITY": "Priority",
"SEVERITY": "Severity", "SEVERITY": "Severity",

View File

@ -133,6 +133,10 @@ div.wrapper(
tg-check-permission="add_us", tg-check-permission="add_us",
ng-model="issue" ng-model="issue"
) )
tg-assign-sprint-to-issue-button(
tg-check-permission="modify_issue",
ng-model="issue"
)
tg-block-button( tg-block-button(
tg-check-permission="modify_issue", tg-check-permission="modify_issue",
ng-model="issue" ng-model="issue"

View File

@ -174,6 +174,7 @@
justify-content: center; justify-content: center;
margin-top: 2rem; margin-top: 2rem;
label, label,
.assign-issue-button,
.item-block, .item-block,
.item-unblock, .item-unblock,
.promote-button, .promote-button,