Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automatically update organizations field with users organization

Bo Schlichting March 9, 2023

Hi all

 

I am struggling with an automatization which automatically will fill the organizations field (customfield_10400) with the organization the employee belongs to.

When end customers create tickets via the portal is it working perfect to get is set, but when it comes to our internal Sales/Operations/Marketing/etc. does it not populate the field.

I tried to select users, but then only for some of them did it work.

I then tried to use the below automatization.

 

image.png

As you can see in the log is the field empty and therefore no value is updated.

But my user belongs to the Sales Organization called Mover-Sales:

image.png

 

Any good suggestions on how to resolve this.

Right now we have a filter looking for tickets without an organization and then daily update those where 1st level forgets to validate and set it.

Kindly

Bo

2 answers

1 accepted

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2023

Hi @Bo Schlichting - You need to set the field using the organization ID.  This is how your JSON should look:

{
   "fields": {
      "customfield_10202": <ORG ID>]
   }
}
Bo Schlichting March 10, 2023

Hi @Mark Segall 

 

Thanks for the reply. :)

 

I have tried the following:

{
"fields": {
"customfield_10400": "Mover-Sales"
}
}

But that did not work and the log gave me the error message:

Error editing issues
MSSD-2899 (Specify the value for Organizations in an array (customfield_10400))

So I guess I need something else.

When I investigate a ticket can I see that field 10400 also gives:
customfield_10400 [2]
0 {3}
id : 16
name : Carlsberg
_links {1}
self : https: //usemover.atlassian.net/rest/servicedeskapi/organization/16
1 {3}
id : 4
name : Mover-Sales
_links {1}
self : https: //usemover.atlassian.net/rest/servicedeskapi/organization/4
 

So in this case can I see that the ID of Mover-Sales is 4, but how is the syntax to get it working?

I also tried:

{
"fields": {
"customfield_10400": <4>
}
}

Error while parsing additional fields. Not valid JSON.
So I need some more hints. :(
Thanks :)
Bo

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2023

Sorry my <> were only intended to indicate you need to fill in the blank.  It should simply be this:

{
   "fields": {
      "customfield_10202": 4]
   }
}
Bo Schlichting March 10, 2023

You nearly go me there. :)

I did though go with:

{
   "fields": {
      "customfield_10202": [4]
   }
}

And then it worked. :)

Thanks a lot. :) 

Like # people like this
Heather Ansell
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!
August 22, 2023

@Bo Schlichtinghow did you find the ID for the organization you wanted to build the automation for?  I'm trying to do the same thing, found the custom field ID but cannot figure out the Organization ID.

Bo Schlichting August 22, 2023

Hi Heather

I too one ticket, where the user assigned did also have an organization assigned.

Then I used the below link, which of couse needs to be changed to your needs:

https://usemover.atlassian.net/rest/api/2/issue/MSSD-2894?expand=names

So you need to replace usemover with your domain and MSSD-2894, with the ticket name. There you get the full payload of data with the fields and can search for the field. :)

Kindly

Bo

0 votes
Abraham - New Verve Consulting March 16, 2023

Hi @Bo Schlichting ,

To extend native Jira Organization features, you can consider using Crumbs.
You can use the newly released Crumbs API + Jira Automation together to link organizations automatically or to populate fields with organization data from Crumbs.

There is a page with screenshots about how to do this here: 

Copy customer fields to an issue

Hope this helps! If you have anymore questions or need further instructions you can submit a support request too :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events