Action X is invalid on A field is/isn't initialized condition

Issue #439 resolved
Brian Roberts created an issue

I'm using the "A field is/isn't initialized" condition to evaluate if the date field "Approved Date" is populated. If not, it will show a transition named "Approve". When clicking "Approve", the transition presents a screen to add the "Approved Date". If the date gets added, it returns "Action 81 is invalid". So it's like the condition is getting re-evaluated before the transition actually occurs.

JIRA Software 7.2.1

Comments (6)

  1. Fidel Castro Armario repo owner

    Hi Brian,

    As you pointed out, the problem is that condition is reevaluated after the value has been entered in transition screen.

    You can solve the problem replacing your current condition with "Boolean condition with math, date-time or text-string terms" with the following boolean expression:

    {nnnnn} = null OR hasChanged({nnnnn})
    

    replacing nnnnn with field code of "Approved Date".

  2. Brian Roberts reporter

    Thanks Fidel. Is there any plan to actually fix that problem as opposed to using your workaround? If so, is there an issue tracking that I should watch?

  3. Fidel Castro Armario repo owner

    No, Brian. I don't consider it a bug, but a characteristic of JIRA. There isn't any problem in using the alternative solution I gave to you. Other users of the plugin are using it without problems.

    Indeed, function hasChanged() was added to the plugin in order to solve this problem.

  4. Brian Roberts reporter

    Fair enough.

    Hopefully you don't mind some feedback on that though: Before submitting this Bug report, I fixed this problem in my instance by using the "Value Field" condition from JIRA Suite Utilities to check for that field value being NULL, and it worked as expected on transition. I have no idea what the difference is between your add-on and their's so maybe they have something similar to hasChanged() running under the hood. Also, I forgot to document originally, that your's was working in JIRA 7.1. Thus, the behavior of the "A filed is/isn't initialized" was not at all intuitive which is why I opened this issue.

  5. Fidel Castro Armario repo owner

    Hi Brian,

    I have reconsidered my position: it's a bug and can be easily fixed. It will be in next version of the plugin. Thanks for your feedback.

  6. Log in to comment