Subversion Repositories DevTools

Rev

Rev 2159 | Rev 2163 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2159 Rev 2161
Line 1078... Line 1078...
1078
            ref hasSource, ref hasSourceVersion, ref hasSourceSection,
1078
            ref hasSource, ref hasSourceVersion, ref hasSourceSection,
1079
            ref hasSubsystem, ref hasStability, ref hasType))
1079
            ref hasSubsystem, ref hasStability, ref hasType))
1080
         {
1080
         {
1081
            if (hasStatus)
1081
            if (hasStatus)
1082
            {
1082
            {
1083
               setListItemAttrValue(rp_req, ea_req, "Status", ea_req.Status, rp_req_tag);
1083
               setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_STATUS, ea_req.Status, rp_req_tag);
1084
            }
1084
            }
1085
            if (hasDifficulty)
1085
            if (hasDifficulty)
1086
            {
1086
            {
1087
               setListItemAttrValue(rp_req, ea_req, "Difficulty", ea_req.Difficulty, rp_req_tag);
1087
               setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_DIFFICULTY, ea_req.Difficulty, rp_req_tag);
1088
            }
1088
            }
1089
            if (hasPriority)
1089
            if (hasPriority)
1090
            {
1090
            {
1091
               setListItemAttrValue(rp_req, ea_req, "Priority", ea_req.Priority, rp_req_tag);
1091
               setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_PRIORITY, ea_req.Priority, rp_req_tag);
1092
            }
1092
            }
1093
            if (hasSource)
1093
            if (hasSource)
1094
            {
1094
            {
1095
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SOURCE);
1095
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SOURCE);
1096
               if (s != null && s.Length > 0)
1096
               if (s != null && s.Length > 0)
1097
               {
1097
               {
1098
                  setListItemAttrValue(rp_req, ea_req, "Source", s, rp_req_tag);
1098
                  setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_SOURCE, s, rp_req_tag);
1099
               }
1099
               }
1100
            }
1100
            }
1101
            if (hasSourceVersion)
1101
            if (hasSourceVersion)
1102
            {
1102
            {
1103
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SOURCE_VERSION);
1103
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SOURCE_VERSION);
1104
               if (s != null && s.Length > 0)
1104
               if (s != null && s.Length > 0)
1105
               {
1105
               {
1106
                  setTextAttrValue(rp_req, ea_req, "Source Version", s, rp_req_tag);
1106
                  setTextAttrValue(rp_req, ea_req, Constants.RP_ATTR_SOURCE_VERSION, s, rp_req_tag);
1107
               }
1107
               }
1108
            }
1108
            }
1109
            if (hasSourceSection)
1109
            if (hasSourceSection)
1110
            {
1110
            {
1111
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SOURCE_SECTION);
1111
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SOURCE_SECTION);
1112
               if (s != null && s.Length > 0)
1112
               if (s != null && s.Length > 0)
1113
               {
1113
               {
1114
                  setTextAttrValue(rp_req, ea_req, "Source Section", s, rp_req_tag);
1114
                  setTextAttrValue(rp_req, ea_req, Constants.RP_ATTR_SOURCE_SECTION, s, rp_req_tag);
1115
               }
1115
               }
1116
            }
1116
            }
1117
            if (hasSubsystem)
1117
            if (hasSubsystem)
1118
            {
1118
            {
1119
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SUBSYSTEM);
1119
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_SUBSYSTEM);
Line 1125... Line 1125...
1125
                  foreach (string sas in sa)
1125
                  foreach (string sas in sa)
1126
                  {
1126
                  {
1127
                     string trimmed_sas = sas.Trim();
1127
                     string trimmed_sas = sas.Trim();
1128
                     if (trimmed_sas.Length > 0)
1128
                     if (trimmed_sas.Length > 0)
1129
                     {
1129
                     {
1130
                        setListItemAttrValue(rp_req, ea_req, "Subsystem", trimmed_sas, rp_req_tag);
1130
                        setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_SUBSYSTEM_TYPE, trimmed_sas, rp_req_tag);
1131
                     }
1131
                     }
1132
                  }
1132
                  }
1133
               }
1133
               }
1134
            }
1134
            }
1135
            if (hasStability)
1135
            if (hasStability)
1136
            {
1136
            {
1137
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_STABILITY);
1137
               string s = EA_TaggedValues.Read(ea_req, Constants.TAG_STABILITY);
1138
               if (s != null && s.Length > 0)
1138
               if (s != null && s.Length > 0)
1139
               {
1139
               {
1140
                  setListItemAttrValue(rp_req, ea_req, "Stability", s, rp_req_tag);
1140
                  setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_STABILITY, s, rp_req_tag);
1141
               }
1141
               }
1142
            }
1142
            }
1143
            if (hasType)
1143
            if (hasType)
1144
            {
1144
            {
1145
               // The StereoTypeEx is a comma seperated list, and the first in the list is usually (always?)
1145
               // The StereoTypeEx is a comma seperated list, and the first in the list is usually (always?)
Line 1148... Line 1148...
1148
               if (ea_req.StereotypeEx != null && ea_req.StereotypeEx.Length > 0)
1148
               if (ea_req.StereotypeEx != null && ea_req.StereotypeEx.Length > 0)
1149
               {
1149
               {
1150
                  string[] s_arr = ea_req.StereotypeEx.Split(",".ToCharArray());
1150
                  string[] s_arr = ea_req.StereotypeEx.Split(",".ToCharArray());
1151
                  if (s_arr[0] != null && s_arr[0].Length > 0)
1151
                  if (s_arr[0] != null && s_arr[0].Length > 0)
1152
                  {
1152
                  {
1153
                     setListItemAttrValue(rp_req, ea_req, "Requirement Type", s_arr[0], rp_req_tag);
1153
                     setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_REQ_TYPE, s_arr[0], rp_req_tag);
1154
                     done = true;
1154
                     done = true;
1155
                  }
1155
                  }
1156
               }
1156
               }
1157
               // if we didnt get anything from StereoTypeEx, then try Stereotype
1157
               // if we didnt get anything from StereoTypeEx, then try Stereotype
1158
               if (!done && ea_req.Stereotype != null && ea_req.Stereotype.Length > 0)
1158
               if (!done && ea_req.Stereotype != null && ea_req.Stereotype.Length > 0)
1159
               {
1159
               {
1160
                  setListItemAttrValue(rp_req, ea_req, "Requirement Type", ea_req.Stereotype, rp_req_tag);
1160
                  setListItemAttrValue(rp_req, ea_req, Constants.RP_ATTR_REQ_TYPE, ea_req.Stereotype, rp_req_tag);
1161
               }
1161
               }
1162
            }
1162
            }
1163
         }
1163
         }
1164
      }
1164
      }
1165
 
1165