Status change during automation using validator

Andrii Bordun May 15, 2020

The scenario.
We set a few automation rules to avoid monkey job setting statuses for parent tasks/stories.
So when a sub-task moves from "To Do" to "In Progress", the parent task (e.g. a user story inherits that status too). 


Problem: We want any team member to add a comment when moving a task from the status "In progress" to "Testing", from "Testing" to "Ready for review" and so on. 
Solution: We created an empty Screen and added it as a result of every transition starting with "In Progress". 
Problem: And we want the comment to be mandatory and have an ability to add even a screenshot.
Solution: We added a field Attachment to the Screen. Also, in the workflow, we added the Validator for the Comment field. Now it is required and when there's no comment, the custom message appears and tells what to do.  

The issue we are having now: when a sub-task goes from one status to another, the parent's status doesn't change. If I remove the Comment Validator from the workflow (for every transition), it works perfectly, but then the Comment becomes optional. We need it as required.
The automation log says: Error transitioning issues "SDD-740" (Please provide the comment). FYI. The 740 is a parent issue. On one hand it makes sense because these rules and workflow apply to all types of tasks and mean that I need a comment for parent task to inherit another status (e.g. Testing). 
The solution I thought would help: I added another Action in automation "Comment on issue" for the parent. And it adds a default comment that I customized, e.g. "Task is verified". However, it doesn't help despite it adds a comment and should've helped. I'm confused a bit.

Question: How to make it work and do not break the Automation?

3 answers

1 accepted

0 votes
Answer accepted
Andrii Bordun May 25, 2020

The answer above works.

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2020

Hi @Andrii Bordun  - Welcome to the Atlassian Community!

Maybe try to add a Re-fetch issue component after the Issue is edited successfully?

Andrii Bordun May 18, 2020

It doesn't help in my case. It performs the operation, but the second part of the report from Automation says the same: Error transitioning issues (Field comment required)

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 18, 2020

You probably need to contact Atlassian Support to put in a support request.

https://support.atlassian.com/contact/#/

Andrii Bordun May 19, 2020

Ok, thanks.

Andrii Bordun May 25, 2020

My problem was solved. With some issues on the background, probably because the Audit log for Automation shows the same error, however actions are being performed correctly.

Here's their answer:
It should be possible to add the comment and transition at the same time with automation.

If you refer to the screenshot above, you will see that there is an additional section that allows you to specify the comment in JSON

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2020

The screen shot did not come through with what you were describing, but I trust you. Glad you got it working!

Andrii Bordun May 25, 2020

Well, Untitled.pnghope this one shows up

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2020

It did - thanks!

0 votes
Andrii Bordun May 15, 2020

image.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events