Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How can I see JIRA tasks that are waiting on me based on the last comment being "~ currentUser()"?

Scriptrunner Fragments & Jira 9 - Create Button next to Workflow Dropdown

Adam Laskowski
November 6, 2023

Hi everyone,

in Jira 9+ all Transition-Buttons are now inside a Workflow-Dropdown. 

image.png

We don´t really mind this but in some cases/projects we really want to separate a button and put it right next to the Workflow-Dropdown or the Assign-Button.

On top of that we like to create a second button which do something else like redirect to a link. This should be possible with Scriptrunner Fragments but i wasn't able to create something like this. I kinda have now two questions regarding buttons:

1 - Is there a solution to set a transition-Button next to the transistion-dropdown? Maybe using fragments? Dont really want to buy another third-party app.

2 - Using fragments is it possible to create a "custom-web-item-Button" right next to the transition-dropdown? 

In the fragments configuration there is field "What section should this go in" with dozens of options. With the option "jira.issue.tools" i was able to create a button but it is... well next to the tools buttons in the issue view. Not exactly what i want. Anyone some ideas?

Thanks!

Cheers
Adam

1 answer

1 vote
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 26, 2018

Hello Patrick,

Thank you for raising this question.

Using Scriptrunner, I believe you will need to use the module Custom JQL Functions and perform the following steps:

- Use CommentManager.getLastComment(Issue issue) to obtain the last comment for each issue.

- Then, you can use Comment.getBody() to obtain the comment text.

- Finally, you can parse the content to search for the mention format, which is stored like this: [~username]. Once you extract this, you can compare the mentions to the argument passed to the JQL function.

Please, let me know if it works for you.

Patrick S
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 Champions.
November 26, 2018

@Petter Gonçalves - Thanks for the quick feedback. I'll probably try that at some point, but I'm very rusty on Groovyscript so I'll need to wait until I've time to sink my teeth into it. In the meantime, if anyone else has already done something this awesome, feel free to share the love, otherwise I'll post what I build when I get it working.

Suggest an answer

Log in or Sign up to answer