We have a development environment where we do not have a direct way to access our subversion repository within our network. SO we need to login to a vm machine and check out the code. To avoid this, we were thinking of creating an ant build script which would check out the files from svn everyday night and update to repository and update the right users on modified files. Now here is my question. 1. Does salesforce ant task have an option to query the user who modified the apex class and visual force pages? 2. I also understand that once we get the user information who created or modified an apex file, we would need to create a custom code which would map it to the right user and update his id as the modified id in svn. Is there any tool which can do this automatically? So please let me know.. Buyan
-
If I understand your approach correctly, you are trying to track the identity of who last changes a component on a given day. That scheme misses the more important aspect of the reason comment or issue number that initiated the change. So even if the answers to 1) and 2) were yes and yes (instead of AFAIK no and no) finding a way to make a version control system accessible (e.g. a cloud one) would be a better way to spend your money in my view.– Keith CCommented Oct 15, 2013 at 21:19
1 Answer
Yes, ApexClass and ApexPage are objects in SF that are queryable. http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_apexclass.htm http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_apexpage.htm http://www.salesforce.com/us/developer/docs/api/Content/system_fields.htm
SELECT Id, LastModifiedBy.Name FROM ApexClass
You should be able to leverage the REST or SOAP API's to query for them and then reconcile them on your end with the XML you pull down.
This I am not sure about, you might be better off also posting to one of the other StackExchange sites that will have people more familiar with manipulating SVN logs.
Someone did something similar with GitHub, but I don't think they did the user by user commits. Worth taking a look at.
http://wiki.developerforce.com/page/Syncing_Salesforce_Org_Metadata_to_Github
-
Helpful if the question was "how might I build these tools".– Keith CCommented Oct 15, 2013 at 21:28