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
Community Members
Community Events
Community Groups

HELP!!! Using Python Jira API, how to create a task under a given user story?


Here is my use case.

I have to create multiple tasks under a single user story (SMGP-1000) on the 3rd of every month. These tasks are tracked for various purposes. Now, I am able to create multiple tasks using the below code.

new_task=jira_instance(project='2323', summary='New Task',description='',issuetype={'name'='Task'})

Then what I am trying is, to use this function from Jira add_remote_link() function to link this task with SMGP-1000. At this point, I get a failure ( Get Recoverable Error from GET https://jira......, will retry [1/3] in 10s " 

add_remote_link(SMGP-1000,new_task )  # I tried swapping the variables, but still same error.


Could you please help me with a code snippet on how to link this new task to that given story?

1 answer

0 votes

Hi @Clicker 

I believe you need to use create_issue_link 

It would be something link this

inwardIssue = jira.issue("storyissue-1")
outwardIssue = jira.issue("taskissue-1")
issueLinkType = 'Relates'

I hope that helps.

Kind regards,
Thiago Masutti

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you