So, I am using this solution which works great for one of my use cases. https://community.atlassian.com/t5/Jira-Software-questions/Increment-Custom-Field-on-Transition/qaq-p/138821
BUT i have a second use case where i need to only increment a field if a specific transtion path used to get to a status.
I have the statuses FAILED and QA to DO
From Failed there are 2 paths back to QA to DO
1) Failed -> In progress -> resolved -> QA to DO
2) Failed -> QA to Do
with the second path, the user clicks the "invalid workflow" button. When THAT specific action happens i want to increment my custom field of "invalid failure count"
How do i do this? the solution i linked will increment that field no matter which path is taken?