Forums

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

Workflow validator for Reporter !=

Joe Doherty
Contributor
January 31, 2023

Our JSM integration with Slack often creates support tickets with a default "Jira-Slack" user.

I want to create a workflow validator that makes sure that a support agent has changed the Reporter to the real user, not our default service account.

How can I create some kind of validator with this logic?

Reporter != "Jira-Slack User"

Besides built-in Jira post-functions we have the following Jira Cloud apps:

  • JSU
  • JMWE
  • Scriptrunner 

2 answers

1 accepted

0 votes
Answer accepted
John Funk
Community Champion
January 31, 2023

Hi Joe,

I would try the Build-your-own (scripted) Validator (JMWE app). In the Jira expression section select issue fields and search for Reporter. Select the value for issue.reporter.accountID then add != after it. 

Then select Lookup user and search for the generic Slack user. Select insert accountID. So it should look something like:

issue.reporter.accountID != 64542e54534a8e8a3347fd3

Then test the expression. 

Finally add an Error message. 

David Fischer
Community Champion
February 1, 2023

It would be 

issue.reporter.accountId != "64542e54534a8e8a3347fd3"

(lowercase "d" and quotes around the account ID) 

Like John Funk likes this
John Funk
Community Champion
February 1, 2023

Ah, thanks, David! Cleaning up my syntax mess as usual haha. 

Joe Doherty
Contributor
February 1, 2023

Thanks John and David this should be exactly what I'm looking for! 

Like John Funk likes this
John Funk
Community Champion
February 1, 2023

Great!

0 votes
Samuel Gatica _ServiceRocket_
Community Champion
January 31, 2023

Hi @Joe Doherty 

In the transition to In Progres, you can add the Value Field condition and set the parameters, the transition to the next status will not show if the Reporter is set to the "Jira-Slack User", here is an example

 

Screenshot_3.png

Screenshot_2.png

Hope this helps

Best regards

Sam

Joe Doherty
Contributor
January 31, 2023

Thanks @Samuel Gatica _ServiceRocket_ - if I use a condition then the transition will just disappear (and I'll get reports "why is Close Issue button gone?").

I'd prefer to use a validator, so when the user clicks "Close" from the transition screen, it will throw an error and the user will have an opportunity to update the Reporter to try again.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events