Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get the Value of Attributes

Deleted user October 29, 2024

Hi admins,

I have a complicated Asset object schemes. It works some how :)

I need to get the value of attributes' from issue. I wrote custom script post function. Bu it’s not working.

responsibleTeam: asset custom field

supportLevel: single select list custom field

firstLvlCF: asset custom field

 

def cfmgr = ComponentAccessor.getCustomFieldManager()

def responsibleTeam = cfmgr.getCustomFieldObject("customfield_12345")def

supportLevel = cfmgr.getCustomFieldObject("customfield_12345")

def responsibleTeamValue = issue.getCustomFieldValue(responsibleTeam)

def firstLvlCF = cfmgr.getCustomFieldObject("customfield_12345")

def firstLvl = issue.getCustomFieldValue(firstLvlCF)




if (supportLevelValue == "1st Level") { issue.setCustomFieldValue(responsibleTeam, firstLvl)

}

 

Bests,

Deniz

1 answer

0 votes
Valerie Knapp
Community Champion
November 2, 2024

Hi @[deleted] , thanks for your question.

Are you using an app for the scripted post function? If so, we can also tag the app into this question to get some more skilled eyes on it. 

It's also always a possibility to open a ticket to the vendor from the Atlassian marketplace to ask for assistance. 

I hope this helps you. 

Cheers

Deleted user November 4, 2024

Hi @Valerie Knapp ,

Yes we have scriptrunner and created a ticket to vendor.

I guess my college solved the problem. Thank you.

Have a nice day,

Deniz

Like Valerie Knapp likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events