Forums

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

i need add due date on issue subtask using jira rest api

Yasashree June 8, 2021

Currently i am using 'https://projects-lab.cdk.com/rest/api/latest/issue/' to create subtask but i am unable to create due date for it. I am able to see due date field on jira but i am unable to add it using rest api by passing payload.

1 answer

1 accepted

1 vote
Answer accepted
Niranjan
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.
June 8, 2021

Hi @Yasashree ,

Are you able to set the due date field via JIRA UI ? To set Due date on an issue, you need "schedule Issue" permission on the project. You may need to check for the permission. 

Yasashree June 8, 2021

i am able to add due date in UI

Yasashree June 8, 2021

@Niranjan i am able to add due date in UI

Niranjan
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.
June 8, 2021

@Yasashree - Try to pass the value like this

"duedate": "2021-06-09"

If it does not work, kindly share the complete restapi POST call

Yasashree June 8, 2021

@Niranjan  where do i need to put this in payload 

Niranjan
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.
June 8, 2021

@Yasashree - Pass it like every other field. You can check this article .

Yasashree June 9, 2021

@Niranjan  it is working

 

{    "fields": {       

    "project": {            

               "key""TLRELEASE"       

                  },        

     "parent": {            

                "key""TLRELEASE-6735"      

                   },  

                                                                                                                   

     "summary""CHECK_Test",        

     "description""add description",        

     "duedate""2021-06-09",        

      "issuetype": {            

                       "name""Sub-task",           

                        "subtask"true        

     },
     "assignee": {           

           "name""akulay"       

 },       

 "labels": [ "ReleaseManagement""CS"        ]    }}

Like Niranjan likes this
Niranjan
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.
June 9, 2021

@Yasashree - Good to know. Kindly accept the answer so that the post will be marked as closed. Thanks

djohnson July 10, 2023

Hey @Niranjan

I am trying to set the due date for my subtask when it is created through the rest api. I am using the above format in my payload but still get a 400 error. Any advice?

Thanks,

Derek

Suggest an answer

Log in or Sign up to answer