Open frugardc opened 13 years ago
Yeah, so this looks like another bug in SugarCRM. Changes made in Studio are supposed to override the base module vardefs. That's not happening and I've confirmed it below. Feel free to check your work against mine.
Check these two files to make sure you made the changes in Studio correctly:
sugarcrm/modules/Opportunities/vardefs.php
'date_closed' =>
array (
'name' => 'date_closed',
'vname' => 'LBL_DATE_CLOSED',
'type' => 'date',
'audited'=>true,
'comment' => 'Expected or actual date the oppportunity will close',
'importable' => 'required',
'required' => true,
),
and:
sugarcrm/custom/modules/Opportunities/Ext/Vardefs/vardefs.ext.php
// created: 2011-02-16 16:11:55
$dictionary['Opportunity']['fields']['date_closed']['required']=false;
$dictionary['Opportunity']['fields']['date_closed']['importable']='true';
$dictionary['Opportunity']['fields']['date_closed']['calculated']=false;
The vardefs in vardefs.ext.php should override the values in vardefs.php. You can confirm this IS NOT the case via REST with:
SugarCRM::Opportunity._module.fields["date_closed"]
=> {"required"=>1, "label"=>"Expected Close Date:", "name"=>"date_closed", "type"=>"date", "options"=>[]}
Happens here, too. Seems like a SugarCRM issue: SugarCRM.connection.get_fields("Opportunities")
returns closed_date
as required, even though it's possible to create an opportunity in the GUI with a blank date_closed...
Yeah, looks like my changes in studio took, and it's just not working REST. Weird right? Where would it be getting the required status from? I'll log a case with Sugar and post the Case # here.
Created Case #71996 with Sugar.
I am getting the response on my case that they cannot replicate it. Seems that the three of us all see the same issue. Any way you can check in with Freddy Feliciano, the person working the case and see what he's doing different?
I'll check with them. Today is a holiday, so it might be a few days.
I updated the case. I think Freddy was confused about what the actual issue was - I'll follow up with him directly tomorrow.
Looks like they opened a bug on this: http://www.sugarcrm.com/crm/support/bugs.html?task=view&caseID=759d72d1-84d6-917e-cfad-4d666851b759
Looks like they have a solution, but I haven't been able to get a hold of a hotfix.
I have gone in through Studio and made the "date_closed" field no longer required. Seems no matter what I do, the gem still sees it as a required attribute. I have also done the quick repair and rebuild.