Hello, I want to display the Description of an Issue in my Plugin, but I get it in this form:
h2. Welcome to your first issue {color:#707070}An issue is an item you want to track in a specific JIRA project. You can use JIRA to track all kinds of things.{color} h4. Types of issues {color:#707070}An issue could represent a software bug, a user story, a project task, a helpdesk ticket, or a leave request form, the list is endless!{color} !IssueTypes.png! h4. Issue attributes {color:#707070}You may have noticed that an issue has some system fields such as: type, priority and status. These fields are there to help you categorise and track the progress of each issue.{color} Next: [Changing an issue's status|DEMO-2] \\ ---- [Learn more about issues|https://confluence.atlassian.com/display/JIRA/What+is+an+Issue] \\
How can I use AJS to format this,or the JiraAPI to do this?
regards
chris
Hello, thanks for that, but this is not what I search.
I want to format it too pretty looking HTML, not the Meta or whatever this is.
Javascript/Jquery
AJS.$(#description-val).text() will grab the description of an issue. you can trim() to remove white space. Obviously this is javascript so should be once page loads.
API
https://host:port/rest/api/2/issue/{issueid}
which will return your issue in json. Then you can assign it to a variable in javascript i.e. :
function getDescription()
{
var description;
AJS.$.ajax({
url: "/jira/rest/api/2/issue/TEST-1",
type: 'get',
dataType: 'json',
async: false,
success: function(data) {
description = data.fields['description'];
}
});
return description;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, thanks for that, but this is not what I search.
I want to format it too pretty looking HTML, not the Meta or whatever this is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.