1. What is the problem? Be very detailed.
Sometimes when i send forms, aggregate accepts the form and return to ODK Collect a correct respond but if i see the BD fields "_IS_COMPLETE" and "_MARKED_AS_COMPLETE_DATE" the are false and null respectively.
this forms are marked how finalized in odk collect
2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Collect 1.25.1
Aggregate 2.0.5
3. What you have you tried to fix the problem?
for identified the problem in multiple forms i used this code
DO $$
DECLARE a_table RECORD;
DECLARE a_row RECORD;
BEGIN
FOR a_table IN SELECT DISTINCT("PERSIST_AS_TABLE_NAME") as tb FROM _form_data_model WHERE "PERSIST_AS_TABLE_NAME" LIKE '%_CORE' LOOP
FOR a_row in EXECUTE format('SELECT "_IS_COMPLETE", "_MARKED_AS_COMPLETE_DATE", COUNT(*) as c FROM %I WHERE "_IS_COMPLETE" = false GROUP BY "_IS_COMPLETE", "_MARKED_AS_COMPLETE_DATE"', a_table.tb) LOOP
RAISE NOTICE '% - %', a_table.tb, a_row.c;
END LOOP;
END LOOP;
END; $$
resend the form dont work, for fix this error i use this code
BEGIN;
UPDATE "A_TABLE_CORE" SET "_IS_COMPLETE" = true, "_MARKED_AS_COMPLETE_DATE" = "GP_END" WHERE "_IS_COMPLETE" = false;
SELECT "_IS_COMPLETE", "_MARKED_AS_COMPLETE_DATE", COUNT(*) as c FROM "A_TABLE_V4_CORE" WHERE "_IS_COMPLETE" = false GROUP BY "_IS_COMPLETE", "_MARKED_AS_COMPLETE_DATE";
ROLLBACK;