| Line 163... |
Line 163... |
| 163 |
}
|
163 |
}
|
| 164 |
}
|
164 |
}
|
| 165 |
}
|
165 |
}
|
| 166 |
}
|
166 |
}
|
| 167 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
167 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 168 |
else if (parameters[1].StartsWith("Name"))
|
168 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_NAME))
|
| 169 |
{
|
169 |
{
|
| 170 |
Main.WriteOutput(" Modified Name: " + ea_req.Name, ea_req.ElementID );
|
170 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_NAME, ea_req.Name), ea_req.ElementID );
|
| 171 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
171 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 172 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
172 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 173 |
}
|
173 |
}
|
| 174 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
174 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 175 |
else if (parameters[1].StartsWith("Notes"))
|
175 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_NOTES)) // aka Description of the requirement
|
| 176 |
{
|
176 |
{
|
| 177 |
Main.WriteOutput(" Modified Description: " + ea_req.Name, ea_req.ElementID );
|
177 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", "Description", ea_req.Name), ea_req.ElementID );
|
| 178 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
178 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 179 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
179 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 180 |
}
|
180 |
}
|
| 181 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
181 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 182 |
else if (parameters[1].StartsWith("Difficulty"))
|
182 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_DIFFICULTY))
|
| 183 |
{
|
183 |
{
|
| 184 |
Main.WriteOutput(" Modified Difficulty: " + ea_req.Name, ea_req.ElementID );
|
184 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_DIFFICULTY, ea_req.Name), ea_req.ElementID );
|
| 185 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
185 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 186 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
186 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 187 |
}
|
187 |
}
|
| 188 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
188 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 189 |
else if (parameters[1].StartsWith("Priority"))
|
189 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_PRIORITY))
|
| 190 |
{
|
190 |
{
|
| 191 |
Main.WriteOutput(" Modified Priority: " + ea_req.Name, ea_req.ElementID );
|
191 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_PRIORITY, ea_req.Name), ea_req.ElementID );
|
| 192 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
192 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 193 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
193 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 194 |
}
|
194 |
}
|
| 195 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
195 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 196 |
else if (parameters[1].StartsWith("Version"))
|
196 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_VERSION))
|
| 197 |
{
|
197 |
{
|
| 198 |
Main.WriteOutput(" Modified Version: " + ea_req.Name, ea_req.ElementID );
|
198 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_VERSION, ea_req.Name), ea_req.ElementID );
|
| 199 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
199 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 200 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
200 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 201 |
}
|
201 |
}
|
| 202 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
202 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 203 |
else if (parameters[1].StartsWith("Status"))
|
203 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_STATUS))
|
| 204 |
{
|
204 |
{
|
| 205 |
Main.WriteOutput(" Modified Status: " + ea_req.Name, ea_req.ElementID );
|
205 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_STATUS, ea_req.Name), ea_req.ElementID );
|
| 206 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
206 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 207 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
207 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 208 |
}
|
208 |
}
|
| 209 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
209 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 210 |
else if (parameters[1].StartsWith("Subsystem"))
|
210 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_SUBSYSTEM_TYPE))
|
| 211 |
{
|
211 |
{
|
| 212 |
Main.WriteOutput(" Modified Subsystem: " + ea_req.Name, ea_req.ElementID );
|
212 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_SUBSYSTEM_TYPE, ea_req.Name), ea_req.ElementID );
|
| 213 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
213 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 214 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
214 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 215 |
}
|
215 |
}
|
| 216 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
216 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 217 |
else if (parameters[1].StartsWith("Stability"))
|
217 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_STABILITY))
|
| 218 |
{
|
218 |
{
|
| 219 |
Main.WriteOutput(" Modified Stability: " + ea_req.Name, ea_req.ElementID );
|
219 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_STABILITY, ea_req.Name), ea_req.ElementID );
|
| 220 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
220 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 221 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
221 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 222 |
}
|
222 |
}
|
| 223 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
223 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 224 |
else if (parameters[1].StartsWith("ReqType"))
|
224 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_REQ_TYPE))
|
| 225 |
{
|
225 |
{
|
| 226 |
Main.WriteOutput(" Modified Type: " + ea_req.Name, ea_req.ElementID );
|
226 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_REQ_TYPE, ea_req.Name), ea_req.ElementID );
|
| 227 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
227 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 228 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
228 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 229 |
}
|
229 |
}
|
| 230 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
230 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 231 |
else if (parameters[1].StartsWith("SourceVersion"))
|
231 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_SOURCE_VERSION))
|
| 232 |
{
|
232 |
{
|
| 233 |
Main.WriteOutput(" Modified Type: " + ea_req.Name, ea_req.ElementID );
|
233 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_SOURCE_VERSION, ea_req.Name), ea_req.ElementID );
|
| 234 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
234 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 235 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
235 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 236 |
}
|
236 |
}
|
| 237 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
237 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 238 |
else if (parameters[1].StartsWith("SourceSection"))
|
238 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_SOURCE_SECTION))
|
| 239 |
{
|
239 |
{
|
| 240 |
Main.WriteOutput(" Modified Type: " + ea_req.Name, ea_req.ElementID );
|
240 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_SOURCE_SECTION, ea_req.Name), ea_req.ElementID );
|
| 241 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
241 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 242 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
242 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 243 |
}
|
243 |
}
|
| 244 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
244 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 245 |
else if (parameters[1].StartsWith("Source"))
|
245 |
else if (parameters[1].StartsWith(Constants.CHG_LOG_SOURCE))
|
| 246 |
{
|
246 |
{
|
| 247 |
Main.WriteOutput(" Modified Type: " + ea_req.Name, ea_req.ElementID );
|
247 |
Main.WriteOutput(string.Format(" Modified {0}: {1}", Constants.CHG_LOG_SOURCE, ea_req.Name), ea_req.ElementID );
|
| 248 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
248 |
Main.WriteOutput(" <<< " + parameters[2], ea_req.ElementID);
|
| 249 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
249 |
Main.WriteOutput(" >>> " + parameters[3], ea_req.ElementID);
|
| 250 |
}
|
250 |
}
|
| 251 |
|
251 |
|
| 252 |
// accumulate good item into the newList
|
252 |
// accumulate good item into the newList
|
| Line 409... |
Line 409... |
| 409 |
|
409 |
|
| 410 |
string ea_req_name = rq_obj.tag + " " + rq_obj.name;
|
410 |
string ea_req_name = rq_obj.tag + " " + rq_obj.name;
|
| 411 |
|
411 |
|
| 412 |
Main.WriteOutput("Updating: " + ea_req_name, rq_obj.ea_element_ID);
|
412 |
Main.WriteOutput("Updating: " + ea_req_name, rq_obj.ea_element_ID);
|
| 413 |
|
413 |
|
| 414 |
ea_req.Name = updated_property_value_if_changed(changeLog, ea_req, ea_req.Name, "Name", ea_req_name, ref meaningMayHaveChanged);
|
414 |
ea_req.Name = updated_property_value_if_changed(changeLog, ea_req, ea_req.Name, Constants.CHG_LOG_NAME, ea_req_name, ref meaningMayHaveChanged);
|
| 415 |
|
415 |
|
| 416 |
ea_req.Notes = updated_property_value_if_changed(changeLog, ea_req, ea_req.Notes, "Notes", rq_obj.text, ref meaningMayHaveChanged);
|
416 |
ea_req.Notes = updated_property_value_if_changed(changeLog, ea_req, ea_req.Notes, Constants.CHG_LOG_NOTES, rq_obj.text, ref meaningMayHaveChanged);
|
| 417 |
|
417 |
|
| 418 |
ea_req.Difficulty = updated_property_value_if_changed(changeLog, ea_req, ea_req.Difficulty, "Difficulty", rq_obj.difficulty, ref statusMayHaveChanged);
|
418 |
ea_req.Difficulty = updated_property_value_if_changed(changeLog, ea_req, ea_req.Difficulty, Constants.CHG_LOG_DIFFICULTY, rq_obj.difficulty, ref statusMayHaveChanged);
|
| 419 |
|
419 |
|
| 420 |
ea_req.Priority = updated_property_value_if_changed(changeLog, ea_req, ea_req.Priority, "Priority", rq_obj.priority, ref statusMayHaveChanged);
|
420 |
ea_req.Priority = updated_property_value_if_changed(changeLog, ea_req, ea_req.Priority, Constants.CHG_LOG_PRIORITY, rq_obj.priority, ref statusMayHaveChanged);
|
| 421 |
|
421 |
|
| 422 |
ea_req.Status = updated_property_value_if_changed(changeLog, ea_req, ea_req.Status, "Status", rq_obj.status, ref statusMayHaveChanged);
|
422 |
ea_req.Status = updated_property_value_if_changed(changeLog, ea_req, ea_req.Status, Constants.CHG_LOG_STATUS, rq_obj.status, ref statusMayHaveChanged);
|
| 423 |
|
423 |
|
| 424 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SOURCE, "Source", rq_obj.source, ref statusMayHaveChanged);
|
424 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SOURCE, Constants.CHG_LOG_SOURCE, rq_obj.source, ref statusMayHaveChanged);
|
| 425 |
|
425 |
|
| 426 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SOURCE_VERSION, "SourceVersion", rq_obj.sourceVersion, ref statusMayHaveChanged);
|
426 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SOURCE_VERSION, Constants.CHG_LOG_SOURCE_VERSION, rq_obj.sourceVersion, ref statusMayHaveChanged);
|
| 427 |
|
427 |
|
| 428 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SOURCE_SECTION, "SourceSection", rq_obj.sourceSection, ref statusMayHaveChanged);
|
428 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SOURCE_SECTION, Constants.CHG_LOG_SOURCE_SECTION, rq_obj.sourceSection, ref statusMayHaveChanged);
|
| 429 |
|
429 |
|
| 430 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SUBSYSTEM, "Subsystem", rq_obj.subsystem, ref statusMayHaveChanged);
|
430 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_SUBSYSTEM, Constants.CHG_LOG_SUBSYSTEM_TYPE, rq_obj.subsystem, ref statusMayHaveChanged);
|
| 431 |
|
431 |
|
| 432 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_STABILITY, "Stability", rq_obj.stability, ref statusMayHaveChanged);
|
432 |
if_tagged_value_changed_update_it(changeLog, ea_req, Constants.TAG_STABILITY, Constants.CHG_LOG_STABILITY, rq_obj.stability, ref statusMayHaveChanged);
|
| 433 |
|
433 |
|
| 434 |
// Requirement Types are actually implemented using ordinary EA element stereotypes.
|
434 |
// Requirement Types are actually implemented using ordinary EA element stereotypes.
|
| 435 |
if (!ea_req.Stereotype.Equals(rq_obj.type))
|
435 |
string[] sar = ea_req.StereotypeEx.Split(",".ToCharArray());
|
| - |
|
436 |
if (sar.Length > 0)
|
| 436 |
{
|
437 |
{
|
| - |
|
438 |
// The first item in the stereotype list is the one on display in the EA element properties and so is the one the user
|
| - |
|
439 |
// thinks is assigned to the requirement element, so check against that for changes
|
| - |
|
440 |
string sar0 = sar[0].Trim();
|
| - |
|
441 |
|
| - |
|
442 |
if (!sar0.Equals(rq_obj.type))
|
| - |
|
443 |
{
|
| - |
|
444 |
changeLog.Notes += ea_req.ElementGUID + ":" + Constants.CHG_LOG_REQ_TYPE + ":" + sar0 + ":" + rq_obj.type + "\r\n";
|
| - |
|
445 |
changeLog.Update();
|
| - |
|
446 |
statusMayHaveChanged = true;
|
| - |
|
447 |
ea_req.StereotypeEx = rq_obj.type;
|
| - |
|
448 |
ea_req.Stereotype = rq_obj.type;
|
| - |
|
449 |
}
|
| - |
|
450 |
}
|
| - |
|
451 |
else if (!ea_req.Stereotype.Equals(rq_obj.type))
|
| - |
|
452 |
{
|
| 437 |
changeLog.Notes += ea_req.ElementGUID + ":ReqType:" + ea_req.Stereotype + ":" + rq_obj.type + "\r\n";
|
453 |
changeLog.Notes += ea_req.ElementGUID + ":" + Constants.CHG_LOG_REQ_TYPE + ":" + ea_req.Stereotype + ":" + rq_obj.type + "\r\n";
|
| 438 |
changeLog.Update();
|
454 |
changeLog.Update();
|
| 439 |
statusMayHaveChanged = true;
|
455 |
statusMayHaveChanged = true;
|
| 440 |
ea_req.StereotypeEx = rq_obj.type;
|
456 |
ea_req.StereotypeEx = rq_obj.type;
|
| 441 |
ea_req.Stereotype = rq_obj.type;
|
457 |
ea_req.Stereotype = rq_obj.type;
|
| 442 |
}
|
458 |
}
|