我正在尝试使用Hansoft SDK将积压项目添加到sprint。
有一个功能" HPMFunctionTask 获取 LinkedToSprint"获取sprint的ID,该任务是链接的任务。遗憾的是,SDK中没有设置任务冲刺的功能。
有没有办法将项目提交给sprint?
谢谢你, Ondrás酒店。
答案 0 :(得分:0)
我得到了Hansoft支持的答复。
要将积压项添加到sprint,我必须创建一个代理项:
HPMTaskCreateUnified ProxyTaskCreate = new HPMTaskCreateUnified();
ProxyTaskCreate.m_Tasks = new HPMTaskCreateUnifiedEntry[1];
HPMTaskCreateUnifiedReference Parent = new HPMTaskCreateUnifiedReference();
HPMTaskCreateUnifiedReference Previous = new HPMTaskCreateUnifiedReference();
Parent.m_bLocalID = false;
Parent.m_RefID = Sprint.UniqueID.m_ID; // the task reference id of the sprint
Previous.m_bLocalID = false;
Previous.m_RefID = Sprint.UniqueID.m_ID; // the task reference id of the sprint
ProxyTaskCreate.m_Tasks[0] = new HPMTaskCreateUnifiedEntry();
ProxyTaskCreate.m_Tasks[0].m_bIsProxy = true;
ProxyTaskCreate.m_Tasks[0].m_LocalID = 0;
ProxyTaskCreate.m_Tasks[0].m_TaskType = EHPMTaskType.Planned;
ProxyTaskCreate.m_Tasks[0].m_TaskLockedType = EHPMTaskLockedType.BacklogItem;
ProxyTaskCreate.m_Tasks[0].m_ParentRefIDs = new HPMTaskCreateUnifiedReference[1];
ProxyTaskCreate.m_Tasks[0].m_ParentRefIDs[0] = Parent;
ProxyTaskCreate.m_Tasks[0].m_PreviousRefID = Previous;
ProxyTaskCreate.m_Tasks[0].m_Proxy_ReferToRefTaskID = Task.UniqueID.m_ID; // Task ref in backlog that we want to commit
Previous.m_bLocalID = true;
Previous.m_RefID = 0;
HPMChangeCallbackData_TaskCreateUnified ProxyResult = m_Session.TaskCreateUnifiedBlock(ProjectID, ProxyTaskCreate);
看起来很邋but,但很有效。最后,我必须在此代码上更改的是sprint和任务变量的名称。
Ondrás酒店