get approvers with trigger
Feb 14, 2007
11:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 14, 2007
11:27 AM
get approvers with trigger
hi all,
i'm writing a post release level change to get the two approvers that
vote for the change of a release level of a piv and the date of both
approvation.
using PDMReviewHistoryGetLastModificationStamp i can get the last
approver, but i'm not able to find the first approver.
the portion of code that i wrote and work for the last approver is:
for ( i=0; i<argc; i++=" )=" {<br="/> part = *((HPDMPROMOTIONPARTICIPANT *)argv[i]);
err = PDMPromotionParticipantGetPIV( part, &piv );
err = PDMPromotionParticipantGetPromotionForm( part, &pf );
// get REVIEW HISTORY
err = PDMPromotionFormGetReviewHistory ( pf, &revisionHistoryCursor );
for ( PDMCursorGetNext( revisionHistoryCursor, &ReviewHistoryHandle );
!PDM_HANDLE_IS_NULL( ReviewHistoryHandle );
PDMCursorGetNext( revisionHistoryCursor, &ReviewHistoryHandle ))
{
// get the last modification stamp of REVIEW HISTORY
err = PDMReviewHistoryGetLastModificationStamp(
ReviewHistoryHandle, &dataOraReviewHistory, &reviewer );
// reviewer is the last approver
// get date of last modification
err = PDMDateTimeGetInfo ( dataOraReviewHistory, &DateTimeInfo );
PDM_STATUS(funcName, "PDMDateTimeGetInfo()",err);
}
err = PDMCursorDelete ( revisionHistoryCursor );
PDM_STATUS(funcName, "PDMCursorDelete()",err);
any help is appreciated.
thanks,
michele giudici
[]
Cad.I.Tech. - Cad Integration Technology s.r.l.
Via Montevideo 7/11, 16129 Genova (Italy)
i'm writing a post release level change to get the two approvers that
vote for the change of a release level of a piv and the date of both
approvation.
using PDMReviewHistoryGetLastModificationStamp i can get the last
approver, but i'm not able to find the first approver.
the portion of code that i wrote and work for the last approver is:
for ( i=0; i<argc; i++=" )=" {<br="/> part = *((HPDMPROMOTIONPARTICIPANT *)argv[i]);
err = PDMPromotionParticipantGetPIV( part, &piv );
err = PDMPromotionParticipantGetPromotionForm( part, &pf );
// get REVIEW HISTORY
err = PDMPromotionFormGetReviewHistory ( pf, &revisionHistoryCursor );
for ( PDMCursorGetNext( revisionHistoryCursor, &ReviewHistoryHandle );
!PDM_HANDLE_IS_NULL( ReviewHistoryHandle );
PDMCursorGetNext( revisionHistoryCursor, &ReviewHistoryHandle ))
{
// get the last modification stamp of REVIEW HISTORY
err = PDMReviewHistoryGetLastModificationStamp(
ReviewHistoryHandle, &dataOraReviewHistory, &reviewer );
// reviewer is the last approver
// get date of last modification
err = PDMDateTimeGetInfo ( dataOraReviewHistory, &DateTimeInfo );
PDM_STATUS(funcName, "PDMDateTimeGetInfo()",err);
}
err = PDMCursorDelete ( revisionHistoryCursor );
PDM_STATUS(funcName, "PDMCursorDelete()",err);
any help is appreciated.
thanks,
michele giudici
[]
Cad.I.Tech. - Cad Integration Technology s.r.l.
Via Montevideo 7/11, 16129 Genova (Italy)
2 REPLIES 2
Feb 14, 2007
11:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 14, 2007
11:53 AM
I have never tried to get this data but I would try this:
PDMReviewHistoryGetOriginalVoter
(
HPDMREVIEWHISTORY ReviewHistoryHandle
/* (In)
The handle to the review history
*/
HPDMUSER* UserHandle
/* (Out)
The handle to the original voter
*/
Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase
Inc. | 616.698.4078
PDMReviewHistoryGetOriginalVoter
(
HPDMREVIEWHISTORY ReviewHistoryHandle
/* (In)
The handle to the review history
*/
HPDMUSER* UserHandle
/* (Out)
The handle to the original voter
*/
Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase
Inc. | 616.698.4078
Feb 23, 2007
12:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 23, 2007
12:04 PM
thanks for the suggestion,
i will tray and get a feedback.
michele
>I have never tried to get this data but I would try this:
>
>PDMReviewHistoryGetOriginalVoter
>(
>
>HPDMREVIEWHISTORY ReviewHistoryHandle
>
>
>/* (In)
>
>The handle to the review history
>
>*/
>
>HPDMUSER* UserHandle
>
>
>/* (Out)
>
>The handle to the original voter
>
>*/
>
>
>Patrick Williams | Sr. Application Engineer | CAM Systems |
>Steelcase Inc. | 616.698.4078
>
>[]
>
>
>
>----------
i will tray and get a feedback.
michele
>I have never tried to get this data but I would try this:
>
>PDMReviewHistoryGetOriginalVoter
>(
>
>HPDMREVIEWHISTORY ReviewHistoryHandle
>
>
>/* (In)
>
>The handle to the review history
>
>*/
>
>HPDMUSER* UserHandle
>
>
>/* (Out)
>
>The handle to the original voter
>
>*/
>
>
>Patrick Williams | Sr. Application Engineer | CAM Systems |
>Steelcase Inc. | 616.698.4078
>
>[]
>
>
>
>----------
![](/skins/images/695EE5AD3E567050FEDD72575855ED93/ptc_skin/images/icon_anonymous_message.png)