Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Web item redirecting

Hi I have created a web Item. When I click the web Item it should run a script. The script works fine but the page is redirected to the rest end point URL. Any solutions please?

2 answers

@srinivasp you said you had similar issues right? Any solutions?. If you di have please mention the solution.

If you can apply Javascript for the web-item. Simply add a onClick event, then preventDefault() on that item.

Edit: You can also set the href for your item to #.

I'm unable to add JS to the web Item. And I need to provide the rest end point URL to run the code. So I can't give #

Like Ryker Tyler likes this

@Pradeep A how did you create your web-item (by a plugin, scriptrunner,...)?

@Pradeep A with ScriptRunner, you can set your web-item to "Run code and show a flag" and still keep your URL.Screenshot 2021-07-15 143139.png

Like Pradeep A likes this

Thanks @Ryker Tyler  Also can you please tell me how to send nested Json input to an HTTP request currently i'm doing like this

jsonBody.put("template@odata.bind","https://graph.microsoft.com/v1.0/teamsTemplates('standard')")

jsonBody.put("displayName", displayName)

jsonBody.put("description", description)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

593 views 2 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you