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

Disable time logging in only one task

Elena June 2, 2023

Hello,

I need to disable time logging in only one task. How can i do this? Can I solve this problem with a sil script?

2 answers

1 vote
Anna Hryhoruk _Appfire_
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.
June 6, 2023 edited

Hello   @Ellen 

Did you find a solution to your issue? If not yet, I would be glad to help you. 

Power Scripts and SIL indeed support some Tempo fields and screens. More detailed information about it you can find here .  But looks like not the one you want to hide.

However, you can hide LogWork button on the issue screen using javascript. Please see some simple example below: 

 You can hide the button (or another element) using a workaround that we usually set up for non-supported custom fields. It is described here.

This way uses routine LFExecuteJS and javascript code.

I`ve tried a simple example. So my Live Field script is the following:

lfExecuteJS("hide.js");

script hide.js :

AJS.$("#tempo-issue-view-panel").hide();

Here is an instruction on how to find this selector for a particular object on the page .Also, if you need to hide it from other screens, you would need to check if the query selector is the same there, and if not add one more line to hide.js script.

As a result, this will hide the Tempo section on the view issue screen. But as my example is very simple, it will hide it for all projects and issue types. You can add extra boundaries in LF settings page or add some conditions into the script (for example, use only at specific screen ) .

Before LF: 

image-20220413-104911.png

 

 

After LF:

image-20220413-104924.png

Hope this will work for you or at least give you an idea of what you can try in your particular use case.

Best regards,
Anna

Elena June 7, 2023

Hello @Anna Hryhoruk _Appfire_ 

Haven't found a solution yet. I liked your solution. I managed to hide the fields in the task. But when viewing a task in the list of all tasks, it is not possible to hide the fields.


Log Work.jpg

Can you help me with this?


0 votes
Aditya Verma
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.
June 2, 2023

Hi Ellen,

Can you please share the need of disabling work log in only a single task? Maybe the community can provide a different perspective.

Writing script for for just one ticket would be too much effort.

Thanks,
Aditya

Elena June 2, 2023

Hi Aditya,

The problem is that users do time logging in all project tasks. But we need to limit time logging in one task and in all its subtasks. This prevents the existence of this task. Therefore, the question arose whether it is possible to prohibit time logging in only one task.

Aditya Verma
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.
June 7, 2023

Hi @Ellen 

So there is a project "XYZ" and users currently log time under various tasks of XYZ project. But you want to limit time logging to a single tasks and its subtasks and disable time logging on all other tasks in this XYZ project.

Is my understanding correct ?

Some other details like what is the object of this particular project and how users currently use it would help in suggesting some solution as per Atlassian best practices.

Thanks,
Aditya

Elena June 7, 2023

Hi @Aditya Verma 

I need users to be able to do time logging in all project tasks except for one. I need to block time logging in only one task with its subtasks.

Suggest an answer

Log in or Sign up to answer