Use web-item as a Transition button will open new page

Nhac Tat Nguyen July 4, 2019

Hi there,

I'm creating a web-item at workflow bar (section="transitions-all", see my button ">> Release" below), and that web item will trigger a transition.
When I click on my button, the transition is done but it will lead me to new page (that is my webwork view). But I want to stay at issue view page, only show a progress sign during the transition, the same way as transition button does.
Thank you!fdfdf.JPG

 

1 answer

1 accepted

1 vote
Answer accepted
Nhac Tat Nguyen July 27, 2020

Solution:

  1. Use javascript to call to your REST API (which will do your issue transition at the backend, you have to implement it), then prevent the default redirection of your web-item, so the page will not be redirected.
  2. When you received the response from the above REST API, just do the following in JS to refresh the Issue View Page:
    JIRA.trigger(JIRA.Events.REFRESH_ISSUE_PAGE, [JIRA.Issue.getIssueId()]);

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events