The file type is chosen/processed when the file is created. Once the file is created you can only change file type the cmd line tool.
The most effective way of ensuring all file types are correct is by adding an entry to the ClearCase magic file (OK 2 entries) so the appropriate type is chosen when adding to source control.
minimized_javascript web_file script binary_delta_file : -printable & -name "*.[mM][iI][nN].[jJ][sS]";
minimized_javascript web_file script binary_delta_file : -name "*.[mM][iI][nN].[jJ][sS]" ;
These entries need to be processed AHEAD of the regular .js entries in the magic file when the file gets created.
If you are using ClearTeam Explorer and Web based views (CTE default), the changes need to made on the view server's magic file, not the local one.
Magic file ? What's that? Well, Rational does a terrible job of explaining it, but it is a very powerful mechanism for managing how CC handles files. Feel free to read:
About the ClearCase Magic file
About the MAGIC_PATH variable
Evaluating multiple magic files
Unfortunately, IBM was never able to provide me a clear answer what should be in the custom magic file: just the custom lines and no closure line or the custom plus all the lines from the default. So, we changed our MAGIC_PATH to:
MAGIC_PATH=/cc_store/vobstg/vobstore/magic:/opt/rational/clearcase/config/magic
and added a copy w/custom lines ahead of the provided rules in the first path, which we called cc.magic. I suspect as long as you have no catch-all, it will process every *.magic path per the ordering rules until it finds a matching rule or catch-all.
They also failed to point out for the above to actually work in CC8 using CTE, you also need to modify the Websphere server file:
/apps/infra/rational/SDLC/common/ccrcprofile/config/cells/dfltCell/nodes/dfltNode/servers/server1/server.xml
<environment xmi:id="Property_1387399742135" name="MAGIC_PATH" value="/cc_store/vobstg/vobstore/magic:/opt/rational/clearcase/config/magic" description="Setting req'd so CCRC web views can access MAGIC_PATH" required="false"/>
It is documented that under CC7, you needed to change the files:
/var/adm/rational/common/rwp/conf/
ccrcweb.conf and ccrc.conf
But CC8 of course comes w/standalone Webshpere, so the files are no longer there.
Of course, if you got this far, you probably realize you need write access to the view server ClearCase install to change these settings, in which case you also have access to run the command line tool cleartool.
And if you have command line access, here's a little command you can run against dynamic view to change all the files with the wrong settings:
cleartool find * -type f -name "*.min.js" -element '! eltype(binary_delta_file)' -print |sed 's:@@::' | xargs -I {} cleartool chtype -force binary_delta_file {}