Esri / solution.js

TypeScript wrappers running in Node.js and modern browsers for transferring ArcGIS Online items from one organization to another.
https://esri.github.io/solution.js/
Apache License 2.0
39 stars 12 forks source link

Add Form type #41

Closed MikeTschudi closed 4 years ago

MikeTschudi commented 5 years ago

@chris-fox:

@MikeTschudi, for reference, you can find and set the associated feature service of a Survey123 form by querying or creating a relationship of type Survey2Service to the feature service.

https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm

@MikeTschudi, @jmhauck, for this issue I think for the first release we can support the simplest case. the form itself is just a zip, the form item has a Survey2Service relationship with its associated feature service. We use the relationship to discover the service (dependency). Cloning the survey is just copying the form and adding a new Survey2Service relationship to the new feature service.

There are more complicated scenarios, but I think we can control for this in the Solutions we author for the first release.

MikeTschudi commented 5 years ago
shoe913 commented 4 years ago

@MikeTschudi @chris-fox

Testing this, everything looks fine. Just one quick question about the following scenario.

If Solution A is deployed, and then Solution B is deployed, a single feature service should be created and share by both solutions, correct?

Currently, Solution A and Solution B both get their own version of the feature service. This is not the behavior I expected. I was anticipating one version of the feature service which is shared by the two solutions.

Solution C works as I would expect and a single feature service is shared by both surveys.

chris-fox commented 4 years ago

@shoe913, did you test this with Ryan's app or the Deploy Solutions test app? Ryan's app is the only one that has the reuse logic enabled so you need to use that to see the behavior your describe.

shoe913 commented 4 years ago

Cool, that is what I wanted verification on. I'll test in Ryan's app to verify that behavior.

Thanks!

shoe913 commented 4 years ago

Ryan's App did the trick, this looks good to me.

shoe913 commented 4 years ago

@MikeTschudi @chris-fox

Further testing revealed some issues with forms. It looks like they are being added as part of the template or as a dependency. Both tests use the default sample form. They copy app doesn't seem to read the form and deploying also fails.

When making both of the templates below, I shared the form to the group used to create the solution template.

Template added Manually: https://localdeployment.maps.arcgis.com/home/item.html?id=4a52e9e465084329a769bd78c1d30ec6

Template read as Dependency: https://arcgis4localgov2.maps.arcgis.com/home/item.html?id=7faeba4455f74bb99b380082e8dc739c

Looks a little fishy to me that the two items are not consistent. I'm guessing this is at play when actually deploying the templates.

shoe913 commented 4 years ago

On further inspection, everything looks good.