Highlighted
Jayanta007 Absent Member.
Absent Member.
974 views

Error Adding a custom field in Quality center 12 via REST call.

I am trying to Create an Requirement In QC 12 via REST call.

I can create an Requirement which have no custom field value in them. but when i am giving the rest call with the value of custom field its giving an error saying "Field doesnot exists." although the Field is there.

 

HEre is my XML.

----------------------------------------------------------------------------

<Entity Type='requirement'>
    <Fields>
        <Field Name='user-03'>
            <Value>555</Value>
        </Field>
        <Field Name='user-01'>
            <Value>NOT Default SLT</Value>
        </Field>
        <Field Name='description'>
            <Value>&lt;html&gt;&lt;body&gt;Happy to Disturb&lt;/html&gt;&lt;/body&gt;</Value>
        </Field>
        <Field Name='name'>
            <Value>Rest Client: Requirement Added in Kovair7.0 at 12.39PM</Value>
        </Field>
        <Field Name='user-02'>
            <Value>Prasun</Value>
        </Field>
        <Field Name='type-id'>
            <Value>3</Value>
        </Field>
        <Field Name='req-priority'>
            <Value>3-High</Value>
        </Field>
        <Field Name='req-reviewed'>
            <Value>Not Reviewed</Value>
        </Field>
        <Field Name='parent-id'>
            <Value>1</Value>
        </Field>
    </Fields>
</Entity>

----------------------------------------------------------------------------

Notice that user-01,user-02,user-03 is my custom field. After posting the xml via rest call the error i am seeing is this.

----------------------------------------------------------------------------

<QCRestException>
    <Id>qccore.unknown-field-name</Id>
    <Title>Entity: requirement doesn't have a field named: user-03</Title>
    <ExceptionProperties/>
</QCRestException>

 

I am stuck on this for days any kind of help will be really apriciated.

 

P.S. This thread has been moved from Community Feedback & Suggestions to Quality Center Support and News Forum. -HP Forum Moderator

0 Likes
1 Reply
Micro Focus Contributor
Micro Focus Contributor

Re: Error Adding a custom field in Quality center 12 via REST call.

You need to consider whether this use field is actually in the requirement type. Fo to requirement types and confirm that this field is part of it. Even though you can see this field in project entities if its not included in that req type you'll see that it will simply tell you this field does not exist.

HP QC Support Engineer
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.