Issue 2748 - add us reference in task timeline
parent
0404d28aa3
commit
1a64e7d74e
|
@ -1171,6 +1171,7 @@
|
||||||
"US_UPDATED": "{{username}} has updated the attribute \"{{field_name}}\" of the US {{obj_name}}",
|
"US_UPDATED": "{{username}} has updated the attribute \"{{field_name}}\" of the US {{obj_name}}",
|
||||||
"ISSUE_UPDATED": "{{username}} has updated the attribute \"{{field_name}}\" of the Issue {{obj_name}}",
|
"ISSUE_UPDATED": "{{username}} has updated the attribute \"{{field_name}}\" of the Issue {{obj_name}}",
|
||||||
"TASK_UPDATED": "{{username}} has updated the attribute \"{{field_name}}\" of the Task {{obj_name}}",
|
"TASK_UPDATED": "{{username}} has updated the attribute \"{{field_name}}\" of the Task {{obj_name}}",
|
||||||
|
"TASK_UPDATED_WITH_US": "{{username}} has updated the attribute \"{{field_name}}\" of the Task {{obj_name}} which belongs to the US {{us_name}}",
|
||||||
"WIKI_UPDATED": "{{username}} has update the Wiki page {{obj_name}}",
|
"WIKI_UPDATED": "{{username}} has update the Wiki page {{obj_name}}",
|
||||||
"NEW_COMMENT_US": "{{username}} has commented in the US {{obj_name}}",
|
"NEW_COMMENT_US": "{{username}} has commented in the US {{obj_name}}",
|
||||||
"NEW_COMMENT_ISSUE": "{{username}} has commented in the Issue {{obj_name}}",
|
"NEW_COMMENT_ISSUE": "{{username}} has commented in the Issue {{obj_name}}",
|
||||||
|
|
|
@ -41,6 +41,16 @@ class UserTimelineItemTitle
|
||||||
|
|
||||||
return @._getLink(url, timeline.data.milestone.name)
|
return @._getLink(url, timeline.data.milestone.name)
|
||||||
|
|
||||||
|
else if param == 'us_name'
|
||||||
|
obj = @._getTimelineObj(timeline, event).userstory
|
||||||
|
|
||||||
|
event_us = {obj: 'parent_userstory'}
|
||||||
|
url = @._getDetailObjUrl(event_us)
|
||||||
|
|
||||||
|
text = '#' + obj.ref + ' ' + obj.subject
|
||||||
|
|
||||||
|
return @._getLink(url, text)
|
||||||
|
|
||||||
else if param == 'obj_name'
|
else if param == 'obj_name'
|
||||||
obj = @._getTimelineObj(timeline, event)
|
obj = @._getTimelineObj(timeline, event)
|
||||||
url = @._getDetailObjUrl(event)
|
url = @._getDetailObjUrl(event)
|
||||||
|
@ -63,6 +73,7 @@ class UserTimelineItemTitle
|
||||||
"wikipage": ["project-wiki-page", ":project=vm.activity.project.slug,slug=vm.activity.obj.slug"],
|
"wikipage": ["project-wiki-page", ":project=vm.activity.project.slug,slug=vm.activity.obj.slug"],
|
||||||
"task": ["project-tasks-detail", ":project=vm.activity.project.slug,ref=vm.activity.obj.ref"],
|
"task": ["project-tasks-detail", ":project=vm.activity.project.slug,ref=vm.activity.obj.ref"],
|
||||||
"userstory": ["project-userstories-detail", ":project=vm.activity.project.slug,ref=vm.activity.obj.ref"],
|
"userstory": ["project-userstories-detail", ":project=vm.activity.project.slug,ref=vm.activity.obj.ref"],
|
||||||
|
"parent_userstory": ["project-userstories-detail", ":project=vm.activity.project.slug,ref=vm.activity.obj.userstory.ref"],
|
||||||
"milestone": ["project-taskboard", ":project=vm.activity.project.slug,sprint=vm.activity.obj.slug"]
|
"milestone": ["project-taskboard", ":project=vm.activity.project.slug,sprint=vm.activity.obj.slug"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,9 +144,15 @@ timelineType = (timeline, event) ->
|
||||||
},
|
},
|
||||||
{ # TaskUpdated
|
{ # TaskUpdated
|
||||||
check: (timeline, event) ->
|
check: (timeline, event) ->
|
||||||
return event.obj == 'task' && event.type == 'change'
|
return event.obj == 'task' && event.type == 'change' && !timeline.data.task.userstory
|
||||||
key: 'TIMELINE.TASK_UPDATED',
|
key: 'TIMELINE.TASK_UPDATED',
|
||||||
translate_params: ['username', 'field_name', 'obj_name']
|
translate_params: ['username', 'field_name', 'obj_name']
|
||||||
|
},
|
||||||
|
{ # TaskUpdated with US
|
||||||
|
check: (timeline, event) ->
|
||||||
|
return event.obj == 'task' && event.type == 'change' && timeline.data.task.userstory
|
||||||
|
key: 'TIMELINE.TASK_UPDATED_WITH_US',
|
||||||
|
translate_params: ['username', 'field_name', 'obj_name', 'us_name']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue