We have a project with a status "Wartet auf Kunden" (German for "Waiting for customer"). We use this status when we respond to an issue/customer with a request for additional information.
We also have an automation that handles changing the status of this ticket back to it's previous status when the customer responds to our request for additional information.
This is an example workflow where we use these rules:
- An issue is raised by a customer => Jira creates the issue and assigns it status "Wartet auf Support" (German for "Waiting for support")
- We need more information from the customer, so we respond to the issue and manually transition the issue to Wartet auf Kunden (Waiting for customer)
- An automated rule is triggered which sets the hidden field "Vorheriger status" (German for "previous status") to the id of the previous status (in this case, this means the field for the previous status will hold 10029, the id of status "Wartet auf Support"/"Waiting for support")
- Once the customer responds, an automation is triggered which transitions the issue back to said previous status
Sometimes, however, this transition in step 4 fails:

Here is the rule that handles transitioning back to the previous status when a customer responds:

As you can see, in the second to last step, I send an email. This email is for troubleshooting purposes, and looks as follows:

This mail is generated as follows:

I'm not sure why the result of {{issue.vorheriges status.Name}} is empty (maybe because I need to handle the space in the variable name?)- but I'm also not sure it's relevant.
In the end, what I want to know is why the transition fails as per the first screenshot.
Both statuses (Wartet auf Support with id 10029 and Wartet auf Kunden with id 10030) definitely do exist, as you can see in the URL in these two screenshots:

