I am new to Jira and I encountered a problem I don't seem to be able to solve. When using a function Update field based on rules based on the following parameters where I want to insert Temporary text in a string the following error pops up:
"It is not possible to evaluate an expression that contains fields that are only available during a transition".
Is there any way to fix this bug?
Hi @Iryna Pazharytskaya ,
my colleague @Max Foerster - Decadis AG has already correctly recognised that this is not an error (even if it looks like one at first glance), but a hint.
Testing an expression within a Condition, Validator or PostFunction is still relatively new and has only been available since Jira Workflow Toolbox version 3.0.
Currently, only expressions that refer to information already stored in the issue, such as Summary, Description, CustomField A, CustomField B, etc., can be tested.
Information that is determined at runtime during workflow execution, such as temporary string or number fields, previous status, target status, etc., can be included in an expression but cannot be tested because this information is not available at the time of testing.
However, as @Max Foerster - Decadis AG said, your expression looks good. Therefore, it should run successfully as long as the TemporaryText2 field has been set in one of the previous PostFunctions.
If this is not the case, you are welcome to create a support issue for us under https://support.decadis.net/plugins/servlet/desk/portal/2. For support, it would be helpful to get not only a screenshot of the single PostFunction but of the PostFunction overview, so we can see where the TemporaryText2 field is set.
I hope this helps you.
Thank you @Frank Leclerc _Decadis AG_ ,
I tested it on my test project and it was executed, but without taking into consideration the email stored in Temporary text 2 (so it was only sent to the other two emails). I am attaching the screen shots of my workflow, so that you can see what I mean by "pasting an email address". Though within the body of the email Temporary text 2 worked just fine.
actually, that looks good to me. I have recreated the whole thing and for me the temporary texts are set correctly:
To better understand the whole thing, I put the strings into comments and tried with both variants:
And this is how it looks in the e-mail:
It is important that the rule mode Text and the Expression Mode Basic are selected for the rules.
Does this help you?
Dear @Frank Leclerc _Decadis AG_ ,
Thank you so much for your help. I tried it again after I saw your screens and now it works! When I do a test it's still giving the warning: 'It is not possible to evaluate an expression that contains fields that are only available during a transition.', but the emails are being sent correctly. It's a mystery to me why it didn't wor before, but I am glad it's solved now.
Hello @Iryna Pazharytskaya,
I'm not 100% sure what app/add-on you are using to try and accomplish this task, but based on what the error is describing it sounds like you have a field that exists on the transition screen but is not available on the view/edit screens - "It is not possible to evaluate an expression that contains fields that are only available during a transition."
As a first start I'd recommend checking the screen scheme for this project to see if that might be the case.
I hope that helps!
Thank you for your reply. Yes, exactly the field we are creating exists only during the transition (Temporary text ). Let's say we want to assign an email to it depending on the region, which later on will be pasted into cc. field as one of the emails (like string1, string2, %Temporary text}) and we use Update field based on rules based on the following parameters function for that. Before the changes in JWT plug in it worked perfectly fine. Now as we are implementing the changes it seems to be impossible to use it like we did before. We don't actually want to have it on any of the screens.
I also noticed that it is possible to paste the temporary text with the string whithin the email body when using "Send an email based on the following parameters" function because the parsing mode can be set to the "Mixed mode" which cannot be used within Update field based on rules based on the following parameters where the available parsing modes are Advanced and Basic only.
@Iryna PazharytskayaI don't see where you mentioned which version of Jira you are using although I suspect it is server since I don't recognize your screenshots and I don't have any experience with JSU. I would assume JSU would work in the same fashion as the built-in Automation rules. Have you tried the same field change using Automation instead of JSU?
@Iryna Pazharytskaya are you using JWT (Jira Workflow Toolbox)?
(Man, I was racking my brain trying to figure out where that UI was from.)
Maybe tagging in somebody from Decadis would help. :-}
Hey there, thanks @Darryl Lee for mentioning me! I'm without my laptop right now but from what I read so far you're simply trying to test your expression in the configuration, @Iryna Pazharytskaya? And you're expression will only work in the context of the transition. The field is not available and has no value at the moment. So did you maybe try to simply execute the real-life scenario? Doesn't look like a bug to me right and it's a more useful information than simply pasting nothing for the field and don't telling you. 😁 But I will have a look at it and get back to you! For now I wish you all a happy Friday! :)
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events