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,552,550
Community Members
 
Community Events
184
Community Groups

How to access filed value from transition screen in validation

Hi,

I'm trying to check that user fill linked issue in transition screen (with additional conditions on the linked issue, so I need script runner).

How can I access the linked issue it validation?

issueLinkManager.getOutwardLinks(issue.id)

and

issueLinkManager.getInwardLinks(issue.id)

don't return it because it happen before the transition is finished.

Please help

1 answer

1 accepted

1 vote
Answer accepted
Henning Tietgens
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.
Jan 08, 2014

Hi Henning,

I'm still using the code that you gave me in the answer mentioned above. Thanks again! As a follow-on, how did you find the actual field/parameter names to be used in the code? If I want to use a similar method for another field, how did you find the names issuelinks-linktype and issuelinks-issues? If I remember right, viewing the page source shows me the main issue browse page, and not the transition dialog source.

Robert

linktype = request.getParameter('issuelinks-linktype')
linkedIssue = request.getParameter('issuelinks-issues')
(linktype == 'duplicates' && linkedIssue)

JamieA
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.
Jan 08, 2014

It's really only links that you need to worry about. Other fields you get from the issue in the normal way. This is a jira bug/shortcoming imho, haven't got round to reporting it yet.

Robert Poldervaart,

you can enumerate all possible parameters by simple loop:

for (def entry : request.parameterMap) {
    log.info(entry.key + "=" + entry.value)
}

JamieA
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.
Jan 09, 2014

You can, and that's nice and simple (I gave you a "like") - but I wouldn't recommend getting parameters like this. The reason is you will need to do type conversion yourself - eg if the assignee, then from a string to a User object, if "affects versions", from a String[] of version IDs to a Collection of Version objects. I don't think it will take you to a happy place.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events