CC Export Tool - DET Files - "closed_on" property reference seems wrong

Hi,

I was trying to make the "closed_on" property available to an external database through the CC Export Tool.

I generated the DET file (feature flag). The generated file references that property as properties.closed_on. It didn't work.

I found this page on the wiki that references the field as date_closed. This version worked fine.

FYI, I am using a self hosted instance of CCHQ which latest deploy diff points to this commit (in case this has been fixed).

Cheers,

#it4life

Hi Guillame,
There is a new page that you can reference, that highlights the different names for these properties. Metadata Glossary - CommCare Public - CommCare Public

We have made some updates to the way DET query files are generated so I don't know if the issue is that you are self-hosted. I will flag this to make sure that it's correct in the query file. Are there any other properties that you would want included in this query file by default?

Hi Guillaume

Using date_closed is correct. For legacy reasons the case API remaps some case properties to different names. If you're in doubt you can always query the Case API and look at the JSON data that's returned. This is the same data that the export tool is using.

Thanks both for the tips. Querying the Case API straight forward so I'll be using this going forward.

I don't think there is a need to add additional fields by default since the user can decide what to add the case export already, and I feel it's better to keep the exported data to what is needed only.

Cheers,

Thanks for reporting this @guillaume ! I've proposed a fix for the schema generation here: use correct path to date closed property in DET configs by czue · Pull Request #29101 · dimagi/commcare-hq · GitHub