cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

how to create relateditem with mks

mattia
2-Explorer

how to create relateditem with mks

Hallo,

i have a problem to create a SW-Subtask with im createissue.

I use the following commandline:

(1) im createissue --Field="Project=/XX/YY" --Field="SWI=ZZ" --Field="Summary='my summary" --Field="Assigned User=me" --type=SW-Subtask --Field="Observer=he"

Creating SW-Subtask ...

Editing fields ...

Submitting ...

Could not save item: Cannot change the state to IMPLEMENTATION:

There's no parent of type SW-Task.

Then i used the following commandline:

(2) im createissue --Field="Project=/XX/YY" --Field="SWI=ZZ" --Field="Summary='my summary" --Field="Assigned User=me" --type=SW-Subtask --Field="Observer=he" --Field="parent=196" (196 is the parent workitem ID)

I got :

Creating SW-Subtask ...

Editing fields ...

Submitting ...

Could not save item: bitIndex < 0: -951

Could you please provide to me the correct solution to create a workitem with a predifined parent?

Thanks and regards

Miled Attia

ACCEPTED SOLUTION

Accepted Solutions
tketz
12-Amethyst
(To:mattia)

Hi @all

I'm the administrator of the integrity system at Attia's company.

I solved his problem by explaining our Process-Model (Request->SW-Task->SW-Subtask) and give him the right Syntax:

im createissue --type=SW-Subtask --field="Project=/MKS/MKS Test" --field=SWI=Undefined --field="Assigned User=xxx" --field=Observer=xxx --field=summary=testsub --addFieldValues="Backward Relationships=166286"

where 166286 is the parent Item (SW-Task in correct state)

Best Regards,

Tobi

View solution in original post

10 REPLIES 10

Hallo Miled,

Do you have a stack trace from your server's server.log file? You might need to turn up DEBUG logging, but I don't think that will be necessary for this issue.

Regards,

Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

Miled,

Did you resolve this issue successfully, or are you still stuck?

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

If you are working with documents and content nodes, you will need to use slightly different commands. For example:

rq createcontent --type=SW-Subtask --field="Assigned User=[username]" --field="Summary=My Summary" --field=SWI=ZZ --field=project=/XX/YY --parentID=[ID of node or document]


Hi Joe,

ich have tried to use this method, but i got the following error message.

**** The Type "SW-Subtask" is not a node type.

Regards

Miled

In that case, the SW-Subtask type can't be created with rq createcontent.  The rq createcontent command only works with content (node) types.


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
mattia
2-Explorer
(To:KaelLizak)

Any propsal to create an issue with type SW-Subtask and having a parent SW-Task?

Something seems odd, here.  Is SW-Subtask a document model content item?  The error from the rq createcontent command suggests it is not, but the error you originally posted suggests that it is:

Could not save item: Cannot change the state to IMPLEMENTATION:

There's no parent of type SW-Task.

Could you post the output of the commands:

     im viewtype SW-Task
     im viewtype SW-Subtask
Seeing how these types have been configured might suggest the best next action.

Regards,
Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
CompuGeek
5-Regular Member
(To:JoeBartlett)

Greetings,

 

I created a [Requirement] using "im importcontent" CLI command without specifying the [parentID]. This is allowed and is required. At the time of the item creation, the parent has not yet been created.The system is now preventing moving the item to the parent. See info below.

 

Below are the commands used

im importcontent --type=Requirement --field=Name=BCH_Test

Created ID 12201

im movecontent --insertLocation=first --parentID=22001 12201
*** MKS124717: The specified item 12,201 does not have a parent.

tketz
12-Amethyst
(To:mattia)

Hi @all

I'm the administrator of the integrity system at Attia's company.

I solved his problem by explaining our Process-Model (Request->SW-Task->SW-Subtask) and give him the right Syntax:

im createissue --type=SW-Subtask --field="Project=/MKS/MKS Test" --field=SWI=Undefined --field="Assigned User=xxx" --field=Observer=xxx --field=summary=testsub --addFieldValues="Backward Relationships=166286"

where 166286 is the parent Item (SW-Task in correct state)

Best Regards,

Tobi

mattia
2-Explorer
(To:tketz)

Thank you all for your Help and for the quick Reply!!

Announcements


Top Tags