Setting validators for workflow transitions

Thembisa Ndlamlenze October 14, 2021

Hi there

I'm trying to add a 'field required' validator for the time tracking field so that an issue doesn't transition to the next status if time tracking is empty, however it doesn't appear in the available fields.

I can only find the 'time spent' field so I added this as the required field. When testing, I went to time tracking and added time in the time spent field, but the error pops up to add time. Not sure what I am missing?

Also how do I add the 'time tracking' field to the available fields in the validators?

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Hi @Thembisa Ndlamlenze 

Try the following please by adding original estimate and time spent:

  • Edit your workflow
  • Add validator "Field Required"
  • Choose all the fields you want NOT to be empty during the transition
  • Click add
  • Click publish

validator.png

 

This is just to see the transition overview. Don't forget to publish the workflow.

transtition overview.png

 

When I try to move the issue to in progress, I get the error message:

validation.png

Thembisa Ndlamlenze October 14, 2021

Thanks Alex

I followed all the above steps and left original est and time spent empty and the error message popped up, which is great but the error still shows when I populate these fields and wont allow me to transition to the next status

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Are you populating both fields?

Thembisa Ndlamlenze October 14, 2021

Yes

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Hmm... then most likely you have to add a transition screen with the required field. I believe that this validator needs the fields to not be empty during the transition. Try adding a transition screen with this (these fields). Otherwise with the use of an app, like JMWE this could be done more easily.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

That will do the trick. I can confirm this. However, it's not the best of ways :/

Add Time tracking field for original estimate, and log work field for logging the work.

Thembisa Ndlamlenze October 14, 2021

What will do the trick, adding a transition screen or the app?

Unrelated - for some reason I can't add screenshots here

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Both of them will do the trick. But I was referring to adding a transition screen with the required fields.

Thembisa Ndlamlenze October 14, 2021

I feel like I'm so close yet far :)

I've created a transition screen, added time tracking field to it. The screen has original estimate, remaining estimate and comment fields, all of these are populated but I get an error 'please log the time spent on this issue'

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Did you try to log time?

Thembisa Ndlamlenze October 14, 2021

It works!! Changed time tracking field to log work field

Thanks so much Alex

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021

Glad to know that, and I hope that this solution works out for you!

Kindly mark my answer as accepted to help others in the community! Thanx!

Like Thembisa Ndlamlenze likes this

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