JIRA Service Desk - Copy Value of Organizations to Custom Field in Jira Software

André June 6, 2018

Hi,

I try to get the value from the organization from Jira Service Desk request to a linked Issue in Jira Software.

We've Scriptrunner, Automation for JIRA  and JMWE bought and could use them to get this work.

Does anyone know if this is possible?

Thank you!

André

2 answers

1 vote
Meg Holbrook
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2018

I think you could definitely get Automation for JIRA to work this out. I'd advise from a scriptrunner perspective, but I'm SO BAD at code. 

 

Here is a quick mock of something I think would work (haven't tested, but it's a start).

2018-06-06_15-38-07.png

For example: 

- SoftwareTicket-12 is linked to JSDticket-5

- Organization in JSDticket-5 is changed --> Kicks off the automation from SoftwareTicket-12

- JSDTicket-5 copies the value from the organization field to the SoftwareTicket-12

Andre Schäfer June 7, 2018

Hi,

thanks a lot for your answer!

I've found a little different solution. Because you cannot reuse the "Organization" field from Jira Service Desk in Jira Software (according to this issue https://jira.atlassian.com/browse/JSDSERVER-5291 ) you have to create a custom field to put the info to.

I've created an custom field called "Orga" in my project and get the info by using smart field values, which are available.

{
"update": {
"Orga": [
{
"set": "{{issue.customfield_10500.name}}"
}
]
}
}

In my case, the "Organization" field has the ID customfield_10500.

organization_customfield.png

Like Emilio Gómez likes this
Dayvis_Apolinário
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 8, 2019

@Andre Schäfer

Hello!

I need to solve this same problem. What screen is this from the image above and where do I find it?

André May 8, 2019

@Dayvis_Apolinário 

This screen is from Automation for Jira . You can find it in Administration -> System -> Automation -> New action -> Create Issue

Emilio Gómez October 4, 2021

@André Did you need to have Orga custom field manually filled with Organizations before applying your workaround (assigning the organization to the ticket)? Or will this assignment automatically create a new value for "Orga" Custom field?

I'm looking for a way (without using plugins) to create this "Orga" custom field in Jira Software but automatically creating its values from Jira Service Organization (native) field. Otherwise, we will need to manually maintain (add) organization names in "Orga" custom field. 

Like Christopher Reed likes this
Christopher Reed
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2021

@Dao Starita came up with the solution and I mixed it with the code from @Andre Schäfer and it works perfectly. My custom field is "Organization Affiliation" and it's what I shove to multiple reporting locations and allows me to sort and filter more easily and reuse across projects.

{
"update": {
"Organization Affiliation": [
{
"set": "{{issue.Organizations.name}}"
}
]
}
}

jaison dsouza May 2, 2024

Does the custom field type u select while creating in JSW matters? I have selected label type and used the code above it the organization fields are not getting copied over

 

How can I proceed as both isn't working for me through automation

 

0 votes
Clemens Kahrer March 23, 2021

I have quite a similar question, but I would like to use a scriptrunner listener.
In my case I would like to copy the organizations field to a custom field in the same service desk project and update it whenever the organizations field is updated.

Any suggestions for that?

Dao Starita June 11, 2021

I have the same question as Clemens. Any suggestion would be appreciated. Thanks.

Dao Starita June 11, 2021

@Clemens Kahrer 

I found a solution for my use case. I need to populate a custom field with the value in Organizations field (Service Desk's field). In the set field value field in Automation, I set the value to "{{issue.Organizations.name}}" and it works for me.

Here is the help article about smart values: https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

Hope this helps you.

Like Christopher Reed likes this
Clemens Kahrer June 23, 2021

Hey!

Unfortunately not, as we are using JSM Server and not Cloud so far.

Thanks anyway - so maybe we need to switch to Cloud to have this opportunity.

best regards,
Clemens

Pat Keenan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 23, 2021

One of our installs is server and another is data center. We intalled an automation plugin, Automation Lite for Jira, free for Server and cost a small amount monthly for data center. That allows us to use automation rule. Hope this helps.

Suggest an answer

Log in or Sign up to answer