My idea is: In JSM, I have a request type that need user to input "affected user" and "Approver", I would like to restrict that the "affected user" can not be the same as "Approver". In workflow I use JWT compare two values validator. The issue is when I enable this rule, I can not submit this request, if the "affected user" = "Approver", it will show the error message, it is OK. But if the "affected user" != "Approver", it also can not submit this request, it will also show the error message.
the field type of Affected user is assets objects. the field type of approvers is user picker(multiple user) - The field type can not be changed.
It is the first transition which is the "create" step.
Does anyone know how to fix this issue?
Hello @Benjamin Zhou
Even if you flip the logic from = to !=, the validator is still trying to compare an Assets object reference to a list of User IDs, and those two just don't speak the same language.
Because "Approvers" is a multi-user field, a simple comparison usually isn't enough; you really need a way to check if the specific user tied to that Asset is contained in the approver list. Doing this right at the Create transition is also tricky because most automation hasn't had a chance to run yet. You'll likely need to resolve that Asset attribute to a real Jira account ID within the validator itself, or the system will keep throwing errors simply because it doesn't recognize the two fields as comparable data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.