Jira Assets custom field behaviour on customer portal

Richard Malone November 29, 2022

Hi everyone.

I have recently created a custom field that will list an employee's assets(Field name: User Assets) in an issue, once the user is selected in another custom insight field on the same issue.

When creating a ticket in Jira, the "User Assets" field defaults to "automatic", and once the user field is properly populated, it will auto populate.

However, it doesn't behave the same when I add the field to the customer portal. The "automatic" default doesn't appear here, so the assets have to be manually selected.

Does anybody know how to make the field automatic from the portal, so that customer's don't have to manually search for the assets?

2 answers

0 votes
Martin Svensson April 12, 2023

Hi Richard

I have the exact same problem as you. 

"Automatic" dosent work because its a serverside script so it runs after the ticket is created.

Weird function, if you ask me.

 

I've been working on a code, just need to get some help on the last bits. 

scriptrunner behaviours autopopulate asset customf... (atlassian.com)

0 votes
Hieu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2022

I would like to suggest using the behavior scripts(Script Runner), hope you have script runner


def otherField = getFieldById("customfield_xxxxx")
def userAssets = getFieldById("customfield_zzzzz")
userAssets.setFormValue(otherField.getValue())


https://docs.adaptavist.com/sr4js/latest/features/behaviours/api-quick-reference

Suggest an answer

Log in or Sign up to answer