Skip to content

Upload to handle ptf_variable.id field to allow clean matching #69

@tomlatter

Description

@tomlatter

Current rule in parser (pre-save), for SOT theme:
if existing UNCLOSED PTF_VARIABLE MEASURING SAME VARIABLE (existing ptf_variable with end_date is null)
then:

  1. IF DIFFERENT SENSOR MODEL OR SAME MODEL BUT SERIALS DIFFERENT -> AUTO-CLOSE PREVIOUS AND ADD NEW (CLOSES EXISTING PTF_VARIABLE ON THE NEW START_DATE OR CURRENT_DATE IF NO START_DATE PROVIDED)
  2. IF SAME MODEL WITH SAME SERIALS OR BOTH SERIALS NOT PROVIDED -> UPDATE PREVIOUS, DON'T ADD NEW (CANCELS ADDING NEW PTF_VARIABLE AND INSTEAD UPDATE EXISTING WITH ANY VALUES THAT ARE CURRENTLY EMPTY - DOESN'T UPDATE WIH NULL VALUES)

Proposal, same rules for all networks, no automatic deleting or closing:

  • remove all automatic closing
  • include a new 1-2 character short_code for each sensor setup, unique within ptf
  • allow operators to generate this short_code if they are creating new sensor setup
  • for updates of sensor setups, operators need to provide id or shortCode of the sensor setup
  • matching only done on id or shortCode
  • do not automatically delete existing ptf_variables, and potentially never delete

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions