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,556,047
Community Members
 
Community Events
184
Community Groups

Jira Scriptrunner REST endpoint redirect to a website

Hi,

I have the following structure, using scriptrunner features:

1. Custom web item with "Do WHat" = "Run code and display a dialog"

2. REST endpoint that gets the request and pops up a dialog window, the user fills it up and clicks "Submit"

3. REST endpoint get's the submit, creates a new jira issue

What I need is after creating the issue in stage 3 immediately open it.

Any idea how to do so?

1 answer

1 accepted

0 votes
Answer accepted

I got an answer. you can ignore this thread

Hi @Elyashiv Grosser 

Can you please share what is the solution, I have a similar requirement, but instead of creating a new issue, it should store the response in the ticket. 

Thanks!

Hi @Harsh

I will try to keep it simple.

After creating the issue, I get the new issue key, and store in a variable the url of the key:

 

    if (new_issue_key) {

        result = "<base url>/browse/" + new_issue_key

    } else {

        result = "ERROR: No Issue was Created"

    }
Then create a new dialog as follows:
  def dialog2 =

        """

            <script>

                window.location.href = "${result}"

            </script>

        <h1>If you see this, what you tried to do may didn't work please try to visit: ${result}</h1>

      """

Hopes this helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events