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

Getting an error using automation to update the description field of a story

Erich M October 15, 2021

We've recently created a template for user stories, and I'm trying to use automation to update the description of all existing user stories to match the new format.  This will likely be a bit complex automation and take a few steps, but the first step is just to add to/edit the existing story a word.  As a test, I created a test story and am trying to edit it with the code below (note, I don't really know JSON, but have had some guidance):

 

JSON1.png

 

I don't believe the description field needs brackets, but if I put brackets around it like below, the error goes away, but I get a runtime error:

 

JSON2.png

Error1.png

 

It seems it does not like the description field in the update section, however, this snippet of code is in atlassian doc.

 

Advanced field editing - JSON | Jira Software Cloud | Atlassian Support

doc1.png

So, it would appear that this should be possible, if it is in their doc.  Hoping someone can provide some help and guidance!

 

Erich

 

 

2 answers

2 accepted

5 votes
Answer accepted
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2021

I noticed that the documentation specifies Update > Description > Set, whereas your screenshot shows Update > Description > Add.

Have you tried changing your JSON from Add to Set, to see if that works?

Erich M October 15, 2021

Hi @Mykenna CepekI have, and it yields the same result.  Set isn't what I want anyway, as set will wipe out what is currently there.  I think I want either add or edit.

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2021

I think what @Alex Koxaras _Relational_ means is to just use the normal Automation Component to Edit Issue (rather than the More Options / Additional Fields / JSON) method:


Screen Shot 2021-10-15 at 1.34.05 PM.png


Using the {{Description}} SmartValue allows you to keep the existing Description and then add more text below it, as illustrated above.

Erich M October 15, 2021

@Mykenna Cepek Got it.....let me give it a shot, thanks!

Erich M October 15, 2021

@Mykenna Cepek Worked like a charm!  Now I need to research how to format the text (i.e. boldface, etc).  Thanks for your help!

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2021

@Alex Koxaras _Relational_ had the right idea -- you can Accept his answer too -- he deserves it!

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2021

Hi @Erich M and welcome to the community!

Apart from what @Mykenna Cepek stated, you could always use the normal update, rather than JSON. You can leave JSON for other fields, more complex. And of course you can have both while editing the issue.

Erich M October 15, 2021

@Alex Koxaras _Relational_ I didn't see a "normal" update.  Let me look into that more....

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2021

@Erich M I mean this one:

description.png

Erich M October 15, 2021

@Alex Koxaras _Relational_ Ok, I'll try that, but from the pre-filled text, it appears that any existing description will be wiped.  I'll give it a go and see what happens and report back.

Erich M October 15, 2021

@Alex Koxaras _Relational_ yes, it wipes what is currently there and replaces it with what you indicate in the automation.  So seems I have to go the JSON route, if it is even possible.

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 15, 2021

Nope! See what I wrote in my answer.

Like Erich M likes this
Erich M October 15, 2021

Thanks to you both @Mykenna Cepek and @Alex Koxaras _Relational_ !

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events