Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,443
Community Members
 
Community Events
184
Community Groups

Rest API to create issue with epic link

Hi, I am trying to create a ticket and include the epic_link (customefield_1003) but I am getting error "cf_10003 cannot be set. it is not on the appropiate screen"

Any suggestions as to how can I achieve this or what I am doing wrong. 

I am using Jira v8.5.17

 

Thank you 

 

curl -X POST --url https://jira.lab.com/rest/api/2/issue -s -u myaccount:mypass -H 'Content-Type: application/json' --data '
{
   "fields": {
        "project":
        {
               "key":"MYPROJECT"
         },
         "summary":"test epic Link info two",
         "description": "With this test we are including epic link info in api call",
         "issuetype":{
              "name":"Ticket"
         },
         "customfield_10003": "MYPROJECT-766"
  }
} '

 

 

{"errorMessages":[],"errors":{"customfield_10003":"Field 'customfield_10003' cannot be set. It is not on the appropriate screen, or unknown."}}

3 answers

2 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 27, 2021

Your REST call looks correct to me, so I'd want to do some debugging on the message it's coming back with.  Two tests:

1.  Can you create the issue over REST without the Epic link field?  (i.e. same code, but don't put in the line that sets cf_10003)

2.  Can you manually create the issue, as the user making the REST call, in the UI, filling in the Epic link with myproject-766?

@Nic Brough -Adaptavist-  sorry for the late reply.  for question 1, yes I can create a ticket excluding the epic link parameter.

for question #2, I am not familiar with making the REST call in the UI. can you give me an example on how will this be done. 

 

thanks

0 votes
Answer accepted
Fazila Ashraf
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 26, 2021

Hi @Juan Leon 

Welcome to community!

Can you confirm that the field customfield_10003 is available in create screen of the project and issue type?

Are you able to do the same operation from the UI successfully?

Hi @Fazila Ashraf  

Thank you for your reply, yes the 'Epik Link' (cf_10003) is available,

jira-create-screen.jpg

Update: It turned out that I used the wrong customfield number. it was cf_10001 instead of cf_10003.  thanks for your help. 

BHARGAV REDDI
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 10, 2023

How do you know that cf_id number is 10001

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2023

Because you look at the custom field ID?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events