Skip to content

AuditTrail of LogisticsObject with revision=1 contains no ChangeRequests

Currently, if the revision of a LogisticsObject is 1, i.e. no ChangeRequest was accepted yet, the /audit-trail of the LogisticsObject only contains hasLatestRevision property, because

if(rev <= 1) {
            var c1 = varAuditTrail.isA(API.AuditTrail)
                .andHas(API.hasLatestRevision, latestRevision);

            construct = construct.where(c1);
        } else {

https://git.openlogisticsfoundation.org/wg-digitalaircargo/ne-one/-/blob/318b84cf4c50e0f937da500f43aa14e7af6d5d4d/src/main/java/org/openlogisticsfoundation/neone/repository/AuditTrailRepository.java#L127

However, if ChangeRequests for a given LogisticsObject exist - even if the ChangeRequest have not yet been accepted - they should be included in the AuditTrail.

cf. Every time a Logistics Object is requested to be updated as described in the previous section, the details of this request are added to an AuditTrail of a Logistics Object. (https://iata-cargo.github.io/ONE-Record/logistics-objects/#get-audit-trail-of-a-logistics-object)