How can i copy Company field in insight to the custom field on jira request

sunilkumar Shangishetty December 14, 2020

How can i copy Company field in insight to the custom field on jira request

1 answer

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 14, 2020

Hi @sunilkumar Shangishetty ,

welcome to the Atlassian Community!

So, just to be sure about your situation. You've installed Insight and created some object scheme. Then in this object scheme you've creted object type Company? Or it is just some attribute of object type? How exactly does your object scheme looks like? Do I get it right you want your customers to be able to select from some objects in Insight, when they are creating request to your Jira Service Management portal?

sunilkumar Shangishetty December 15, 2020

Hi Hana,

Thanks for the response.

We have a object schema called "AD" in that we have Object type called "users" which contains attributes.

I'm trying to have that company(attribute) to be populated in company field on request if the reporter and email(attribute) are same.

something like

insight.user.email = reporter.email
{

company(insight) == company(request)

}

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2020

Hi @sunilkumar Shangishetty ,

thank you, now I get it.

The possible solution is to create attribute "Jira User" with type User for your object type "Users" and using this attribute link each user object with Jira user.

Then in your Company custom field you need to restrict provided options using Filter Scope (IQL), something like:


objectType = "Company" AND object having inboundReferences("Jira User" = currentReporter())
sunilkumar Shangishetty December 15, 2020

Hi Hana,

I can't create another attribute now.

Is it there any way to use the current attributes to set the company field on issue.

I know this can be achieved by script-runner, It will very helpfull if you can give some suggestions code in script-runner.

Any help is appreciated.

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2020

Hi @sunilkumar Shangishetty ,

did you found this script in the official documentation?

It is a post function, so the company object will be stored to some custom field after issue creation. But maybe it could also work for you?

Suggest an answer

Log in or Sign up to answer