HI,
I want to have same workflow for 2 issuetypes, but validate some fields only for one of them while creating the issue.
Any ideas?
PS. I have scriptrunner installed if it helps.
Hi @Jan Sękara ,
you should be able to achieve this by creating a second field configuration where the field is marked as required and then add this field configuration the field configuration scheme for the issue type where it should be required.
@Bastian Stehmann answer will work if all you want to do is make the field required. But, when you say 'validate' it makes me think you want to check the field for correctness, which a different field configuration won't do. If what you want is to check the field, I suggest you repost the question asking how to validate a field with scriptrunner when creating an issue. I don't use it so I can't help you.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jan Sękara - I would say that the better option is to copy the workflow and associate separate workflows to each issue type. If you are keen of using the same workflow, you should consider validating the issue type , when validating the fields. You should do a 'if condition' when adding a scripted validator
issue.issueType.name == 'Bug'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A simple scripted validator should help
issue.issueType.name == 'Bug' || cfValues['Reason for No Demo']
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.