Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to block issue transition when comments or worklog empty (Next Gen)

Edited

I'd like to block an issue in a Next Gen project that's in Review but work hasn't yet been logged, either in comments or work log so that team members who don't log their work are unable to move issue to done.

I've looked a bit at automation, but since Comments and Work Log aren't fields, it's a bit more challenging. I'm wondering if there's some JQL that someone has thought of to do this?

 

Thanks

2 answers

1 accepted

1 vote
Answer accepted

Okay, I've essentially found a way. I wasn't able to block the issue transition, but I was able to add a notification via email or MS Teams/Slack if an issue has no comment or has no logged work.

Answer:

  1. In Next Gen, use Jira Automation to create a new rule
  2. Trigger: Issue Transitioned (I used from In Progress to In Review)
  3. Condition: Advanced Compare Condition
    • First Value: {{worklog.comment}}
    • Condition equals
    • Second value empty
  4. Action: Send email

You can also do this with comments using same Condition and first value {{comment}}

I found this page to be helpful:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

Screen Shot 2020-09-04 at 8.40.53 AM.png

Are you working with a Classic or Next-Gen project?

In a Classic project you can modify the workflow transition to add a Condition to disallow the transition unless Time Spent > 0. That addresses your requirement to have work logged.

You can also add a Validator to a workflow to prevent completion of the transition unless the user enters a comment. You would have to add a screen includes the Comment field to the transition so that they could enter a comment during the transition. And that would not be able to check if a Comment of any kind had previously been entered on the issue. It would simply require the user to enter a comment as part of the transition.

Oops, that would have been helpful information. Apologies. 

I'm using Next Gen.

"In a Classic project you can modify the workflow transition to add a Condition to disallow the transition unless Time Spent > 0. That addresses your requirement to have work logged."
@Trudy Claspill How exactly can that be achieved? Workflow conditions of type "Value field" do not allow check against "Time Spent".

I've tried checking against "Log Work" != null, but it does not seem to work....

I'm trying to configure a Classic (Software development)  project on Cloud..

@Stefan Anghel 

I have no problem selecting Time Spent as a field in the Value Field Condition

Screen Shot 2021-05-04 at 7.59.29 AM.png

 

Screen Shot 2021-05-04 at 8.02.11 AM.png

Like Stefan Anghel likes this

@Trudy Claspill thank you, I already resolved my issue thanks to an answer on another question.

You need to search for the field, the dropdown selection presents only a subset of possibile fields.

Is there a difference between 'Time Spent' and 'Log Work' when Tempo is used for logging time?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

330 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you