Hi friends,
It is possible to validate the content of the custom field before create the issue in onDemand JIRA.
i attached the screen shot.In that the summary field was required if we did not enter the details then it will show the dialog "You must specify the summary of a issue" like that for eg if the custom field accepts the numeric value, in case if we are entered the character but during the creat issue it is indicate "The field accept only the numeric value". It is possible do like that in onDemand JIRA.
Please share your thoughts,
Thanks,
Karthik A.
If you have permission to create custom plugins, you create a workflow validator.
If you don't have, then you need to work Alassian Connect as prasad suggested.
when developing validator, you need to write code something like this.
InvalidInputException e=new InvalidInputException();
ArrayList<Version> CF = (ArrayList<Version>)issue.getCustomFieldValue(cfm.getCustomFieldObjectByName("CF")); if(CF != null && CF.size() > 1) { e.addError(cfm.getCustomFieldObjectByName("CF").getId(),"Select only one version."); throw e; }
this CF is a customfield of multiselect type similar to versions. I place some condition that it should contain only one version in the list.
similarly you can place a regular expression like [1-9]{1}[0-9]{9}. you go through
https://answers.atlassian.com/questions/195074/entry-validation to use regular expression using java Pattern class
you have to develop your own validator to implement that validation
as your instance on ondemand you have to develop validator using atlassian connect
https://developer.atlassian.com/display/AC/Atlassian+Connect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I upticked your comment because I like the link - but I am trying to validate if a checkbox is checked. I think the Atlassian+Connect is too far away from a simple solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could set up conditions in your workflow transitions. That would allow you to validate field values and prevent issues from being created with invalid data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just click the value field from the condition, then i got the page.In that page i can able to check with single value alone. But i need to check the more than one value using one common regular expression. It is possible to set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
condition does't help in your case, i don't think there is a validator to validate number field length in jira ondemand instance.
using javascript we can validate but i am not sure we can update javascript on ondemand.
so you have to develop your own validator using atlassian connect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
During create the issue the Validators and PostFunction are available but the condition tab does not exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok. I was going off of memory, and I forgot that. Conditions are available on all transitions except for create.
Then you should create validators to verify the field information when creating the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, those are the default behavior in JIRA. Are you not getting those validation errors?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Jobin,
i got the error but i need to change the message for my field.The field only accepts the 10 digit phone number. In case we are wrongly enter more than 10 digit or character it will display the message "The field accepts only 10 digit".like that i need it. it is possible in onDemand JIRA. The message will be displayed before we are going to create the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.