Forums

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

Wanted to know how to add with the existing value instead of completely overwrite the issue

Rocky February 4, 2022
issue = jira_authentication('AB-123')
issue.update(fields={'customfield_0000': 'Updating scrub note'})

 customfield_0000 : My "customfield" to access the scrub notes

This thing is working for me but when I do this, the previous scrub notes are getting deleted and this is being overwritten by it.
Is it possible to Update the scrub note with the new value by also keeping the old scrub notes?

I am using Jira rest API and using python 3.7


Example 
If scrub note previously is 

"This is my scrub note"

When I run the above code,

I get my scrub note as "Updating scrub note"

But I actually want the old scrub note also,

So your solution should help me retain the old scrub note also,

When I run your solution the scrub note should be like this,

'Updating scrub note'
'This is my scrub note'


Thanks in Advance!!

1 answer

1 accepted

1 vote
Answer accepted
Tim Perrault
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.
February 4, 2022

Hi @Rocky 

 

I don't think this is possible just by updating the issue. It will just overwrite what you have. What you could do is grab the current value of the field and then add what you want to that. Once you have that update the field.

 

Thanks,

Tim

Rocky February 8, 2022

Thanks for the response. Your answer helped!!.

Suggest an answer

Log in or Sign up to answer