Automatic unlock if a change set is discarded
Hi
I need to implement the pessimistic lock, so I lock the source file at stream level.
If I discard the changes, I would expect that the lock on the resources is automatically removed, but it doesn' happen (the changes are discarded, but the file remains locked).
Is there a way to avoid this behaviour?
From my point of view, it's correct that the lock remain active if the change is suspendend, but if I discard the changes, it means that I want to go back to the previous status...
Is there a way to implement a plugin to perform this automatic unlock after a revert action?
Thank you for any suggestion
Laura
Accepted answer
HiI think you'll have to open an enhancement on this. The discard operation doesn't have any support for dealing with locked versionables. It may be possible to write a plugin for this support but I'm not sure if you want to go that far unless pessimistic locking is essential.
I need to implement the pessimistic lock, so I lock the source file at stream level.
If I discard the changes, I would expect that the lock on the resources is automatically removed, but it doesn' happen (the changes are discarded, but the file remains locked).
Is there a way to avoid this behaviour?
From my point of view, it's correct that the lock remain active if the change is suspendend, but if I discard the changes, it means that I want to go back to the previous status...
Is there a way to implement a plugin to perform this automatic unlock after a revert action?
Thank you for any suggestion
Laura
You may want to check out the current enhancement and story items for a pessimistic locking model. You can add your support there.
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/89703
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/93617