How to show DialogMessage in validator script ?

Kondi January 16, 2014

It's possible ?

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

4 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2014

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"

JamieA
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.
January 16, 2014

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2014

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.

1 vote
Kondi January 16, 2014

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. ?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2014

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.

0 votes
Radu Dumitriu
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.
March 19, 2014

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.

0 votes
Kondi January 16, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events