Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Serena Dimensions CM
- CM Bridge
- Dimensions CM
- 엔터프라이즈 SCCM
- Dimensions Pulse
- build
- SharePoint
- DIM14
- Customization
- teamscript
- Jenkins
- 세레나소프트웨어
- 소스코드관리
- Embracing OpenSource
- 버전관리
- SCCM
- IntelliJ IDEA
- TeamTrack
- UseCase
- BPM
- CM14
- Continuous Integration
- SBM
- integration
- Serena software
- Stream
- CKEditor
- AppScript
- Enterprise Software Change and Configuration Management
- Software Change and Configuration Management
Archives
- Today
- Total
this and that
SBM AppScript Use Cases - 02. Calculate Work Effort Difference 본문
이번 스크립트는 예상 작업 시간과 실제 작업 시간의 값의 차이를 계산하여 경우에 따라 해당되는 필드에 값을 입력하는 시나리오이다. 프로세스가 종료될 때 예상 시간보다 실제 시간이 초과했을 경우 Work Effort Over에 차이값을 입력을 하고, 초과하지 않았을 경우 Work Effort Under에 차이값을 입력을 한다.
' Name: calcWorkEffort ' Function: Find the difference between Est. Work Effort and ' Act. Work Effort and set the proper field value: ' Work Effort Over or Work Effort Under ' Context: Post-transition on Complete transition ' ' Date: 03/09/2006 ' For use in the TeamTrack TeamScript course examples. ' Require all vars to be declared before use (and then declare some) Option Explicit Dim objItem, objFields, objField Dim nEstWorkEffort, nActWorkEffort, nDifference ' Get the shell's objItem object (VarRecord/AppRecord) If Ext.ShellHasProp( "Item" ) Then Set objItem = Shell.Item ' Get the objItem's objobjFields object Set objFields = objItem.Fields() ' Get the Est Work Effort objField's object and value Set objField = objFields.FindField( "EST_WORK_EFFORT" ) objField.GetValue nEstWorkEffort ' Get the Act Work Effort objField's object and value Set objField = objFields.FindField( "ACT_WORK_EFFORT" ) objField.GetValue nActWorkEffort ' Calculate the difference nDifference = nActWorkEffort - nEstWorkEffort ' Shell.redoMessage = nActWorkEffort & " - " & nEstWorkEffort & " = " & nDifference ' Determine which field to set. If nDifference < 0 Then ' Get the Work Effort Under objField's object and set its value Set objField = objFields.FindField( "WORK_EFFORT_UNDER" ) Call objField.SetValue(Abs(nDifference)) Else ' Get the Work Effort Over objField's object and set its value Set objField = objFields.FindField( "WORK_EFFORT_OVER" ) Call objField.SetValue(nDifference) End If ' No shell objItem, if possible display browser error message Else If Ext.ShellHasProp( "redoMessage" ) Then Shell.redoMessage = "Error: No current issue." End If End If
'SBM' 카테고리의 다른 글
SBM AppScript Use Cases - 04. Subtask Time Calculation (0) | 2011.11.22 |
---|---|
SBM AppScript Use Cases - 03. Auto-Subtasks for Assessors (0) | 2011.11.22 |
SBM AppScript Use Cases - 01. Validate Work Effort Fields (0) | 2011.10.28 |
Using Web Fonts to SBM (0) | 2011.08.25 |
SBM UI Customizing with jQuery (0) | 2011.08.01 |
Comments