Is it possible to let a user acquire a lock but not release it?
Accepted answer
The permissions for locking and unlocking files are the same, presumably because only the same user can unlock something they locked (or a Jazz Admin).
Ignoring this permissions issue, you would have to develop a script/operational behavior extension to release the lock. Maybe you should make this automation take both sides of the issue. When a user starts working in a file, the file is locked by a script using some service account (maybe it can run as the system itself, haven't written any myself lately). The script would then unlock it with the same service account when the validation is done. I don't know how you want to determine "working in a file"; if you lock it when the user checks it out that could get annoying to the other users, but I don't know how your SCM is set up and utilized so maybe that is ok. Regardless, sounds like a bunch of scripting is your option here.
Comments
Hello June. What do you mean by "service account"?
An account in your LDAP, or Tomcat registry or whatever you use, that isn't actually a person but instead is used by scripts or other processes, and has a big long complex password. For example, the common reporting service account "rptuser" isn't logged into by any human, just other programs; I see one of these in most environments. "Service account" isn't a CLM term, just a description; you would implement it as a normal account, making it a Jazz User (or a Jazz Admin if you need to).
In the example of this script: because only the user who locked a file can unlock a file, if the service account the script uses does all the locking/unlocking then your users won't be able to unlock the files, only the script account would (which it will do automatically after the validation). The script's service account would need to be a member of the project and have a role that allows it to lock/unlock files, of course. If you made it a Jazz Admin, it could probably work without being added to the project, and it could unlock files that your users lock.
Okay, I now understand. So, do you have any idea of how to trigger the script when the user edits the file?
When you say edit, do you expect the users to probably have all files in their sandbox and only edit one of them? If so... I'm not sure how to do that with Eclipse, though I'm sure it is possible. Perhaps you could wait for the RTC event of a file being checked in from a sandbox to a workspace, and if that file wasn't previously locked you do so.
There are a lot of weird technical/business decisions relating to your needs and process you will have to make, and I haven't written extensions for source control behavior since CLM 3 so I don't think I could get more detailed on how to implement it. This is just my theory on how to make CLM do what you need it to do, as extensions are useful to fill the gaps in CLM capabilities.