Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

scriptrunner for Button web fragment

Garden16_ February 11, 2022

I  have created a button name  - Reassign QA defect  using the web fragment, script runner 

 I wanted to  do the following using the button.

1: When user clicks the button , it should open the assign drop down and I should be able to select  users from the drop down.

2: Once assigned, I would like it to be displayed in the assignee field in the transition.

3: Once the defect is closed, I would like it to disappear on the view issue screen.

 

reassign defect  button on view issue page.PNGtransition screen assign dropdown.PNGClosed qa defect.PNG

2 answers

2 accepted

1 vote
Answer accepted
Radek Dostál
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.
February 11, 2022

I think you might be trying to duplicate an existing menu. The More dropdown already contains "Assign issue" option. Or, you can simply click on the Assignee field on issue view and change it.

The missing part where you say "when the defect is closed, remove assignee" would be done with a workflow post-function on the "Fix Defect" or "Close" transition (I mean, whatever the transition to the fixed status is). Then again why would you want to remove it? This way you at least know who fixed it, what is there to gain from destroying this information?

Garden16_ February 15, 2022

I have disabled the assign button by making the work flow  jira.issue.editable false based on the defect  status. I do not any one to edit the items on the screen and tamper with the defect  description  or any other defect related data. I would like to  have the ability to re assign the QA defect  before the transition  is commenced .

The assign button is   displayed only  when the defect is in open status , but when the defect is in other statuses like fix, re opened , I would like it to display re assign defect button .

I was looking  to do the following when I click on the re assign button 

 I wanted to  do the following using the button.

1: When user clicks the button , it should open the assign drop down and I should be able to select  users from the drop down.

2: Once assigned, I would like it to be displayed in the assignee field in the transition.

The assign button is   displayed only  when the defect is in open status , but when the defect is in other statuses like fix, re opened , I would like it to display re assign defect button .

Garden16_ February 15, 2022

RE ASSIGN.PNG

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
February 15, 2022

You won't be able to do this, scripts cannot trigger interactive transitions.

Might I ask what is wrong with simply putting the assignee on the transition screen? 

Why would you ask for an assignee and then go to the transition and ask again?

And why have you disabled the assignee function when you actually want to use it?

There's no way to remove the assignee from view, if you've got one, Jira shows it to people, it's useful information.

Suggest an answer

Log in or Sign up to answer