Can't Create/Edit Calls: "Duration time must be greater than 0" error

Hi,

After I changed something in the duration fields of Calls module inside Studio(I think making duration_hours a required field is what broke it, could be something else) I can no longer use the Calls module. Whenever I try to create a new call, if i have the hours field at 0 I get the popup “Duration time must be greater than 0”. If I put it at anything else(1, 2 etc) and click Save, nothing happens, it doesn’t save, and the only option that works is canceling and deleting the call. This is also the case for older, saved calls when I try to edit them.

The only working method to create a new call is through the Callendar, by clicking somewhere and Logging a new Call. This still works fine, but after creation I can’t edit the call because of the aforementioned issue.

I tried changing stuff, like default values inside the db, the vardefs(some stuff that ChatGPT said might be the issue), nothing I tried solved it though.

Any help or ideas are appreciated!

Since you made it mandatory using Studio. Did you remove that checkbox?

You can find the vardefs folder under your calls module and check conditions there.

/legacy/custom/modules/Calls/Ext/Vardefs/

Try and set the default value for duration to be 15 minutes in the studio.

Ensure you have the duration dropdown visible on the front end so it can be populated.

OH and don’’t listen to ChatGPT. Be very careful. It’s horrendously wrong on most SuiteCRM stuff. (Ask me how I know!) Especially when it’s telling you to modify the DB or something desctructive like that!

I also want to add my hooks files since, if I remember correctly, I made some changes there as well under the guidance of GPT. The files look OK to me but maybe I broke something that I can’t see.

If you want I can try to shift through my GPT conversations and suitecrm logs to compile a list of all the steps I have taken to try and fix this before posting here.

When I try to uncheck the box inside the Studio it doesn’t save the change. I also want to note that I have written this line again previously but now that I checked it was missing and I had to re-add it.

I want to provide more info in case it helps. I am on version 8.9.2 and these are the studio views of both hours and minutes, as well as the vardefs file.

After I took these I added the “required=false” line inside the vardefs file and now the box is unchecked, however the problem is still there. I also want to note that I have written this line again previously but now that I checked it was missing and I had to re-add it.

Did you remove [required] line from the vardef file and try to create a call record?

You might want to consider reverting back to stock. ChatGPT can have you running down so many different rabbit holes and changing so many things, you’ll never trace it back. A change causes a problem, which fixing that causes another problem, fixing that causes another problem, and quickly an easy task becomes three days of trouble shooting. (At least that has been my experience). Go back to a known working point and start from there.