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

Groovy Server 6 to server 8

Eduard Diez
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.
Mar 22, 2021

Hi community

 

I've this code in Groovy server 6 and I would to put in server 8 the problem is that not find the method. Cause any methods are changed, Can you help me to verify this code? thank's

 

The code in Jira is :

Captura1.PNG

1 answer

1 accepted

1 vote
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 29, 2021

There is nothing wrong with that code. 

The "getIssueContext()" method will return a valid issue if there is one. 

But the static type checker doesn't know that. This is why you are getting this error/warning. It should still work.

Now, if you don't like to see the error in the editor, I'd recommend you use the following instead:

underlyingIssue.getCustomFieldValue(customFieldManager.getCustomFieldObject(10512))

 underlyingIssue is always of type Issue. As opposed to issueContext which can either be an Issue or IssueContext

But be careful with behaviours expected to run in the "Create" screen before the issue has been saved. In that case, the underlyingIssue will be null.

Eduard Diez
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.
Mar 29, 2021

Thank's @Peter-Dave Sheehan !!!

 

I usually works in JIRA cloud, but in this project I'll work in server... so for me is all new

 

Thank's for the response

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events