How to set a work item's QA Team and Phase Found using RTC Plain Java API?
According to posts in this forum, I should use following code to set QA Team and Phase Found.
But My Question is: If I have known the QA Team's name(For example, FVT), and PhaseFound's name(For example, Phase 1), how to get those objects which would be used by workItem.setValue(...)? Which class and method should I use to get the corresponding objects. I want to know how to write the code as below:
Of course, other implementation is welcome. Thanks in advance.
---------------------- These two attributes might be customized attributes:
displayName: QA Team
attributetype: test_team identifier: qa_team
displayName: Phase Found
attributetype: HowFound identifier: howfound
|
Accepted answer
Ralph Schoon (63.6k●3●36●47)
| answered Nov 28 '14, 4:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
It is unclear what type is used for these attributes. I assume it is an enumeration. If this is the case, look here https://rsjazz.wordpress.com/2012/08/20/manipulationg-work-item-enumeration-values/
cheng yingying selected this answer as the correct answer
Comments
cheng yingying
commented Nov 30 '14, 10:28 p.m.
Thanks for your help, Ralph. It really helps!
|
3 other answers
And I have a subsequent question. I've got following error when I have set values and save a defect work item. I have the permission to create a defect from UI. Does the following error mean I don't have the permission to create a defect by API? Thanks.
com.ibm.team.process.common.advice.TeamOperationCanceledException : CRJAZ6053E The 'Save Work Item' operation cannot be completed. Permission is required to complete the operation.
at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise( OperationAdviceManager.java:387 )
...
Name: Save Work Item
ID: com.ibm.team.workitem.operation.workItemSave
Severity: ERROR
Name: Required Properties
ID: com.ibm.team.workitem.advisor.requiredProperties
Severity: OK
Name: Required Approvals
ID: com.ibm.team.workitem.advisor.requiredApprovals
Severity: OK
Name: All Children Resolved
ID: com.ibm.team.workitem.advisor.allChildrenClosed
Severity: OK
Name: Save Project Area
ID: com.ibm.team.process.server.saveProjectArea
Severity: ERROR
Summary: Permission Denied
Description: You don't have permission to perform the following actions:
Modify the process specification (modify/specification)
Severity: ERROR
Name: Avoid saving private roles
ID: com.ibm.ics.scm.rtc.privateroles.project
Severity: OK
|
Looks like you are trying to save the project area.. not just the workitem
ID: com.ibm.team.process.server.saveProjectArea |
Thank you, Sam.
I believe I'm saving a work item(defect), don't know why it triggered the saveProjectArea. Following is the related code. And I have used the similar code to save a work item(task) successfully. Confused.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.