B2020-156: When a procedure title is changed, it does not appear in Summary or Chronology of Changes reports

This commit is contained in:
Kathy Ruffing 2021-03-22 14:27:33 +00:00
parent 822c9136d0
commit 56a231bcd2

View File

@ -531,6 +531,17 @@ namespace Volian.Controls.Library
//Console.WriteLine("UpdateHistory: {0} seconds",TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalSeconds);
this.Cursor = Cursors.Default;
}
// B2020-156: If time is at midnight, only check date.
private bool CompareDateOrDateTime(DateTime dt1, DateTime dt2)
{
if (dt1.TimeOfDay == TimeSpan.Zero || dt2.TimeOfDay == TimeSpan.Zero)
{
if (dt1.Date > dt2.Date) return true;
return false;
}
if (dt1 > dt2) return true;
return false;
}
private void WalkProcedure()
{
//return;
@ -567,7 +578,10 @@ namespace Volian.Controls.Library
_AnnotationList = aail2;
foreach (ContentAuditInfo cai in cail2)
{
if (cai.DTS > MyRevDate || cai.ActionWhen > MyRevDate)
// B2020-156: When procedure title is changed, it does not print in Summary/Chronolgy of changes.
// Need to only check the date (not the date/time) for some procedures, the original item was listed
// in the list box and should not be because some MyRevDate's did not have time included.
if (CompareDateOrDateTime(cai.DTS,MyRevDate) || cai.ActionWhen > MyRevDate)
{
string itemTitle = FixPath(cai.Path);
lbChanges.Items.Add(cai);