CLI Reference > Workflows and Documents Commands > im createcontent
 
im createcontent
creates new content and adds it to a segment
Synopsis
im createcontent [--addRelationships=value] [--addSourceTrace=value] [--addSourceLink=value] [--addAttachments=value] [--type=type] [--field=value] [--richContentField=value] [--insertLocation=[first|last|before:ID|after:ID|[0,...]]] [--quiet] [--user=name] [--hostname=server] [--password=password] [--port=number] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)][--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [-g|--gui] [--settingsUI=[gui|default]] [--status=[none|gui|default]] [--parentID=value] [--customFieldValue=value]
Description
im createcontent creates new content and adds it to a parent segment. You can insert the content into a specified location in the parent segment's structural relationship list. For example:
im createcontent --parentID=23 --insertLocation=first
creates an empty issue and inserts it at the beginning of the structural relationship list for parent segment 23.
Options
This command takes the universal options available to all im commands, as well as some general options. See the options reference page for descriptions.
--field=value
specifies a field and its value for the issue, where value is of the form "fieldName=fieldValue", for example, --field=Severity=Critical.
If the field is multi-valued, value is of the form "fieldName=fieldValue,...".
To specify more than one field, specify this option for each field you want to add.
To specify a workflow and document project, project names must be preceded by a (/), for example, --field=Project=/testProject.
To specify a configuration management project, use the following syntax: --field=fieldname, server=server, project=projectname, [devpath=devpath|revision=checkpointrevision].
--richContentField=value
specifies a rich content field and its value for the issue, where value is of the form "richcontentfieldname=fieldValue".
To specify a link to an item by ID: <a href="mks:///item?itemid=ID">DisplayText</a>
For example: <a href="mks:///item?itemid=4547">Part Requirement</a>
To specify a link to an item by ID and label: <a href="mks:///item?itemid=ID&label=LABEL">DisplayText</a>
For example: <a href="mks:///item?itemid=4547&label=EDF-343">Part Requirement, Label EDF-343</a>
To specify a link to an item by ID and revision: <a href="mks:///item?itemid=ID&revision=REVISION">DisplayText</a>
For example: <a href="mks:///item?itemid=4547&revision=1.2">Part Requirement, Revision 1.2</a>
To specify a link to an item by ID and date: <a href="mks:///item?itemid=ID&asof=DATETIME">DisplayText</a> where date is in the format for your locale; such as US date formats "mm/dd/yy", "mm/dd/yyyy", or "mmm d, yyyy" with the time "h:mm:ss a".
For example: <a href="mks:///item?itemid=4547&asof=03/25/2012 12:04:00 AM">Part Requirement, March 25, 2012 12:04am</a>
* 
In the korn shell command line interface, HTML tags must be surrounded by quotes, for example, "b>Feature Overview/b>". In the Windows command line interface (cmd.exe), the ^ escape character must precede the and > characters in HTML tags, for example, ^b^>Feature Overview^/b^>. You may need to escape nested " characters, for example, --richContentField=Description="<a href=\"mks:///item?itemid=4547\">Part Requirement</a>"
--addRelationships=value
adds related issues to the issue, where value is of the form [FieldName]:IssueID[relationshipFlags][,...]. If no field name is specified, the Forward Relationships field is used.
* 
Adding a related issue is only permitted if your administrator has allowed relationships for the segment's issue type.
--addSourceTrace=value
adds a trace to a source file, where value is of the form "field=scmSourceFieldName,server=scmServerName,port=scmPortNumber,file=fileName,project=scmProjectName[,devpath=devpathName][,projectRevision=revision][,start=startLineNumber][,end=endLineNumber]".
Note the following:
If you specify a configuration path for project=scmProjectName then devpath=devpathName and projectRevision=revision cannot be specified.
You cannot add the same source trace more than once. In order to be considered a new source trace, the trace must have a unique combination of the following attributes: member name, server name, server port, project, project revision, development path, revision, start line number, and end line number.
--addSourceLink=value
adds a link to a source file, where value is of the form "field=scmSourceFieldName,revision=memberRevisionID, server=scmServerName,port=scmPortNumber,[file=fileName|subproject=subprojectName|isProject],project=scmProjectName[,devpath=devpathName][,projectRevision=revision] [,start=startLineNumber][,end=endLineNumber]".
Note the following:
If you specify a configuration path for project=scmProjectName then devpath=devpathName and projectRevision=revision cannot be specified.
You cannot add the same source link more than once. In order to be considered a new source link, the link must have a unique combination of the following attributes: member name, server name, server port, project, project revision, development path, revision, start line number, and end line number.
--addAttachment=value
adds attachments to the issue, where value is of the form "fieldName,path=pathToFile[,name=nameOfAttachment][,summary=shortDescription] " .
* 
Attachment size limits are set by your administrator. The default attachment size limit is 4 MB.
--insertLocation=[first|last|before:ID|after:ID|[0,...]]
determines where the new content should go in the parent segment's structural relationship list. The options are as follows:
first inserts the content at the beginning of the list
last inserts the content at the end of the list
before:<ID> inserts the content before the specified ID
after:<ID> inserts the content after the specified ID
[0,...] inserts the content at the specified location. If a negative is specified, the content is inserted at the beginning of the list. If the number specified is too large, the content is inserted at the end of the list.
--parentID=value
the ID of the parent segment that the issue will be added to. This option is required.
--type=type
specifies the type of issue. Your administrator defines issue types.
See Also
Commands: im removecontent, im copycontent, im movecontent
Miscellaneous: diagnostics, options, preferences