Forums

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

Force users to log on status change in Team-Managed Projects

Arthur Harutyunyan
Contributor
July 21, 2023

Hey Community, hope you are all doing well ;)

 

Just have a question about the Team-Managed projects, which are excellent, but I do want to have more features in there :)

For example, I want to force the users to log their work on status change. I did it successfully on Company-Managed projects and it works efficiently. So, it would not be possible to change the status from "X" to "Y" without logging the "Time Spent" in the dedicated field. 

I did it using the Jira powerful validations and on the issue transition,

 

I want to implement the same on another small Team-Managed project for the design team. 

I tried to manage it using the Team-Managed project automation, but could not success ;( 

 

So, please let me know your opinion about this feature to add in Team-Managed project, and please share with me your experience about the workarounds or solutions of this.

 

Thanks, 

Arthur

2 answers

0 votes
Piotr Stefaniak [HeroCoders]
Contributor
July 24, 2023

Hello @Arthur Harutyunyan 

Clockwork developer here. I think you will have hard times trying to implement what you want, but I'm speculating that if you'd loose some of your requirements it maybe would be possible to achieve what you want.

Let me first advertise something which I'll use as a base for the solution I propose: https://docs.herocoders.com/clockwork/prevent-a-transition-if-no-time-logged

This is built-in functionality for Clockwork Pro (and I assume you don't want to go with paid version of Clockwork currently) that probably works as you would expect **for company-managed Jira projects only**. The **team-managed** projects were unsuitable for this kind of functionality due to API missing in them. However, I speculate that you could try to replicate that specific functionality using some clever automations + hidden custom fields to store the state. Here is the gist how it works:

  • (a) when user transits issue to new status, your custom automation should reset the "gatekeeper" status - i.e. update some custom field to 0
  • (b) when user updates issue with new worklog, your another custom automation should update "gatekeeper" status, i.e. update aforementioned custom field to 1
  • (c) use built-in validators to prevent transiting issue to another status until "gatekeeper" is closed - i.e. a validator that requires aforementioned custom field to be in 1 before allowing to move to "Test"

The idea is that whenever Clockwork Free is used to log the work, it underneath goes to Jira and creates/updates that issue's Jira native worklog. That's the moment I speculate your custom automation from (b) would kick in and mark the issue as "ready to transit".

It wouldn't allow you to log the time and transit issue on the same transition screen (because I believe there are no transitions screens on **team-managed** projects, but even if they are, there are no Jira API for Clockwork to hook there with its logging time stuff), but it would allow you to require your users to first log some time via Clockwork Free, and only then allow your users to transit the issue to another status.

If you go that route, please ping me later with your findings - I'm curious if that approach turns out to be feasible or not (and for what reasons).

Cheers and good luck,
Piotr Stefaniak
HeroCoders developer

0 votes
Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2023

Hello @Arthur Harutyunyan

Have you checked the rules that you can add in the workflow section of the settings?

My ideas are:

  1. Add a rule to restrict when a field is a specific value
    rule1.png
  2. Add a rule that if a ticket has not been through a specific status it will be restricted.
    • This would need to be followed up by an automation that moves the ticket to the designed status for logged time validation with a trigger on logging time
      rule2.png
  3. Create an automation that would revert the status to the previous one if no time was logged.

Let me know if you would like to investigate in any of these options.

Best regards,
Patrik

Trudy Claspill
Community Champion
July 21, 2023

This rule would allow the issue to transition if any time was logged at any point prior to the transition.

This rule would not force the user to log additional time as part of completing the status transition.

In a Team Managed project there is no method to require a user to enter data while making an issue transition because Team Managed projects don't support adding a Transition Screen.

The "Restrict to when a field is a specific value" rule requires you to have entered information in the issue before you attempt to execute the transition.

And, in fact, checking the total time logged for an issue is actually not one of the fields that can be checked with this rule.

Patrik Korovsky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2023

Hello Trudy,

Thanks for following up on my comment. Agreed it might have been good to mention that natively there is no way do this.

I have learned to find workarounds before saying that something is not possible and so far I have been relatively successful.

If having at least 1 hour logged for the user would be sufficient, wouldn't you say that the field specific rule could be set up this way? A custom field could be created that would be updated by automation each time hours would be logged. This way multiple scenarious could be set up and the actor could be the set to the initiator.

These are just ideas and I will be happy to explore further. If Arthur would like to try at least something rather than nothing outside of native functionality that is.

Trudy Claspill
Community Champion
July 21, 2023

Hello Patrik,

I inferred from the author's post that they wanted time logged each time the issue was transitioned to another status, to capture the time spent along the way, as can be done with a Transition Screen in a Workflow for a Company Managed project. Your solution only ensures that the total Time Spent on the issue was not 0 when it is transitioned. 

But your inference might be correct and mine might be wrong. :-)

@Arthur Harutyunyan 

Can you clarify your requirement?

Arthur Harutyunyan
Contributor
July 23, 2023

Hi @Patrik Korovsky thanks for suggesting that workaround. I will dig in a little bit to try to find a workaround using the automation. I am not that optimistic though, because I am using an external plugin for time logs in my Team-Managed projects which brings more complexity in this flow. 

 

image.png

 

So, I want to somehow force the users to use "Clockwork Free" logging plugin !!

And to answer to @Trudy Claspill the requirement is the following:

The workflow I have for this Team-Managed project is the following:

   ToDo -> InProgress -> Test -> Validated/Reopened

I want to force the users to add a log in "Clockwork Free" once the issue is transitioned from "InProgress" to "Test".

Thanks guys!!

Arthur 

Suggest an answer

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

Atlassian Community Events