How to make all fields readonly in Catalog task only after 3 months after setting the state to Closed Complete?

Ramel
Mega Guru

Hi All,

I have a requirement to make fields read only after 3 months of after setting the state to Closed Complete. We have an existing client script that does set the fields to read only once the state is Closed Complete but they wanted to change that they still want to have the ability to modify even if the State is already Closed Complete if it is still within 3 months when the state was changed to Closed Complete.

Anyone had any idea how to do this implementation following the best practice. My idea is to create a system property similar to auto incident closure then execute some script once 3 months is reached. Can someone help how to put things together to make it work?

Regards,

 

12 REPLIES 12

Tony Chatfield1
Kilo Patron

I am not sure I would consider this requirement best practice…..
if you are going to set active= false on closure but not consider the task closed then you will need to add another field to identify when it is actually closed ie after 3 months, I would then run a daily scheduled job checking the tasks closed timestamp and at 3 months, set the really, really, really closed field and then based on this you can apply your read only fields solution.

what happens within the 3 month period if some decides the task should be opened? I think you would need to ensure at the least that the close time stamp is removed.

Gaurav Shirsat
Mega Sage

Hello

Usually variables are Read Only on RITM and TASK as soon as the catalog item is triggered.

so, what is the use case behind this scenario?

we usually do this by using an onload Catalog Client Script :- 

by adding following info:- 

RITM and Task View check box true:- 

script:- 

g_form.setVariablesReadOnly(true);

Can you please explain the use case requirement briefly, why to do so?

Mark my Response as Correct or Helpful, if you find it Appropriate.
Gaurav Shirsat
https://www.linkedin.com/in/gauravshirsat/

 

Hi @Gaurav Shirsat ,

Thanks for the reply. To explain briefly, the current setup is we have an onload client script that makes all the fields readonly when the state is changed to closed complete. The requirement now is to make the fields read only after 3 months of setting the state to closed complete. So it won't make the fields readonly right away after making the state closed complete. if you have another way of doing it that can satisfy the requirement, please let me know. Thanks.

Regards,

Ramel