Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hello all,
I'm trying create/edit issues though CMD. I'm getting error Messages that "bla bla field" does not exist. I put below an example of the script that I'm currently playing with:
echo off
SET CHANGE_REQUEST_#=1829826
SET TITEL="SRS/IRS Update"
SET PROJECTID="/PSE/AECU/CustomerDev/VW/PR34481_MQB-A0"
SET PROJECTGROUP="(248246) VW MQB-A0"
SET ITEM_CLASSIFICATION="Requirements"
SET PRIORITY="High"
SET DESCRIPTION="Update the SRS and IRS requirements with respect to the ASPS baseline 0.19. Link the updated requirements to their ASPS counterparts."
echo on
im createissue --type="ALM_Task" --field=Description=%DESCRIPTION% --field=Classification=%ITEM_CLASSIFICATION% --field=Project=%PROJECTID% --field=Summary=%TITEL% --addRelationships="Backlog Item For":%CHANGE_REQUEST_#% --field=Priority=%PRIORITY%
When I run the above script I receive the below error message:
c:\Users\kusuo\Desktop>echo off
c:\Users\kusuo\Desktop>im createissue --type="ALM_Task" --field=Description="Upd
ate the SRS and IRS requirements with respect to the ASPS baseline 0.19. Link th
e updated requirements to their ASPS counterparts." --field=Classification="0" -
-field=Project="/PSE/AECU/CustomerDev/VW/PR34481_MQB-A0" --field=Summary="SRS/IR
S Update" --addRelationships="Backlog Item For":1829826 --field=Priority="High"
Creating ALM_Task ...
*** Could not save item: MKS124066: Field "Description" does not exist.
I tried removing the field description from the code then I received another filed related error. In Addition, all the fields that I'm trying to update are obligotary fields. By the way, I do not have admin access rights.
I would appreicate your solution Solutions.
Regards,
Özgür
Solved! Go to Solution.
Hi Lance,
as suggested after some "trial and error" I ended up with the following command which worked for me.
c:\Users\kusuo\Desktop>im createissue --type="ALM_Task" --field=ALM_Description= "Update the SRS and IRS requirements with respect to the ASPS baseline 0.19. Link the updated requirements to their ASPS counterparts." --field=ALM_Classification="Requirements" --field=Project="/PSE/AECU/CustomerDev/VW/PR34481_MQB-A0" --field=Summary="SRS/IRS Update" --field=ALM_Priority="High" --field=ALM_Team="(248246) VW MQB-A0" --addRelationships="ALM_Work Item For":1829826 --field=ALM_Owners ="KusuO"
Creating ALM_Task ...
Editing fields ...
Adding relationships ...
Relationship 1829826: added
Submitting ...
Created ALM_Task 1834872
I'll post this as the "Richtige Antwort". Thanks for looking into this!
Regards,
Özgür
I would assume because your Task is titled ALM_Task that an administrator installed the data solution using a prefix called ALM_ so all types and fields probably are called ALM_* which means your Description field is ALM_Description as your other fields will be similar..
Thanks Lance for the answer.
I tried adding ALM_* to all the fields as you suggested, it seemed to be working for some of them. By trial and error I managed to get rid off the "no such a field" error. Now I get the following:
c:\Users\kusuo\Desktop>im createissue --type="ALM_Task" --field=ALM_Description=
"Update the SRS and IRS requirements with respect to the ASPS baseline 0.19. Lin
k the updated requirements to their ASPS counterparts." --field=ALM_Classificati
on="0" --field=Project="/PSE/AECU/CustomerDev/VW/PR34481_MQB-A0" --field=Summary
="SRS/IRS Update" --field=ALM_Priority="High" --field=ALM_Team="(248246) VW MQB-
A0" --addRelationships="Work Item For"=1829826
Creating ALM_Task ...
Editing fields ...
Adding relationships ...
*** Could not save item: MKS124435: Value "Work Item For=1829826" is not a valid
value for field "Forward Relationships".
We use PTC version 10.5, according to my internet search "addRelationships" should have worked.
I'm not sure though whether the situation is getting better or worse!!
Ensure that "Work Item For" is the proper name of the relationship field and not "ALM_Work Item For" and that the ID is a work Item. Furthermore, it could be your admin settings for forward relationships don't allow this type of relationship: TASK -> Work Item. I dont have a 10.5 version to test against so i guess we are stuck with trial and error. If you have access to view admin data or someone who does it would probably help you be more efficient.
Hi Lance,
as suggested after some "trial and error" I ended up with the following command which worked for me.
c:\Users\kusuo\Desktop>im createissue --type="ALM_Task" --field=ALM_Description= "Update the SRS and IRS requirements with respect to the ASPS baseline 0.19. Link the updated requirements to their ASPS counterparts." --field=ALM_Classification="Requirements" --field=Project="/PSE/AECU/CustomerDev/VW/PR34481_MQB-A0" --field=Summary="SRS/IRS Update" --field=ALM_Priority="High" --field=ALM_Team="(248246) VW MQB-A0" --addRelationships="ALM_Work Item For":1829826 --field=ALM_Owners ="KusuO"
Creating ALM_Task ...
Editing fields ...
Adding relationships ...
Relationship 1829826: added
Submitting ...
Created ALM_Task 1834872
I'll post this as the "Richtige Antwort". Thanks for looking into this!
Regards,
Özgür