How to show DialogMessage in validator script ?

It's possible ?

I use lfDialogMessage("Message", "ERROR"); and nothing happend

4 answers

1 accepted

0 votes
Accepted answer

You don't. Validators don't have any interaction with the front-end of Jira. All their code does is return "pass" or "fail and here's a message to put on the screen the user is returned to"

Nic - I think you are thinking of Conditions maybe... Validators allow an error collection which can be general error messages or specific to fields.

However from the "lf" I think this is some client-side aspect of the jjupin plugin.

Nope, definitely validators. Bad prose on my part probably.

Validators either pass, or fail, and when they fail, as you say, they "allow an error collection", which then goes back to the screen that the user is returned to. They don't have anything that lets you do messaging outside that though, so message popups and so-on simply don't have anything to feed into, all you can do is add to the error collection.

I don't know jjupin well enough to be aware of it doing more clever stuff, I've only ever seen it used to write validators that work like that.

OK thanks for tip, I create a screen to display message.

return false, "INFO", "message";

- it's possible to set type of message ? INFO,ERROR, etc. ?

You're missing the point - a validator either passes or fails.

There's no screen to define because it goes back to where it was when the user started the transition, and there's no point in having message levels, the validator just says "failed validation", there's no other information.

Sorry, I have on mind to set screen to transition...

There's a confusion here. I'm afraid I missed this question, and the answer will come a bit late (my bad). You cannot put a LiveFields call on a validator. You can use LF only from LF scripts or hooks and in postfunctions.

What you need is to validate that field client side. This does not absolve you to write the validator itself.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,711 views 3 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you