It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA Service Desk - Copy Value of Organizations to Custom Field Edited

Hello - 

I am having a problem copying the (system) JIRA Service Desk Field Organizations to a (text box) custom field. I am using a post function Copy Field Value via the JMWE add on that allows me to do this with any other fields. 

It seems as though Organizations has a different kind of value than the name I gave it. What I am trying to do is copy the Organizations value "Admin" to the custom field "IT Organization." You can see via the screenshot that the value "4" gets copied to IT Organization."

Is there any kind of work around in order to get what I actually named Organizations (Admin) copied onto a custom field?

 

Organizations.PNG

1 answer

1 accepted

1 vote
Answer accepted

Hi Michael,

You should be able to achieve this by using the 'Set field value (JMWE add-on)' post function.  This allows you to set the value of your new custom field using a Groovy expression.  

  1. Select your custom field, 'IT Organization', in the dropbox labeled 'Field'
  2. Change the 'Value type:' dropbox to 'Groovy Expression'
  3. Enter 'issue.get("Organizations")*.name' in the text area
  4. Click 'Add'

The output in your IT Organization field should reflect the Organizations name now, rather than the ID.

Hi Andrew - 

Thanks for the response. My question regarding your solution - will this allow me to actually copy the Organizations field (which is set when Issue gets created) to the IT Organizations field?

I'll give it a shot.

Hey Andrew - 

That totally worked. Thank you so much for your help!

@Andrew_SweetenHi Andrew, is it possible to get the value of the Organization name without brackets in the value?

If I use issue.get("Organizations")*.name it returns with: [some company name] in brackets like that. Anyway to get this without the brackets? Or remove the brackets somehow?

I also get the brackets "[Organization]" around my extract when using issue.get("Organizations")*.name i also tried issue.get("Organizations")?.name but i actually don't know the difference. Can some one assist? 

Here you go:
(issue.get("Organizations")*.name).join(', ')

Like Jesper_Mandrup_Keld likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Service Desk

How has Jira Service Desk increased productivity in your org?

Hi Jira Service Desk community, Atlassian is on a mission to unleash the potential of all teams, and we know that tools are just one piece of that puzzle. With Jira Service Desk, we have productiv...

184 views 0 3
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you