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,551,671
Community Members
 
Community Events
184
Community Groups

How to access Asset data in a validator, JSM issue create

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 27, 2023

I want to validate a JSM request using scriptrunner in the create step. But I'm struggling to get it to work.

I have the following to check the id of an Asset field is the value e want and to also check a second dependent field is populated.

(issue?.customfield_12411.filter(it => it.objectId == "608").length > 0)
&&
issue?.customfield_10344 != null

This works as expected in the Test option o the validator set up screen.

But in situ, creating a request ticket in the portal it returns the error message in all conditions.

Has anyone accessed Cloud Assets in a jira expression?

1 answer

0 votes
Ken McClean
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.
May 08, 2023

@Tom ListerI know that when we were using ProForma for forms, we had a hell of a time getting the values of custom fields.  Essentially no matter what we did, if the validator was running on issue create it would run BEFORE the custom field had a value filled in.

I think I eventually ended up adding some code to my validator that first reindexed the specific issue, and only then checked it for the value of the custom field.

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 09, 2023

Hi @Ken McClean 

I have been told by Appfire that this is a known bug and is being tracked here

https://jira.atlassian.com/browse/JSDCLOUD-12479

We may look at automation to check the data and notify the reporter that there are data conditions to check.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events