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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,557,293
Community Members
 
Community Events
184
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
AUG Leaders

Atlassian Community Events