JIRA CLI CopyValue and appendText

Hello Experts,

i have two customfields:

MR as Single Line Text

and

MRS as Multi Line Text.

No i want to move all text from MR to MRS.

The problem is that several issues already have text in MRS and i do not want to overwrite them.

I tried the JIRA cli which i believe can work:

java -jar `dirname $0`/lib/jira-cli-3.9.0.jar --server JIRAURL --user xx --password xxx --issue "XXX-1" --action copyFieldValue --appendText --field "Merge Request" --field2 "Merge Requests"

But i want a line break before the text from MR to MRS will be copied.

 

At the moment this is the result:

https://jira.dehttps://appendedtext

 

But i want it like this:

https://jira.de

https://appendedtext

 

 

1 answer

1 accepted

I haven't tried this, but, this might work. First use setFieldValue on the target field and append text using --value " \n " (the spaces are important). Then do the action you did before. 

now it looks like this :-< https://jira.de\n java -jar `dirname $0`/lib/jira-cli-3.9.0.jar --server JIRAURL --user xxx --password xxx --issue "xxx" --action setFieldValue --appendText --value " \n " --field "Merge Requests"

Unfortunate :(. Looks like we aren't converting that value field like we do for some other text fields. Sorry, I don't have any other suggestions.

I suspect this use case could be handled with setFieldValue once JCLI-742 gets implemented.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,064 views 6 19
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot