Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,502
Community Members
 
Community Events
165
Community Groups

Behaviour. Automatic completion of fields when creating a request

Edited

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.UpdateIssueRequest

def environmentFI = getFieldById("customfield_11111") 

def cfServic = getFieldById("customfield_222222") 
String cfAreaValue = cfServic.getValue()

def cfServi = getFieldById("customfield_33333") 
String cfServiceValue = cfServi.getValue()

def cfServ = getFieldById("customfield_44444") 
String cfDirectionValue = cfServ.getValue()

def getInsightObject(String key) {
Class objectFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().loadClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade")
def objectFacade = ComponentAccessor.getOSGiComponentInstanceOfType(objectFacadeClass)
return objectFacade.loadObjectBean(key).id.toString()
}

if (cfServic.getValue().equals("EI-313333") && cfServi.getValue().equals("EI-323333") && cfServ.getValue().equals("EI-333333")){
//environmentFI.setFormValue(getInsightObject("EI-343333"))
environmentFI.setFormValue("EI-353333")
}

2 answers

Problem

Script146.groovy:21 [Static type checking] - Cannot find matching method java.lang.Object#loadObjectBean(java.lang.String). Please check if the declared type is correct and if the method exists. @ line 21, column 12.

Unable to create automation. So that when creating a request, with certain selected fields, the remaining fields are filled

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

389 views 0 7
Read article

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