Open ggalmazor opened 6 years ago
The expected behavior is clear for everything but the GUI. I'm not even sure we should enable this on the GUI, but I'd be interested to hear how you think it should work.
I think we could add a new checkbox to enable "force-pushing" on the form to configure an Aggregate server as the push target with a text that explains that we won't send a blank form unless we don't find it there (we need to explain that anyway).
I've updated the issue description to warn about its relation to the ongoing PR #405. It would be better to wait for that PR to be merged before starting to work on the UI part of this issue.
Oh, and to check if Aggregate has the form, you'll have to do something like this:
curl --silent "X-OpenRosa-Version:1.0" https://opendatakit.appspot.com/formList 2>&1 | awk -F "=|\"" '{print $4}'
But you know, in Java.
What’s the command line syntax to do a push?
The syntax would be --push_aggregate
or -psha
and some required and optional args:
Params for -psha operation:
-id,--form_id <arg> Form ID
-p,--odk_password <arg> ODK Password
-sd,--storage_directory <arg> Briefcase storage directory
-u,--odk_username <arg> ODK Username
-url,--aggregate_url <arg> Aggregate server URL
Optional params for -psha operation:
-fsb,--force_send_blank Force sending the blank form to the Aggregate instance
--push_aggregate --form_id All%20widgets --storage_directory /tmp/ODK%20Briefcase%20Storage
2018-05-16 09:39:40,897 [main] ERROR o.o.a.p.BaseFormParserForJavaRosa - Launch Failed: Unrecognized option: --push_aggregate
Hi Dave! It's running OK for me. Some thoughts:
org.opendatakit.briefcase.Launcher
class (that's the main class in the JAR manifest).I'm trying these args and they're working:
-sd /home/guillermo -url https://aggregatetest-184307.appspot.com -u administrator -p aggregate -id all-widgets --push_aggregate -fp
I got this working by passing the arguments via Gradle:
run {
if (project.hasProperty("appArgs")) {
args Eval.me(appArgs)
}
}
-PappArgs="['--push_aggregate', '-id', 'all-widgets', '-sd', '/tmp', '-p', '', '-u', '', '-url', 'http://localhost:8080']"
This issue is related to #420
It is also related with work in progress PR #405 which will improve the UI components that let the user choose source/targets for their pull/push operations.
Software versions
Briefcase v1.10.0
Problem description
Pushing forms to Aggregate always sends a blank form, which can be a waste of time and bandwidth with forms with media file attachments.
Expected behavior
[ ] If a user needs to send it anyway (maybe because there is a newer version of it), Briefcase should provide means to force send it:
We could change the Push tab's top component, which lets the user define the Aggregate server settings for the push operation.
We could add a new optional
-fsb
--force_send_blank
flag (an arg without a value) for this.