Hi team,
I am trying to add hyperlink in description for the Jira ticket using REST API. If I add the hyperlink its storing as text only. Since I didn't find anything about this in Documentation, asking here in community to find better solution.
{"description",{"content":{{"content":{{"text":"Kindly copy and paste the below link in web browser to access the Last Week Candidates missed out report. ","type":"text"},{"type":"hardBreak"},{"text":Field1,"type":"text"}},"type":"paragraph"}},"type":"doc","version":1}}
In Field 1 we will add the hyperlink. We have tried html tags too, but its not working.
Hi, @prabhu
Welcome to Atlassian community.
It's kinda tricky. Here is example, how request body must look like:
"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "TEST",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://mail.ru"
}
}
]
}
]
}
]
}
Yes, sure.
Just looked at issue information, received through JIRA REST API
https://example.atlassian.net/rest/api/3/issue/ABC-123
Here is more detailed information about REST API
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How does that work when the link should be there somewhere in the middle of some text. Could somebody please share an example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solution to my question:
"description": {
"content": [
{
"type": "paragraph",
"content": [
{
"text": "some text,
"type": "text"
},
{
"type": "text",
"text": "Documentation link",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://attlassian.com"
}
}
]
}
]
}
],
"type": "doc",
"version": 1
},
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.
Hi, @prabhu
Sorry, I don't understand your question, what you want to do. Can you add more details to usecase?
If your ticket, after creation, goes to Backlog, and you want to transition it to another status, you can make one more REST API request, to transition created issue to needed status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your ticket, after creation, goes to Backlog, and you want to transition it to another status, you can make one more REST API request, to transition created issue to needed status.
- Yes that's correct. I want my ticket to create as TO-DO from the beginning without calling one more REST API request. And I want to know the syntax for that.
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.