Changed confirm message for removing us relationship with an epic
parent
c65ee5f3cc
commit
079a89fbba
|
@ -1105,7 +1105,7 @@
|
|||
},
|
||||
"REMOVE_RELATIONSHIP_WITH_EPIC": {
|
||||
"TITLE": "Remove relationship with Epic",
|
||||
"MESSAGE": "Are you sure you want to delete the relationship of this User Story with the Epic <strong>{{epicSubject}}</strong>"
|
||||
"MESSAGE": "Are you sure you want to delete the relationship of this User Story with the Epic <strong>{{epicSubject}}</strong>?"
|
||||
},
|
||||
"CREATE_MEMBER": {
|
||||
"PLACEHOLDER_INVITATION_TEXT": "(Optional) Add a personalized text to the invitation. Tell something lovely to your new members ;-)",
|
||||
|
@ -1168,8 +1168,6 @@
|
|||
"PAGE_TITLE": "{{epicSubject}} - Epic {{epicRef}} - {{projectName}}",
|
||||
"PAGE_DESCRIPTION": "Status: {{epicStatus }}. Description: {{epicDescription}}",
|
||||
"SECTION_NAME": "Epic",
|
||||
"TITLE_LIGHTBOX_UNLINK_RELATED_USERSTORY": "Unlink related userstory",
|
||||
"MSG_LIGHTBOX_UNLINK_RELATED_USERSTORY": "This action will remove the link to the related user story '{{subject}}'",
|
||||
"ERROR_UNLINK_RELATED_USERSTORY": "We have not been able to unlink: {{errorMessage}}",
|
||||
"CREATE_RELATED_USERSTORIES": "Create a relationship with",
|
||||
"NEW_USERSTORY": "New user story",
|
||||
|
@ -1408,8 +1406,7 @@
|
|||
"CLOSE": "Close notification",
|
||||
"MAIL": "Notifications By Mail",
|
||||
"DESKTOP": "Desktop notifications using browser alerts",
|
||||
"ASK_DELETE": "Are you sure you want to delete?",
|
||||
"ASK_REMOVE_LINK": "Are you sure you want to remove the link?"
|
||||
"ASK_DELETE": "Are you sure you want to delete?"
|
||||
},
|
||||
"CANCEL_ACCOUNT": {
|
||||
"TITLE": "Cancel your account",
|
||||
|
|
|
@ -40,12 +40,13 @@ class RelatedUserstoryRowController
|
|||
return @translate.instant("COMMON.ASSIGNED_TO.NOT_ASSIGNED")
|
||||
|
||||
onDeleteRelatedUserstory: () ->
|
||||
title = @translate.instant('EPIC.TITLE_LIGHTBOX_UNLINK_RELATED_USERSTORY')
|
||||
message = @translate.instant('EPIC.MSG_LIGHTBOX_UNLINK_RELATED_USERSTORY', {
|
||||
subject: @.userstory.get('subject')
|
||||
})
|
||||
subtitle = @translate.instant('NOTIFICATION.ASK_REMOVE_LINK')
|
||||
return @confirm.askOnDelete(title, message, subtitle)
|
||||
title = @translate.instant("LIGHTBOX.REMOVE_RELATIONSHIP_WITH_EPIC.TITLE")
|
||||
message = @translate.instant(
|
||||
"LIGHTBOX.REMOVE_RELATIONSHIP_WITH_EPIC.MESSAGE",
|
||||
{ epicSubject: @.epic.get('subject') }
|
||||
)
|
||||
|
||||
return @confirm.ask(title, null, message)
|
||||
.then (askResponse) =>
|
||||
onError = () =>
|
||||
message = @translate.instant('EPIC.ERROR_UNLINK_RELATED_USERSTORY', {errorMessage: message})
|
||||
|
|
|
@ -112,6 +112,7 @@ describe "RelatedUserstoryRow", ->
|
|||
|
||||
it "delete related userstory success", (done) ->
|
||||
RelatedUserstoryRowCtrl.epic = Immutable.fromJS({
|
||||
subject: "SampleEpic"
|
||||
id: 123
|
||||
})
|
||||
RelatedUserstoryRowCtrl.userstory = Immutable.fromJS({
|
||||
|
@ -125,11 +126,11 @@ describe "RelatedUserstoryRow", ->
|
|||
finish: sinon.spy()
|
||||
}
|
||||
|
||||
mocks.translate.instant.withArgs("EPIC.TITLE_LIGHTBOX_UNLINK_RELATED_USERSTORY").returns("title")
|
||||
mocks.translate.instant.withArgs("EPIC.MSG_LIGHTBOX_UNLINK_RELATED_USERSTORY", {subject: "Deleting"}).returns("message")
|
||||
mocks.translate.instant.withArgs("LIGHTBOX.REMOVE_RELATIONSHIP_WITH_EPIC.TITLE").returns("title")
|
||||
mocks.translate.instant.withArgs("LIGHTBOX.REMOVE_RELATIONSHIP_WITH_EPIC.MESSAGE", {epicSubject: "SampleEpic"}).returns("message")
|
||||
|
||||
mocks.tgConfirm.askOnDelete = sinon.stub()
|
||||
mocks.tgConfirm.askOnDelete.withArgs("title", "message").promise().resolve(askResponse)
|
||||
mocks.tgConfirm.ask = sinon.stub()
|
||||
mocks.tgConfirm.ask.withArgs("title").promise().resolve(askResponse)
|
||||
|
||||
promise = mocks.tgResources.epics.deleteRelatedUserstory.withArgs(123, 124).promise().resolve(true)
|
||||
RelatedUserstoryRowCtrl.onDeleteRelatedUserstory().then () ->
|
||||
|
@ -139,6 +140,7 @@ describe "RelatedUserstoryRow", ->
|
|||
|
||||
it "delete related userstory error", (done) ->
|
||||
RelatedUserstoryRowCtrl.epic = Immutable.fromJS({
|
||||
epicSubject: "SampleEpic"
|
||||
id: 123
|
||||
})
|
||||
RelatedUserstoryRowCtrl.userstory = Immutable.fromJS({
|
||||
|
@ -152,12 +154,12 @@ describe "RelatedUserstoryRow", ->
|
|||
finish: sinon.spy()
|
||||
}
|
||||
|
||||
mocks.translate.instant.withArgs("EPIC.TITLE_LIGHTBOX_UNLINK_RELATED_USERSTORY").returns("title")
|
||||
mocks.translate.instant.withArgs("EPIC.MSG_LIGHTBOX_UNLINK_RELATED_USERSTORY", {subject: "Deleting"}).returns("message")
|
||||
mocks.translate.instant.withArgs("EPIC.ERROR_UNLINK_RELATED_USERSTORY", {errorMessage: "message"}).returns("error message")
|
||||
mocks.translate.instant.withArgs("LIGHTBOX.REMOVE_RELATIONSHIP_WITH_EPIC.TITLE").returns("title")
|
||||
mocks.translate.instant.withArgs("LIGHTBOX.REMOVE_RELATIONSHIP_WITH_EPIC.MESSAGE", {epicSubject: "SampleEpic"}).returns("message")
|
||||
mocks.translate.instant.withArgs("EPIC.ERROR_UNLINK_RELATED_USERSTORY").returns("error message")
|
||||
|
||||
mocks.tgConfirm.askOnDelete = sinon.stub()
|
||||
mocks.tgConfirm.askOnDelete.withArgs("title", "message").promise().resolve(askResponse)
|
||||
mocks.tgConfirm.ask = sinon.stub()
|
||||
mocks.tgConfirm.ask.withArgs("title").promise().resolve(askResponse)
|
||||
|
||||
promise = mocks.tgResources.epics.deleteRelatedUserstory.withArgs(123, 124).promise().reject(new Error("error"))
|
||||
RelatedUserstoryRowCtrl.onDeleteRelatedUserstory().then () ->
|
||||
|
|
|
@ -20,7 +20,7 @@ tg-svg.icon-drag(
|
|||
.userstory-settings
|
||||
a.delete-userstory.e2e-delete-userstory(
|
||||
tg-check-permission="modify_epic"
|
||||
title="{{'COMMON.UNLINK' | translate}}"
|
||||
title="{{'US.REMOVE_RELATIONSHIP_WITH_EPIC' | translate}}"
|
||||
href=""
|
||||
ng-click="vm.onDeleteRelatedUserstory()"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue