Hello!
I'm developing new Custom Field for our company.
I would like to check other issue fields/value in validateFromParams method. But the problem is that there is no instance of issue in this method. I've looked up in stack call and there is an issue instance in validateParams() of CustomFieldImpl class.
How can I get issue instance or validate my custom field on other issue's fields? I would like to make validation on issue create and update.
Community moderators have prevented the ability to post new answers.
I think, I found a solution.
I've created global loop transition in my workflow and assotiated a new screen with only my custom field. For this transition I wrote a validator, which can check everything I need.
Users of JIRA 6.2.1 and above can get this from relevantParams.
@Override public void validateFromParams(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config) { Issue passedIssue = (Issue) relevantParams.getFirstValueForKey(ISSUE_KEY); //ISSUE_KEY = "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.
Yes, I would like to check other issue's fields and throw an error in some case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you trying to set the value of your customfield based on other issue fields ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.