Highley Recommended, Inc. Logo

NAVIGATIONDDTS MASTER TEMPLATE

CM Home
CM Resources
Getting Started
Config. Spec.
CM Procedures
Scripts
Triggers
CM Plan
ClearCase Best Practices
Merging
ClearCase FAQ

Master Template Customizations

Okay, I will give away a little bit of customizations. This will be fairly long, but illustrate several ways we have made customizations to the DDTs product.

Below are several fragments of a heavily modified master template file, comments in "*" have added here for additional clarity.

*********************************************************************
* Begin clause area use to restrict whom can do what at             *
* different PR states.                                              *
*********************************************************************
Begin:          unset Begin
                set Filter-path /usr/bin:/bin:/usr/ucb
                set Oneof-path  class/$Class/oneofs
                set Help-path   class/$Class/helps

                if equals $OPERATION n     # mail notification?
                    set OPERATION v        # yes, pretend viewing,
                    set Do-enclosures Y    # but also show enclosures,
                    set Putmail Y          # and process mail.
                elif equals $OPERATION l   # dumpbug w/enclosures?
                    set OPERATION v        # yes, pretend viewing,
                    set Do-enclosures Y    # but also show enclosures,
                    set Putmail N          # ...with no mail processing
                else
                    set Do-enclosures N    # don't show enclosures
                fi

*********************************************************************
*  Start of modifications                                           *
*********************************************************************
# The following logic is a restrict assignment of PR to project
# manager.  Order of the restrictions matters.
                if match $OPERATION p
                    whoami
                    if match $STATE A
                    and not oneof -d $~/projects/$Project/proj.control Proj-mgrs
                        >2 echo "Only project manager can assign PR"
                        abort
                    fi
                    unset Begin
                fi

# The following logic is a customization to restrict the modification of
# problem reports to the person that submitted the report.
                if match $STATE$OPERATION Np Nm
                    whoami
                    if not equals $Submitter-id
                    and not oneof -d $~/projects/$Project/proj.control Proj-mgrs
                        >2 echo "Only submitter can modify"
                        abort
                    fi
                    unset Begin
                fi

# The following logic is a customization to restrict the modification of
# assigned problem reports to the engineer that the report is assigned
# to.
                if match $STATE$OPERATION Op Om Rp Rm Ap Am
                    whoami
                    if not equals $Engineer
                    and not oneof -d $~/projects/$Project/proj.control Proj-mgrs
                        >2 echo "Only assigned engineer can modify"
                        abort
                    fi
                    unset Begin
                fi

*********************************************************************
*  End of State Level Restrictions, below shows varying help files  *
*  by project.  An example would be to have keywords listed in the  *
*  one line header help file so that you can request help and select*
*  the keyword by double clicking on it and then paste it into the  *
*  header line when you exit the help.  You can then sort on the    *
*  keywords.                                                        *
*********************************************************************

Version:        if match $OPERATION v m
                            "\(1,45)Version: %-8.8s"
                        elif match $STATE$OPERATION Sp Sf
                            "\(1,45)Version: %-8.8s"
                        fi
                        if match $OPERATION p m   # "if input" would work, too
                            if equals $Project CCS
                                        oneof -f version.CCS
                                        help version.H
                                elif equals $Project CTUsoftware
                                        oneof -f version.CTU
                                        help version.H
                                elif equals $Project limbo
                                        oneof -f version.limbo
                                        help version.H
                                elif equals $Project ZTBIsoftware
                                        oneof -f version.ZTBI
                                        help version.H
                                elif equals $Project STBsoftware
                                        oneof -f version.STB
                                        help version.H
                                elif equals $Project Documentation
                                        help version.H
                                else 
                                        help version.H
                                oneof -f version
                            fi
                                required
                        fi


*********************************************************************
*  The example below shows an example where is field is skipped over*
*  if the person is not a member of the PR Review Committee.        *
*********************************************************************

Dummy-field:            if match $OPERATION p m
                            unset PRRC-review-date:
                            whoami
                            if not oneof -f PRRC_list
                                goto Submitter-name
                            fi
                        fi

PRRC-review-date:       if match $OPERATION v m
                        or match $OPERATION Op Of
                            "\(12,0)PRRC Review Date:  %6.6s"
                        fi

Submitter-name:         if equals $STATE$OPERATION Sp
                            set Status S
                        fi
                        if null
                            myname
                        fi
                        if match $OPERATION v m
                        or null
                            "\n\(15,0)\[us]SUBMITTER INFORMATION\[ue]"
                            "\(16,1)Submitter:     %-22.22s"
                            if match $OPERATION p m
                                help submitter.H
                                required
                            fi
                        fi

*********************************************************************
*  End of master template examples                                  *
*********************************************************************