Hello there,
I have a requirement from my customer:
It is possible to catch the generic message "customfield_10438: This field is required." and display a specific one ?
I have made some research on Validator function but dont get how i can do it.
If you have any tips ?
@Olivier MAZENPlease see article on how to add validator
https://confluence.atlassian.com/adminjiraserver/advanced-workflow-configuration-938847443.html
Better have the Jira admin rights then modify workflow by adding validator on any transition you wish to. in this case on a transition use the field required choice when you click add validator.
Best!
Hello Thomas
Unfortunatly the link seems to be ko, i get a 404 after click on it.
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This forum has a nasty habit of adding duff characters to the end of urls when you use the link function. Try removing the .%A onwards stuff from it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nic,
my bad i just have to copy past the link : it works well :)
Anyway i didn'"t found my needs in the post.
I want to catch when JIRA performed the required field verification catch the message and change by another one.
The controle on required field is done on the create issue but modify issue too.
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My bad, didn't know how the (.) came up, but i have corrected it , in the documentation there is how to add a validator. As i see you want to manipulate the display message, then you will need script runner plugin installed, then go to workflow and then click on the transition you want to add the validator(don't forget to add screen on this transition)by double clicking the transition and then add your screen. To add a validator, single click the transition , add validator > script validator > > simple script validator. You will see examples by clicking show example afterchoosing simple script validator
Now just need to add a condition(groovy) depending on your needs
See other examples here: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/simple-scripted-validators.html
You have possibility to choose field that should be mandatory when condition is met and enter any message you want.
Note my first comment will not give you possibility to manipulate comment.
This should solve your need.
best!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
thank for your answer.
I have the add on scritprunner. I get your point but there is no way to catch the standard controle?
Basically i just want to change a standard message by another one, if it is hardcode in a class or something i understand i can't do it. But there is a chance this is confiug threw a configuration file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Olivier MAZENAs i have mention you can when you follow my explanation you will see that you can do it just i have mention.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
am sorry but i didn't get it.
I have 7 required field in a create view, arround 15 differents create view, i have to had a condition on each required field to display . "Please check again, some required field are missing" instead of "customfield XXXXX is required"
it look to me a little anoying instead than overload a generic message ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Olivier MAZENStep by step
This is how far i can explain i hope this helps.
Best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Thomas,
thanks for you reply , i get your point everytime you explain it to me.
As i said i want to handle the message generally i dont want to had a validator for each required field i have in my JIRA SD solution.
You get the point when you said
That my question: Some how ?
Appenrelty this is not something you can reach easaly, i will put it on the side from now.
Thank for yor time anyway.
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.