Click or drag to resize

IssueCreateMessage

The IssueCreate element is used to create a new issues. At a minimum the ProjectId, ResolutionCode, StatusCode, and AssignedToUserId must be specified.

Any number of attachments, related issues, related items or subscribers can be specified. Note that specify more than a few attachments could cause significant delays.

On successful creation the server will respond with an IssueDetails message that contains the newly created issue's id number. If any errors are encountered then an Error message is returned.

Sample

The following message would create an issue with an attached file, a related issue, a related item, and a subscriber.

XML
<?xml version=\"1.0\" encoding=\"utf-8\" ?>    
<IssueCreate>      
  <Fields>        
    <ProjectId>24</ProjectId>        
    <ResolutionCode>New</ResolutionCode>        
    <StatusCode>Open</StatusCode>        
    <AssignedToUserId>jsmith</AssignedToUserId>        
    <PriorityCode>This Phase</PriorityCode>        
    <Summary>This is a significant problem</Summary>        
    <Steps>Start the program, it crashes immediately</Steps>        
    <DetectedInBuildCode>1.2.0.1</DetectedInBuildCode>        
    <SeverityCode>High</SeverityCode>      
  </Fields>   
  <Attachments>     
    <Attachment>       
      <AttachmentMimeType>text/plain</AttachmentMimeType>       
      <AttachmentFilename>a.txt</AttachmentFilename>       
      <AttachmentData>dGhlIHF1aWNrIGJyb3duIGZveA==</AttachmentData>     
    </Attachment>   
  </Attachments>   
  <RelatedIssues>     
    <RelatedIssueId>43</RelatedIssueId>   
  </RelatedIssues>   
  <RelatedItems>     
    <RelatedItem>        
      <RelatedItemUrl>http://www.rmtrack.com</RelatedItemUrl>        
      <RelatedItemTitle>RMTrack.com</RelatedItemTitle>        
      <RelatedItemOpenInNewWindow>false</RelatedItemOpenInNewWindow>     
    </RelatedItem>   
  </RelatedItems>   
  <Subscribers>     
    <Subscriber>       
      <SubscriberUserId>jdoe</SubscriberUserId>       
      <SubscriberSendEMail>true</SubscriberSendEMail>     
    </Subscriber>   
  </Subscribers>    
</IssueCreate>
Notes about the Fields element

The Fields element accepts any child element, and each child element is named after an actual field on the issue record. For example to specify the value for the Summary issue field then specify an child element: <Summary>Value goes here</Summary>.

The names of the Fields child elements must match actual issue fields. The matching is not case senstive, except that the closing tag must exactly match the opening tag. For example <SUMMARY>Some problems</SUMMARY> will match the issue field "Summary". However <SUMMARY>Some problems</summary> will fail basic XML validation.

The contents of any particular field will be validated based upon the field definition. If a field is defined as having a maximum length of 50 characters then this validation will occur.

Date and Date Time fields must be formatted according to the standard XML date format. For a simple plain old date, without a time, format it using yyyy-mm-dd.

Dates that include times are more complicated. RMTrack stores times either in the time zone of the server or in UTC. Incoming times that do not specify a time zone offset are assumed to be in the time zone that RMTrack is configured to use (either the server's time zone or UTC). Times that specify a time zone offset are converted appropriately (either to the server's time zone or to UTC).

Notes about the Attachment Element

The AttachmentData contents must be encoded as a base64 string.

XSD Schema Definition

The following is the schema definition used for the <IssueCreate> message (see IssueDetailsPost)

XML
<xs:element name="IssueCreate">
  <xs:complexType>
    <xs:all>

      <xs:element name="Fields" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence minOccurs="1" maxOccurs="unbounded">
            <xs:any processContents="skip" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="Attachments" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence minOccurs="1"  maxOccurs="unbounded">
            <xs:element name="Attachment">
              <xs:complexType>
                <xs:all>
                  <xs:element name="AttachmentFilename" type="xs:string" minOccurs="1" maxOccurs="1" />
                  <xs:element name="AttachmentMimeType" type="xs:string" minOccurs="1" maxOccurs="1" />
                  <xs:element name="AttachmentData" type="xs:string" minOccurs="1" maxOccurs="1" />
                </xs:all>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="RelatedIssues" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence minOccurs="1"  maxOccurs="unbounded">
              <xs:element name="RelatedIssueId" type="xs:integer" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="RelatedItems" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence minOccurs="1"  maxOccurs="unbounded">
            <xs:element name="RelatedItem">
              <xs:complexType>
                <xs:all>
                  <xs:element name="RelatedItemUrl" type="xs:string" />
                  <xs:element name="RelatedItemTitle" type="xs:string" />
                  <xs:element name="RelatedItemOpenInNewWindow" type="xs:boolean" />
                </xs:all>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

      <xs:element name="Subscribers" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence minOccurs="1"  maxOccurs="unbounded">
            <xs:element name="Subscriber">
              <xs:complexType>
                <xs:all>
                  <xs:element name="SubscriberUserId" type="xs:string" />
                  <xs:element name="SubscriberSendEMail" type="xs:boolean" />
                </xs:all>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

    </xs:all>
  </xs:complexType>
</xs:element>