Closed smult closed 4 years ago
Har opplevd det samme, Oppdaget da at arkivuttrekk.xml opererte med andre periodedatoer enn det som var registrert i de øvrige filene. Dersom dette er årsaken, bør det opplyses i rapporten.
Det er lagt inn feilmelding til utviklerne.
See the following code in Arkivverket.Arkade.Core/Testing/Noark5/N5_60_ArchiveStartAndEndDateControl.cs
:
if (_periodSeparationIsSharp && !StartAndEndDate.Equals(archiveDates,
publicJournalDates, runningJournalDates))
testResults.Add(new TestResult(ResultType.Error, new Location(""),
Noark5Messages.ArchiveStartAndEndDateControlMessage_UnEqualJournalAndArchiveDates));
private class StartAndEndDate
{
private DateTime _startDate;
private DateTime _endDate;
private readonly string _dateFormat;
public StartAndEndDate(DateTime startDate, DateTime endDate)
{
_startDate = startDate.Date;
_endDate = endDate.Date;
_dateFormat = "dd.MM.yyyy";
}
public string StartDate()
{
return _startDate.ToString(_dateFormat);
}
public string EndDate()
{
return _endDate.ToString(_dateFormat);
}
public bool Equals(StartAndEndDate startAndEndDate)
{
return startAndEndDate._startDate.Equals(_startDate)
&& startAndEndDate._endDate.Equals(_endDate);
}
public static bool Equals(params StartAndEndDate[] startAndEndDates)
{
return startAndEndDates.All(s => s.Equals(startAndEndDates.First()));
}
}
The Equals
methods in the StartAndEndDate
class will hardly ever return true
because they try to compare a date with a time element (in this case opprettetDato which is defined as xs:dateTime in metadatakatalog.xsd) to a date without a time element (in this case journaldato which is defined as xs:date in metadatakatalog.xsd). See also https://github.com/arkivverket/arkade5/issues/112 for the reasoning why the above code should only use journaldato.
It appears that this issue has been fixed with https://github.com/arkivverket/arkade5/commit/65c63ffdcf62cba1252c05a8fc9f9daffbee428c. Can someone please confirm?
Version 1.5.1 uses "journaldato", not "opprettetDato". The new datatype is date, same as "journalStartDato" and "journalSluttDato" from the journals.
Changes in release 1.5.1:
• Noark 5 tests o N5.60: Start and end date control is now performed using the field journaldato (not opprettetDato). o N5.60: Situation with no registrations / registration dates are now handled and written to report. o N5.10: Folders without a specific type are now counted and included in report. o N5.16: Registrations without a specific type are now counted and included in report. o N5.16: The term Registertype is corrected to Registreringstype. o + some minor internal system improvements.
Comment: An upgrade of .Net (and possibly reboot) may be necessary.
Får følgende i rapporten som "feil" på flere uttrekk:
For meg ser disse datoene like ut.. men Arkade melder dem som forskjellige? Hva skjer?