How to use flags as response to users in Jira DC?

Martin Heini
Contributor
February 14, 2023

Hi. How can I use flag functionality (def flag =[ ... ] Response.ok(...) ) in Jira Software Data Center as a response to the user. Use Case: User triggers an action in an issue, Jira should confirm this action.
I found solutions only for cloud, not for DC.

Is there another solution to this?

Thanks
Martin 

1 answer

1 accepted

0 votes
Answer accepted
PD Sheehan
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 14, 2023

In a workflow post-function, you can use the UserMessageUtil 

Either using one of the built-in methods (success, error, warning)

import com.onresolve.scriptrunner.runner.util.UserMessageUtil

UserMessageUtil.success("success message")

Or the flag method with a custom flag

import com.onresolve.scriptrunner.runner.util.UserMessageUtil
def
flag = [type: 'success', close: 'auto', body: "message body"]
UserMessageUtil.flag(flag)

I think at some point this class was somewhere in the documentation, but I can't find it anymore.

Martin Heini
Contributor
February 15, 2023

That's great - and so eazy! Thanks a lot!

this works both ways.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20
TAGS
AUG Leaders

Atlassian Community Events