Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Josh Allen
Contributor
September 3, 2020

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
Josh Allen
Contributor
September 4, 2020

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

1 vote
Trudy Claspill
Community Champion
September 3, 2020

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.

Josh Allen
Contributor
September 4, 2020

Oops, that would have been helpful information. Apologies. 

I'm using Next Gen.

Stefan Anghel
Contributor
May 4, 2021

"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..

Trudy Claspill
Community Champion
May 4, 2021

@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 # people like this
Stefan Anghel
Contributor
May 5, 2021

@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.

Dave Mathijs
Community Champion
December 23, 2021

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

Artur Balyan _ Immedis
Contributor
August 23, 2023

@Trudy Claspill 

That's an eye-opener! This can serve as a transition cool-down, which is what I was looking for. Thank you.

Hira Ahmed Shaikh
Contributor
August 29, 2023

I have applied Validators as the image below. but users are not able to move the jira tickets now. even when comments are there. have I missed something.

wqde.png

Trudy Claspill
Community Champion
August 30, 2023
Like Hira Ahmed Shaikh likes this
Hira Ahmed Shaikh
Contributor
August 30, 2023

Yes and it works. Thanks all for the support.

Hira Ahmed Shaikh
Contributor
August 30, 2023

Yes and it is working well for me. Just as i wanted. Thanks to the Atlassian community for the support.

Suggest an answer

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

Atlassian Community Events