Skip to main content
5-Regular Member
August 4, 2015
Solved

creating story via API

  • August 4, 2015
  • 1 reply
  • 4495 views

I am creating a story via the API

im createissue --user=nshaikh --port=7001 --hostname=integrity.ptc.com --type=Story --addRelationships=Epic:168598 --field=Description=This backlog to develop 3rd Party Adapters Automation. --field=Current Estimate=16 --field=Scrum Team=3rd Party Adapters WPD --field=QA Required=false --field=Story Type=Story --field=Acceptance Criteria=Planned automation work completed. --field=Primary Segment=PLM --field=Summary=[Auto] 3PWGM - Adapters Automation - 1508 --field=Assigned Users=nshaikh --field=Product Owners=youkim --field=Pubs Required=false --

this returns with error

Failed with exception: Could not save item: MKS124066: Field "Epic" does not exist.

com.mks.api.response.impl.XMLResponseImpl@1188e820

This was working before Integrity migrated to new version

what is the fix for this

    Best answer by NS_7897134

    I did some investigation and then came up with the solution

    use "Backlog Item For" instead of Epic

    eg.

    im createissue --port=7002 --hostname=integritydev.ptc.com --type=Story --addRelationships="Backlog Item For":168598 --field=Description="This backlog to develop 3rd Party Adapters Automation." --field="Current Estimate"=16 --field="Scrum Team"="3rd Party Adapters WPD" --field="QA Required"="false" --field="Story Type"="Story" --field="Acceptance Criteria"="Planned automation work completed." --field="Primary Segment"="PLM" --field="Summary"="[Auto] 3PWGM - Adapters Automation"  --field="Assigned Users"="nshaikh" --field="Product Owners"="youkim" --field="Pubs Required"="false" --field="Product Line"="Windchill Core"

    1 reply

    16-Pearl
    August 4, 2015

    IMHO the problem lies in "--addRelationships=Epic:168598"

    As for the I10.6 CLI document this parameter is deprecated.

    You should use "--addFieldValues=Epic=168598" instead

    HTH

    5-Regular Member
    August 4, 2015

    I tried via API doe snot work

    I also tried via the im utility (see below)

    D:\Program Files (x86)\Integrity\IntegrityClient10\bin>im createissue --user=nshaikh --port=7001 --hostname=integrity.ptc.com --type=Story --field=Epic=168598

    Creating Story ...

    *** Could not save item: MKS124066: Field "Epic" does not exist.

    D:\Program Files (x86)\Integrity\IntegrityClient10\bin>

    16-Pearl
    August 4, 2015

    Hello Nazeer,

    Could you provide the output of this command:

         im viewtype --user=nshaikh --port=7001 --hostname=integrity.ptc.com Story

    Specifically, what we're interested in here is whether the field Epic exists.  Is Epic actually a type?  If so, is item 168598 an item of that type?  If so, is there a relationship field which connects a Story to an Epic?  It is likely that relationship field's name which should be used in the place of Epic when using --addFieldValues=<RelationshipField>=168598.

    Regards,
    Kael