A Single Jira Ticket - PresentationML

A JIRA integration bot sends a message as a result of a new ticket being created. The message is submitted as PresentationML and EntityJSON:

PresentationML

MessageML
<div data-format="PresentationML" data-version="2.0">
    <div class="entity" data-entity-id="jiraIssueCreated">
        <div class="card barStyle">
            <div class="cardHeader"> 
				<img src="https://whiteam1.atlassian.net/images/icons/priorities/highest.svg" /> 
				<a href="https://whiteam1.atlassian.net/browse/SAM-25/">SAM-25</a> 
				<span>Issue Test - </span> 
				<span class="entity" data-entity-id="mention123">@Bot User01</span>                
				<span class="action">Created</span> 
			</div>
            <div class="cardBody">
                <div class="entity" data-entity-id="jiraIssueCreated">
                    <div class="labelBackground badge">
                        <p> 
							<span class="label">Description:</span> 
							<span>Only for test</span> 
						</p>
                        <p> 
							<span class="label">Assignee:</span> 
							<span class="entity" data-entity-id="mention456">@Bot User02</span> 
						</p>
                    </div>
                    <div class="labelBackground badge">
                        <p> 
							<span class="label">Type:</span> 
							<img src="Story" /> 
							<span class="label">Priority:</span> 
							<img src="https://whiteam1.atlassian.net/images/icons/priorities/highest.svg" /> 
							<span>Highest</span> <span class="label">Labels:</span>                            
							<span class="entity" data-entity-id="hash789">#production</span> 
						</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

EntityJSON

EntityJSON
{
    "mention123": {
        "type": "com.symphony.user.mention",
        "version": "1.0",
        "id": [{
            "type": "com.symphony.user.userId",
            "value": "123456"
        }]
    },
    "mention456": {
        "type": "com.symphony.user.mention",
        "version": "1.0",
        "id": [{
            "type": "com.symphony.user.userId",
            "value": "654321"
        }]
    },
    "hash789": {
        "type": "org.symphonyoss.taxonomy",
        "version": "1.0",
        "id": [{
            "type": "org.symphonyoss.taxonomy.hashtag",
            "value": "#production"
        }]
    },
	"jiraIssueCreated": {
        "type": "com.symphony.integration.jira.event.created",
        "version": "1.0",
        "user": {
            "type": "com.symphony.integration.user",
            "version": "1.0",
            "id": 123456,
            "emailAddress": "bot.user01@symphony.com",
            "username": "bot.user01",
            "displayName": "Bot User01"
        },
        "issue": {
            "type": "com.symphony.integration.jira.issue",
            "version": "1.0",
            "key": "SAM-25",
            "url": "https://whiteam1.atlassian.net/browse/SAM-25/",
            "subject": "Issue Test",
            "description": "Only for testing",
            "issueType": "Story",
            "labels": [{
                "type": "com.symphony.integration.jira.label",
                "version": "1.0",
                "text": "production"
            }],
            "priority": {
                "type": "com.symphony.integration.jira.priority",
                "version": "1.0",
                "iconUrl": "https://whiteam1.atlassian.net/images/icons/priorities/highest.svg",
                "name": "Highest"
            },
            "assignee": {
                "type": "com.symphony.integration.user",
                "version": "1.0",
                "id": 654321,
                "emailAddress": "bot.user02@symphony.com",
                "username": "bot.user02",
                "displayName": "Bot User02"
            }
        }
    }
}


			

Need help? Email help@finos.org we'll get back to you.

Content on this page is licensed under the CC BY 4.0 license.
Code on this page is licensed under the Apache 2.0 license.