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):
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:
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
So, it would appear that this should be possible, if it is in their doc. Hoping someone can provide some help and guidance!
Erich
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Using the {{Description}} SmartValue allows you to keep the existing Description and then add more text below it, as illustrated above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mykenna Cepek Worked like a charm! Now I need to research how to format the text (i.e. boldface, etc). Thanks for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras _Relational_ had the right idea -- you can Accept his answer too -- he deserves it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Erich M I mean this one:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nope! See what I wrote in my answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.