We need a condition to validate if an object is already created in an object schema and do not permit to create an issue with this object value in a specific field.
Thank you
I'm not 100% sure I understand your use case, but it sounds like you have:
You asked
a condition to validate if an object is already created in an object schema and do not permit to create an issue with this object in a specific field
First things first.
It sounds like what you might want is to alter the "Filter scope (IQL)" section in the field configuration to apply your logic. That way, the field will only show the objects which satisfy your logic.
For the 2nd bullet: I dont want an insight field. I want a text or integer field to fill and if this value does not exist as an object in insight then an issue and an object will be created.
I suppose I will use the insight post function but I will need help with the IQL condition
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, it sounds like you're using an issue as the template to create an object.
You have a couple of options.
1. You can put all of your logic in the create workflow validator to determine if an object exists which matches the text or integer field. If the object already exists, throw an error message to the user and not let the issue be created. If the object doesn't exist, then create the object and let the issue creation succeed.
2. Let the issue get created, and then have either a post-function that performs the above work and then transitions the issue to a completed status with a resolution of "object created" or "denied" or something like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I select the first option I suppose I will create a Validator on the Create transition. I will select Insight Validators --> Run a groovy script within this validator.
Can you help me with the groovy code I will use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you're correct.
I don't unfortunately have a collection of Insight Groovy scripts yet. I would suggest starting to look at the examples originally provided by Mindville.
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.