Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy a value received from Rest API, and add it to a custom field?

Alex
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.
September 26, 2023

Greetings, Atlasian community!

Please tell me how can I copy the value received through the rest api (confluence page link) into a custom field in a task?

I used :

 /rest/api/3/issue/{issueIdOrKey}/remotelink ( everything works perfectly!)

I get the output: 

[
  {
    "id": 83474,
    "self": "https://myjira.com/rest/api/2/issue/OPSRDY-5246/remotelink/83474",
    "globalId": "appId=1dcc5b74-66f9-37f2-ab98-ecfd54c5ddfb&pageId=194348181",
    "application": {
      "type": "com.atlassian.confluence",
      "name": "Life"
    },
    "relationship": "mentioned in",
    "object": {
      "url": "https://mydomain.com/pages/viewpage.action?pageId=194348181",
      "title": "Page",
      "icon": {

      },
      "status": {
        "icon": {

        }
      }
    }
  }
]

 

My goal:

Pass this url to in customfield -  "myCf"  in issue jira   


"url": "https://mydomain.com/pages/viewpage.action?pageId=194348181"



I tried through Automation jira (smart value), but did not find the required example.. (The page id will be different each time)

Any help is appreciated!

Thank you!

1 answer

1 accepted

1 vote
Answer accepted
Alex
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.
September 26, 2023

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events