open-contracting / european-union-support

Support scripts for TED mapping
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

BT-3202-Contract - Contract Tender ID (Reference): guidance duplication #182

Closed odscjen closed 1 year ago

odscjen commented 1 year ago

The guidance for BT-3202-Contract is long but I think there's an unnecessary duplication within it. The current guidance is:

  • Get the contract for the SettledContract and add the value of this field to its .relatedBids array.
  • Get the ancestor::efac:NoticeResult/efac:LotTender whose /cbc:ID is equal to the value of this field.
  • Get the ancestor::efac:NoticeResult/efac:TenderingParty whose /cbc:ID matches the LotTender's /efac:TenderingParty/cbc:ID.
  • For each ancestor::efac:TenderingParty/efac:Tenderer, get the organization for the tenderer, and:
  • Get the ancestor::efext:EformsExtension/efac:Organizations/efac:Organization/efac:Company whose /cac:PartyIdentification/cbc:ID is equal to the organization's .id, and:
  • Add 'supplier' to the organization's .roles array.
  • For each ancestor::efac:NoticeResult/efac:LotResult with an /efac:SettledContract/cbc:ID equal to the value of ancestor::efac:SettledContract/cbc:ID:
  • Get the award for the LotResult.
  • Add an OrganizationReference to the award's .suppliers array, and:
  • Set the organization reference's .id to the organization's .id.

The duplication is in these two lines:

For each ancestor::efac:TenderingParty/efac:Tenderer, get the organization for the tenderer, and:

  • Get the ancestor::efext:EformsExtension/efac:Organizations/efac:Organization/efac:Company whose /cac:PartyIdentification/cbc:ID is equal to the organization's .id,

both lead you to the same organization in parties. I think we can just remove the second part so the guidance will become:

  • Get the contract for the SettledContract and add the value of this field to its .relatedBids array.
  • Get the ancestor::efac:NoticeResult/efac:LotTender whose /cbc:ID is equal to the value of this field.
  • Get the ancestor::efac:NoticeResult/efac:TenderingParty whose /cbc:ID matches the LotTender's /efac:TenderingParty/cbc:ID.
  • For each ancestor::efac:TenderingParty/efac:Tenderer, get the organization for the tenderer, and:
  • Add 'supplier' to the organization's .roles array.
  • For each ancestor::efac:NoticeResult/efac:LotResult with an /efac:SettledContract/cbc:ID equal to the value of ancestor::efac:SettledContract/cbc:ID:
  • Get the award for the LotResult.
  • Add an OrganizationReference to the award's .suppliers array, and:
  • Set the organization reference's .id to the organization's .id.

which is slightly friendlier!

duncandewhurst commented 1 year ago

Sounds good. I can't see what purpose the second part was serving.

odscjen commented 1 year ago

updated guidance.yaml accordingly