Validation on Epic Link is returning "Action (ID) is invalid"
Hi Fidel,
I'm trying to use the boolean validator below, based on Epic Link field, but i always get the error "Action (ID) is invalid":
(isInRole(%{Current user}, "3PUP - Empresa - Gerentes") OR (first(fieldValue(%{Gestor}, linkedIssues("has Epic"))) = %{Current user}) OR (first(fieldValue(%{Assignee}, linkedIssues("has Epic"))) = %{Current user}) OR hasChanged(%{Epic Link}))
I already tried to change the function linkedIssues() to transitionLinkedIssues(), but nothing has changed.
I realized that when this validation does not pass, instead of appearing the error message "", the "Action (ID) is invalid" error appears, however when the validation passes, this "Action (ID) is invalid" message does not occur and the issue progresses normally.
Could you please help me with this case?
Comments (10)
-
repo owner -
reporter Hi Fidel,
I sent you the server's log file, as requested. I tried to enter again the validator's message, but the problem persists.
I'm using the JWT 2.2.42 and JIRA 7.3.0.
I'll be waiting for your return.
-
repo owner Hi @victoria-fernandes,
The small fragment of the log file you sent to me doesn't contain the stack trace of the error related with this issue.
Please, try reproducing the problem, and sent to me the whole log file, or a fragment of the log file beginning before the moment you reproduce the problem.
-
reporter Hi Fidel,
I sent you the file again.
-
repo owner Hi @victoria-fernandes,
Please, show me the whole condition's tab and validation's tab. I want to see all the conditions and validations you are executing and their configurations.
-
reporter Hi @fcarmario,
I sent you by email a XML of full workflow and a PDF of the transition containing the conditions, validators and post functions.
Let me know if you want more information.
Thanks.
-
repo owner Hi @victoria-fernandes,
I don't know exactly what are your requirements because your conditions and validators are very complex. Anyway, I can tell you that I don't see what's the point of having
!hasChanged()
in conditions.JIRA requires that conditions and validators are satisfied at the moment of issue transition. If the values you enter in the transition screen make any of your conditions become unsatisfied, you get the kind of error you are experiencing, and I think that's what's happening.
We usually use
OR hasChanged()
in conditions in order to ensure that conditions are satisfied when some change in a field value would make a condition become unsatisfied.Try the following:
- Replace
!hasChanged()
withhasChanged()
in your conditions.
Let me know whether it solves the problem.
- Replace
-
reporter Hi @fcarmario,
I replaced the !hasChanged() to hasChanged() in conditions, but the transition was no longer available, so I removed the condition because I'm already validating this rule in the validators and it worked.
Thank you for your help!
-
repo owner Hi @victoria-fernandes,
In order to use
hasChanged()
in conditions, it should always be an alternative term, i.e., a term in anOR
logical connective, since obviouslyhasChanged()
is never satisfied when JIRA is evaluating conditions in order to decide which transitions should be shown in the UI.As I told you in my previous comment, JIRA evaluates conditions and validations just before executing a transition, i.e., conditions are not only evaluated to decide which transitions are going to be shown.
Function
hasChanged()
in conditions are intended to work as a bypass of the rest of the condition in case a field has changed in transition screen. -
repo owner - changed status to resolved
- Log in to comment
Hi @victoria-fernandes,
Can you, please, share with me your server's log file? I will very probably find the cause of the problem in it. You can send it to "support@workflowarts.com."
Please, try also editing the configuration of the validator entering the message message for the validator again.
Please, tell me the version of JIRA and JWT you are using.