Case Closed date and time

Hi All,

I’m trying to figure out how to add the date/time of the closed case to the Cases module. Can anyone point me in the right direction?
Suitecrm version is 7.10.5

Go inside Admin / Studio

There choose the module where you want the field to appear. (for example, do you wan to see it under Accounts, or Contacts, or simply in the Cases module itself?)

Then choose the view or subpanel where you want to change it, and drag the field into the visible form. Then save and deploy.

Check the Documentation about Studio

https://docs.suitecrm.com/admin/administration-panel/studio/

Hi PGR,

I already did, there’s no date_closed field… I have date_entered and date_modified but date_closed is missing from profiles and cases modules.

Hi asuitecrm,

Reading through the thread here it seems that a workflow would be the way to set this up.

What you could do is create a field, for example, Closed Date, and then set a workflow up to set the date/time within this field when the case status is set to closed.

If you would like any help at all with setting up workflows or creating your field then please let us know.

All the best!

Thanks,
Ellis.

1 Like

Hi Reeley,

Thanks for the tip. All worked as expected. FYI I had to do the following :
1: add workflow that checks case status (closed/cancelled) and if no close date : set now date . First run workflow on all records (to add close date as current date) then change to modified records only to change only new records.
2: add workflow to clear the closes case date if case is reopened by reply. Run only on modified records.
3: To make the field NOT editable modify the file: /custom/modules//metadata/editviewdefs.php, go to the module you have the closed date and add to the label you need:

'type'=>'readonly',

the code should look like bellow :

        array (
          0 => '',
          1 =>
          array (
            'name' => 'date_closed_c',
            'type'=>'readonly',
            'label' => 'LBL_DATE_CLOSED',
          ),
        ),

Thanks for all the help! I think the following could be a nice functionality to have in the CRM by default.
1: Have a closed date on cases closed (or an option to get the record edit date that is not bases on workflows). If case/record was modified change date. Audit makes it easy to see when cases were closed/opened again but inline view is a must on some type of records.
2: have an option to make fields not editable without code change

Cheers

1 Like

Hi asuitecrm,

Thats great, glad to hear you got it working!

Thats nice, and I agree, that could be a nice flow to have as standard functionality :slight_smile:

When setting up a test workflow I used Run On: All Records - that way it would work on new records and existing ones, Run: Only on save, and also added Repeated Runs in the case that the record was maybe updated so we can change the date again. I added in 2 conditions also to make sure it only ran when that stat was changed to closed, and not just saved.

But glad to know you got it working as expected!

Thanks again,
Ellis.