Hello Community!
I need help with automation.
Use case:
When a user transitions a Bug issue and a certain field that is not populated, I want the issue to revert back to the status before the transition occurred and send an email to the user as to why the issue did not transition as expected (or why the status reverted back).
I see the below article but seems too complicated -
Can anyone help me?
Thanks!
There were some situations in my past that this mechanic was desired:
So I am not saying what you want to achieve doesn't have use-case, but! If you can avoid all that drama of transitioning tickets back-and-forth between different statuses, did you consider just making the field mandatory in order to execute the transition?
This can be achieved in a pretty easy way:
Please also keep in mind that if you make a field mandatory to execute a transition, you should probably expose it on the transition screen, so user knows what must be filled.
Hope that helps! Cheers & Good luck!
@Jakub Cieslak
I am trying to avoid having to touch every workflow as this is a global change that would apply to our entire instance for every project.
And I was trying to reduce the angst of requiring users to populate another field upon creating a Bug issue.
Thank you for the details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Noted! In this case, if you really want to go for the Jira Automation, you could achieve it this way.
This is how the automation looks on my end, perhaps not the most performance-friendly approach, but it should work just fine.
IMPORTANT:
Please remember that a transition back must be enabled/possible! If the Workflow does not allow it, it will fail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great find @Jakub Cieslak !
I tried this earlier with the ChangeField.From but that didn't return anything. Going directly to the changelog is a clever way!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Apryl Harris ,
I wonder if it would not be easier to add validator (field required validator) to the workflow of your bug to block the transition if the fields is not filled in?
This would not send an email but would provide a message directly in the UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dirk Ronsmans - I thought about adding a validator but I would have to touch every workflow in our instance, and we have a lot of different workflows. I was trying to do it with automation so I wouldn't have to touch every workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've tried to replicate the use case but I fear that the "Isuse transitioned" trigger which you would need to use does not hold any value of the previous status.
I assume that is why the example in the documentation you linked first checks on the "field changed" trigger of the Status field and then saves the old value in some hidden custom field.
At the moment this seems to be the easiest solution.
Keep in mind that the custom field does not need to be visible on the issue (or even on your create/edit screens)
I get that having to add the validator to each workflow where it is needed is a hassle but it would still be the cleanest solution, otherwise the example rule seems to be the only option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes. i think this is probably going to be the solution. but i was hoping some genius Community member had an easier native solution.
one can always hope...lol.
thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can always look at this question (https://community.atlassian.com/t5/Automation-questions/Jira-Automation-how-to-read-the-previous-state-of-an-issue/qaq-p/2729916) as it handles a similar use case using the API.
Using that approach you might be able to do it without adding another custom field but it's definitely not less complex :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.