Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can use following templates:

...

Code Block
languagejava
titleExample 8
collapsetrue
#macro( showIssueAttributes $itemIssue )
	<li>reporter : $itemIssue.reporter</li>
	<li>issue Key : $itemIssue.key</li>
	<li>summary : $itemIssue.summary</li>
	<li>type: $itemIssue.issueType.name</li>
	<li>status: $itemIssue.status.simpleStatus.name</li>
	<li>current user: $currentUser</li>
#end

#macro( getCustomFieldsListAttachments $itemIssue )
	<ul>
		#foreach ($customField in $customFields)
			<li>custom field:
				<ul>
					<li>name: $customField.name</li> ///($customFields is available in v2.0.4 and above)
					<li>id: $customField.id</li>
					<li>value: $renderer.renderField($issue, $customField.name, "empty")</li>
				</ul>
			</li>
		#end
	</ul>
#end

#macro( showAttachments $itemIssue )
	<ul>
		#foreach ($attachment in $itemIssue.attachments)
			<li>attachment:
				<ul>
					<li>filename: $attachment.filename</li>
					<li>id: $attachment.id</li>
					<li>url: $baseUrl/secure/attachment/$attachment.id/$attachment.filename</li>
				</ul>
			</li>
		#end
	</ul>
#end

<p>Issue:
	<ul>
		#showIssueAttributes( $issue )
		<li>Custom fields:
			#getCustomFieldsListAttachments( $issue )
		</li>
		<li>Attachments:
			#showAttachments( $issue )
		</li>
		<li>Subtasks:
			<ul>
				#foreach ($subtask in $subTasks)
					<li>Subtask
						<ul>
							#showIssueAttributes( $subtask )
							<li>Attachments:
								#showAttachments( $subtask )
							</li>
						</ul>
					</li>
				#end
			</ul>
		</li>
	</ul>
</p>

To change date format in Word template for field "created"

Code Block
languagexml
titleExample 9
collapsetrue
$dateFormatter.withStyle("MM.dd.yyyy").format($issue.getCreated())



See also

PDF - Adding Easy PDF Word Issue Templates