Run a Precondition on a checkin?
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.
2 answers
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.
e
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.
e