Is it possible to make the "Link to a Confluence page" mandatory in a Jira ticket?

Developer 1 August 23, 2019

So, we have the already built in "Link a Confluence page" in Jira. 

https://www.collabshot.com/show/a5a226

 

Can we make mandatory to have that link for a certain type of tickets? (eg. all Story types).

I was not able to find a reference for it. I thought on creating a new Custom field add-on, however, I was not able to find a way to create the link through REST API. Is that even possible? Has anyone tried it before?

 

Thanks in advance!

1 answer

0 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2019

I don't know of a way to do this natively, but you might be able to require the page link using something like ScriptRunner.

edgar_polancogomez August 26, 2019

But could ScriptRunner actually do that? I hesitate about it. I assume it should be able to do it, if it can update the ticket through a REST API or something, right? 

I couldnt find an endpoint to add those link types to a ticket.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2019

I think the REST resource you are looking for is this ...

/rest/api/2/issue/{issuekey}/remotelink

It supports GET, POST, and DELETE. If you manually create a link on an issue you should be able to then do a GET on it to see the format to the object you need to supply for a POST. Should look like this ...

{
    "globalId": "appId={Your Confluence Applink Id}&pageId={Confluence Page Id}",
    "application": {
        "type": "com.atlassian.confluence",
        "name": "System Confluence"
    },
    "relationship": "Wiki Page",
    "object": {
        "url": "https://{Your Site Host Name}.atlassian.net/wiki/pages/viewpage.action?pageId={Confluence Page Id}",
        "title": "Wiki Page",
        "icon": {},
        "status": {
            "icon": {}
        }
    }
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events