79 lines
3.4 KiB
YAML
79 lines
3.4 KiB
YAML
-
|
|
I put sprint in pending state to allocate task to resources.
|
|
-
|
|
!python {model: project.scrum.sprint}: |
|
|
self.button_pending(cr, uid, [ref("scrum_sprint_0")])
|
|
-
|
|
I check state of sprint after put in pending.
|
|
-
|
|
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint should be in pending state}:
|
|
- state == "pending"
|
|
-
|
|
I assign Backlog into this Sprint
|
|
-
|
|
!python {model: project.scrum.backlog.assign.sprint}: |
|
|
new_id = self.create(cr, uid, {'sprint_id': ref("scrum_sprint_0")})
|
|
self.assign_sprint(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_0")]
|
|
})
|
|
backlog_obj = self.pool.get('project.scrum.product.backlog')
|
|
task_obj = self.pool.get('project.task')
|
|
|
|
backlog_data = backlog_obj.browse(cr, uid, ref("scrum_product_backlog_0"), context)
|
|
assert backlog_data.sprint_id.id == ref("scrum_sprint_0"), 'Sprint is not assigned'
|
|
-
|
|
I Open sprint of "Week 31"
|
|
-
|
|
!python {model: project.scrum.sprint}: |
|
|
self.button_open(cr, uid, [ref("scrum_sprint_0")])
|
|
-
|
|
I check state of sprint after opened.
|
|
-
|
|
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint should be in Open state}:
|
|
- state == "open"
|
|
-
|
|
I create tasks from backlog "Automatic migration system" for sprint
|
|
-
|
|
!python {model: project.scrum.backlog.create.task}: |
|
|
new_id = self.create(cr, uid, {'user_id': ref("base.user_al")})
|
|
task_obj = self.pool.get('project.task')
|
|
backlog_obj = self.pool.get('project.scrum.product.backlog')
|
|
|
|
new_task = self.do_create(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_0")]})
|
|
backlog_data = backlog_obj.browse(cr, uid, ref("scrum_product_backlog_0"), context)
|
|
task_ids = task_obj.search(cr, uid, [('product_backlog_id','=', backlog_data.id)])
|
|
assert len(task_ids), "Task not created"
|
|
task = task_obj.browse(cr, uid, task_ids[0], context)
|
|
|
|
assert task.name == backlog_data.name and task.total_hours == backlog_data.expected_hours and task.user_id and task.user_id.id == ref("base.user_al"), 'Task not has been created'
|
|
-
|
|
I send email to scrum master with scrum meeting details.
|
|
-
|
|
!python {model: mail.compose.message }: |
|
|
ctx = context.copy()
|
|
ctx.update({'active_model': 'project.scrum.meeting', 'active_id': ref("scrum_meeting_0"), 'active_ids': [ref("scrum_meeting_0")]})
|
|
vals = self.default_get(cr, uid , [], context=ctx)
|
|
try:
|
|
new_id = self.create(cr, uid, {'email_from': 'test@openerp.com', 'email_to': 'xyz@mycompany.com', 'subject': 'test'})
|
|
self.send_mail(cr, uid, [new_id], context=ctx)
|
|
except Exception, e:
|
|
pass
|
|
-
|
|
I close sprint after review
|
|
-
|
|
!python {model: project.scrum.sprint}: |
|
|
self.button_close(cr, uid, [ref("scrum_sprint_0")])
|
|
-
|
|
I check state after closed sprint.
|
|
-
|
|
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint shoud be in close state}:
|
|
- state == "done"
|
|
-
|
|
I print Burndown chart of Sprint.
|
|
-
|
|
!python {model: project.scrum.sprint}: |
|
|
import netsvc, tools, os
|
|
data_dict = {'model': 'project.scrum.sprint', 'id':ref('scrum_sprint_0')}
|
|
(data, format) = netsvc.LocalService('report.scrum.sprint.burndown').create(cr, uid, [ref('scrum_sprint_0')], data_dict, {})
|
|
if tools.config['test_report_directory']:
|
|
file(os.path.join(tools.config['test_report_directory'], 'project_scrum-project_scrum_sprint_burndown.'+format), 'wb+').write(data)
|