function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Naresh2389Naresh2389 

Apex component last modified date is getting changed with ant deployment

HI All,

With ant deployment components modified dates are getting changed in salesforce even if component is not changed but it is inlcuded as package deployment.Earlier it was not the case.

Apex Classes,Pages,Trigger dates getting changed even no change in component.
VinayVinay (Salesforce Developers) 
Hi Naresh,

Can you try with one component.  I haven't seen any related issue for the same.

https://trailblazer.salesforce.com/issues_view?id=a1p30000000T3KTAA0&title=apex-triggers-showing-up-as-changed-always-in-the-deploy-messages-even-though-code-didn-t-change-last-modified-date-also-updated

Thanks,
Naresh2389Naresh2389
HI Vinay,

You mean it should not change?

I have tried with single apex class and visual page and reran the jenkins job multiple times with unchanged  code and last modified date is getting changed,Earlier it was not the case and last modfied date use to be same.Any update from salesforce side?
VinayVinay (Salesforce Developers) 
Hi Naresh,

I checked from my end and it didn't change if the controller was not modifield.  Also, I tried to check if there is a bug however haven't found anything related.

As a workaround, you can try to exclude unmodified classes from deployment or log a case with salesforce.

Please mark as Best Answer if above information was helpful.

Thanks,
Naresh2389Naresh2389
HI Vinay,

You mean class is available in your package and tried to redeploy same component  date is not changing for you?
Naresh2389Naresh2389
I cannot exclude because we have scripts which will take delta changes in CI tool.
VinayVinay (Salesforce Developers) 
No, not the exact class I tried in the generic method and deployed a single controller to check behavior.

If you cannot exclude unmodified classes then kindly log a case with salesforce and they can help you.  Meanwhile will let you know if I have more details or a similar issue with others.