REST : Creating Work Items and XML considerations.
I am interested in creating Work Items as described in this article. This article refers to the Change Request Resource specification. I have 2 questions as follows.
1. Is there a specific XML schema that guides the change request resource XML payload ? Or, do I develop a schema based on that specification ?
2. In a RTC work-item, there are also fields for FiledAgainst, Severity, etc. I can get the tag names for these fields by looking into the XML representation of a work item. If I use them in the XML payload and assuming it works, can it be ensured that, this payload format is 'authentic' and not just a 'quick hack' ?
1. Is there a specific XML schema that guides the change request resource XML payload ? Or, do I develop a schema based on that specification ?
2. In a RTC work-item, there are also fields for FiledAgainst, Severity, etc. I can get the tag names for these fields by looking into the XML representation of a work item. If I use them in the XML payload and assuming it works, can it be ensured that, this payload format is 'authentic' and not just a 'quick hack' ?
3 answers
To answer your questions,
1. you have to follow the same structure defined by the schema. To start it simple, you can first get the XML structure of an existing work item and thenmake modifications to that and POST to the RTC server. This will create a new work item. with this as base for extending
2. You cannnot use Custom XML as payload. It should if i am not wrong, should follow the standards ( OSLC defined schema)
1. you have to follow the same structure defined by the schema. To start it simple, you can first get the XML structure of an existing work item and thenmake modifications to that and POST to the RTC server. This will create a new work item. with this as base for extending
2. You cannnot use Custom XML as payload. It should if i am not wrong, should follow the standards ( OSLC defined schema)
To answer your questions,
1. you have to follow the same structure defined by the schema. To start it simple, you can first get the XML structure of an existing work item and thenmake modifications to that and POST to the RTC server. This will create a new work item. with this as base for extending
I am already able to raise work items. My question is, does a schema exist for the payload or do I have to frame one based on the specification. In the link for Change Request Resource specification, there is no reference to an explicit XML schema document.
2. You cannnot use Custom XML as payload. It should if i am not wrong, should follow the standards ( OSLC defined schema)
Yes, I thought so too. But, then again, as per the specification, the only required fields are the title and identifier. Even if RTC server does raise a WI based on only these required fields, the created WI would have really scant details in a real world scenario.
I am able to create work items with the following fields populated tool.
Filed Against : rtc_cm:filedAgainst : Name of application
Severity : oslc_cm:severity : Severity of the defect
Found In : rtc_cm:foundIn : Found In
The required XML text was of course, copied from the XML of an existing WI. I would copy the fragment if only this editor allowed. :evil:
So, I guess, even though not concretely documented anywhere, one can raise RTC WI by not strictly adhering to the OSLC specification. :roll:
Filed Against : rtc_cm:filedAgainst : Name of application
Severity : oslc_cm:severity : Severity of the defect
Found In : rtc_cm:foundIn : Found In
The required XML text was of course, copied from the XML of an existing WI. I would copy the fragment if only this editor allowed. :evil:
So, I guess, even though not concretely documented anywhere, one can raise RTC WI by not strictly adhering to the OSLC specification. :roll: