We are trying to consolidate and simplify custom fields in use and one idea is to copy values from five different custom fields into one new custom field with all the same values as the old fields.
I wanted to use Scriptrunners copy-field feature, but it is not appending values and in the documentation they mention "If the target field already contains values, they are overwritten by any copied values."
Some other folks here mention JSU, but that is a workflow automation and I don't see how it could help here.
Is there some way to achieve this? I recon the only way to do it is to write a complex GROOVY script?
Hi Janez,
I don't use ScriptRunner, but using Automation for Jira you would use:
{{issue.description}} {{issue.field 1}} {{issue.field 2}}
So for the Description field, the first part would keep the existing value of the field and then the next two would be whatever the actual field names are of the other fields. Not sure if they puts you on the right path for ScriptRunner or not.
Thank you @John Funk, I like your suggestion and I did check out Automation for Jira if I can append the fields with it, but I was unsuccessful.
I tried this two approaches:
But this rule overwrote the values and did not append them even though I selected the "Add to existing values" when configuring the Edit issue action.
Then I tried with a script to copy the values instead of "Edit issue fields" as Automation for Jira has an option "Execute a ScriptRunner script" and used a simple script which failed on execution - probably the script was totally wrong (I have deleted it from automation so I can't post it here).
I will try to find/make a better script to use and try again.
But I would like to ask you what you meant with the smart-values you pointed me to:
{{issue.description}} {{issue.field 1}} {{issue.field 2}}
I tried to find an action in Automation for Jira where I could use your suggestion but I do not know which action could I use?
Appreciate your help,
Have a nice day,
Janez
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share the actual rule that you created?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, yes I can, it is simple like this:
The edit issue action looks like this:
Maybe the issue is that I am copying from a checkbox field into a Select List (multiple choices)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's probably it with the different field types.
However, you might take a look at this previous post about Components - not the same field but would behave the same way I think.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @John Funk that is quite an interesting functionality I did not know it existed in Jira, but unfortunately we are not using the cloud Jira, but the server one, so I don't have access to creating custom variables.
I will try to make a workaround then with additional custom fields that will act like the custom variables buffer so I can get the values out of checkbox fields and into the select list - and then try to append them all to the final field I am trying to fill.
Have a good day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, sorry! Forgot you were using Server. Good luck with the workaround!
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.
@Joe Red No we did not find a solution in Jira, so we changed the process and made some changes to fields in question.
If you have issue only with spelling, can't you correct that in values of the custom field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.