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
- 엔터프라이즈 SCCM
- Enterprise Software Change and Configuration Management
- Dimensions Pulse
- SharePoint
- SCCM
- UseCase
- BPM
- DIM14
- Continuous Integration
- CM14
- TeamTrack
- Jenkins
- CM Bridge
- Serena software
- teamscript
- Serena Dimensions CM
- SBM
- Dimensions CM
- IntelliJ IDEA
- build
- CKEditor
- AppScript
- integration
- Customization
- Stream
- 세레나소프트웨어
- 소스코드관리
- 버전관리
- Embracing OpenSource
- Software Change and Configuration Management
Archives
- Today
- Total
this and that
SBM AppScript Use Cases - 01. Validate Work Effort Fields 본문
Est. Work Effort 라는 필드가 있다고 가정하자. 보통 시간 단위로 입력한다.
프로세스를 진행할 때에 예상 작업 시간이 1보다 작을 경우 에러메시지를 표시하고 진행할 수 없도록 처리하는 스크립트이다.
' Name: validateEstWorkEffort ' Function: Check the Est. Work Effort field for a value larger than 0. ' Context: Pre-state for Approved state ' ' 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, bFailure, strErrorMsg bFailure = false strErrorMsg = "" ' 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 Set objField = objFields.FindField( "EST_WORK_EFFORT" ) ' Get the value of the Est Work Effort field objField.GetValue nEstWorkEffort ' Check for valid field value. If nEstWorkEffort < 1 Then bFailure = true strErrorMsg = strErrorMsg & "The Est. Work Effort field must be greater than 0." End If ' No shell objItem, if possible display browser error message Else If Ext.ShellHasProp( "redoMessage" ) Then bFailure = true strErrorMsg = strErrorMsg & "Error: No current issue." End If End If ' Set the redoMessage shell variable to the message. ' TeamTrack recognizes anything in this variable as an error and will reject the form and display the message. If bFailure And Ext.ShellHasProp( "redoMessage" ) Then Shell.redoMessage = strErrorMsg End If
'SBM' 카테고리의 다른 글
SBM AppScript Use Cases - 03. Auto-Subtasks for Assessors (0) | 2011.11.22 |
---|---|
SBM AppScript Use Cases - 02. Calculate Work Effort Difference (0) | 2011.10.28 |
Using Web Fonts to SBM (0) | 2011.08.25 |
SBM UI Customizing with jQuery (0) | 2011.08.01 |
Serena Service Manager (0) | 2011.07.18 |
Comments