Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I prevent a status change in JIRA when there's no time logged via Tempo?

Dimitar Karamanov March 21, 2023

We want to automate Tempo time tracking with Jira automation. How can I prevent a status change without time being assigned in Tempo?

I.e if we have a JIRA ticket with the status In development/Testing/Code review etc. to make it impossible for a such ticket to be moved to status Done/On Staging etc. if there's no working time logged in it.
Users should see an error message that looks like this "Please log the time you spent working on this issue before changing the status".

According to Chat GPT, it's possible and it gives a suggestion that does not seem to be correct.

Is it even possible? Has someone managed to do it and if yes, how?

1 answer

1 vote
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2023

Hi @Dimitar Karamanov , welcome to the community and thanks for your question.

You can implement this requirement using a screen and a project workflow validator.

What you need to do first, is create a screen. This is what we will use as a pop-up to block people transitioning the issue unless they log their work. It can be as simple as this  -

image.png

Next, in the workflow for the issue where you want to implement this, add the screen to the transition where it should be effective, like this -

image.png

Next, you will need to add a validator. This is what enforces that something has been logged.

image.png

The end result is this, when I try to transition from the Backlog status to Selected for Development -

image.png

I haven't shown every screen but I hope this is enough to help you get started. I would encourage you to try this first in a test instance and write us back here if you get stuck or need more help.

Cheers

Dimitar Karamanov March 22, 2023

Hey @Valerie Knapp , thanks a lot for the detailed explanation.

I went ahead and started following the provided steps, however the second step does not seem to be available on my end.

https://community.atlassian.com/t5/image/serverpage/image-id/246739i964000813F0991A9/image-size/large?v=v2&px=999

I have admin rights in Jira, but I am not seeing the Edit button as in the screenshot. Can you please elaborate a bit more on where I need to go to be able to access it?

Thanks in advance!
Cheers

Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

Hi @Dimitar Karamanov , thanks for your message.

You will need to select the transition where you want to add the screen. 

In the workflow I used in the example, all of the transitions are global transitions. What this means is that you can always go from any status to any other status. This isn't necessarily typical as often you will want to prevent people from just closing everything that has been opened.

Here is another workflow. If I double-click on the transition from Nuovo / new to In Corso / in progress, this screen pops up where I can add the screen, which should be shown on the transition. Then, if I hit Save and publish the workflow, the screen should be shown when I try to go from Nuovo to In Corso in a project / issue where this workflow is active. 

image.png

Please can you try again and give your feedback?

Cheers

Dimitar Karamanov March 22, 2023

Thanks a lot @Valerie Knapp !
I have completed the first step and I was able to successfully configure a screen. However, the next steps do not seem to be available to me, or it's not really clear where I can access these. Could you please provide step-by-step instructions, if possible?

Unable to find:
https://community.atlassian.com/t5/image/serverpage/image-id/246741iEC1F20A60EC24351/image-size/large?v=v2&px=999 and 
or
https://community.atlassian.com/t5/image/serverpage/image-id/246968iB56D3B6AEF16D1DE/image-size/large?v=v2&px=999

Thank you in advance!

Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2023

Hi @Dimitar Karamanov , thanks for your message.

While I am happy to help guide you in general, the commitment to write a step-by-step guide is beyond what I’m willing to contribute in my free time here. I’d suggest to wait either for someone else to chime in or get help from an Atlassian Solution partner. You can find a partner in Atlassian Partner Directory

Cheers.

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.
March 23, 2023

@Dimitar Karamanov I wouldn't rely very much on ChatGPT when it comes to Jira. It doesn't have the reputation of providing reliable and correct answers.

Like Dimitar Karamanov likes this
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.
March 23, 2023

@Dimitar Karamanov and because I now read the chatGPT answer:

Go to your Jira project and click on the "Project settings" icon in the sidebar.
Click on "Automation" under the "Automation" section.
Click on "Create rule" and select "Custom rule" from the dropdown menu.
Give your rule a name, such as "Prevent status change without Tempo time tracking".
In the trigger section, select "Issue transitioned" and choose the status that you want to prevent changes from without Tempo time tracking.
In the condition section, click on "Add condition" and select "Compare values".
Set the first value to "Tempo worklogs" and the second value to "is equal to" and leave the third value blank. This will check whether the issue has any Tempo worklogs.
In the action section, click on "Add action" and select "Stop the rule execution" from the dropdown menu.
Set the message to something like "Please add Tempo time tracking before changing the status".

The above is utterly wrong. If you create an automation that automation will run AFTER the transition will take place. Follow the rules exactly as @Valerie Knapp laid out. It's actually a step by step guide.

Like Esther Strom likes this

Suggest an answer

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

Atlassian Community Events