Run a Precondition on a checkin?
Jack Hall (36●4●5) | asked Aug 05 '10, 9:22 a.m.
Hello, I was wondering if anyone knows how to run a precondition when the users checks files in to a changeSet. I am looking to be check the files for attributes and automatically update said attributes if they need updating, but I don't want the user to have to deliver twice and apply a quickfix. I want this operation to be as transparent to the user as possible.
Evan Hughes (2.3k●5●17) | answered Aug 05 '10, 2:49 p.m.
There aren't any hooks on checkin. We do this for two very good reasons:
1) We want the user to be able to backup their work into their remote workspace. If we prevent a checkin, that will cause data loss later if something happens to the user's workstation.
2) We determine the process to run on a delivery by looking at the process area the stream is owned by. At the time of a checkin, the user may not have a stream set as their flow target (or may be flowing to a stream that has different process than the stream you care about).
As you mention, you can hook delivery. The user won't have to create a new change set if it remains open.
Alternatively, you could see about writing a plugin for eclipse that would update your attributes on a save.
Jack Hall (36●4●5) | answered Aug 05 '10, 4:40 p.m.
We weren't planning on stopping a checkin. We just wanted to modify some data in the file on every checkin. Is this still only possible by hooking in to eclipse's save function?