Esri / workforce-scripts

A set of scripts to help administer Workforce projects.
Apache License 2.0
79 stars 64 forks source link

create_assignments_from_csv fails in ArcGIS Enterprise. #11

Closed hmelendez closed 6 years ago

hmelendez commented 7 years ago

I'm migrating my workforce to ArcGIS Enterprise and the workforce hosted feature layer schema in portal gets created with all atrubutes names in small caps (assignmentType || assignmenttype). So the script is not matching and loading the csv fields correctly. The assignments get created but the fallowing fields are not been populated:

image image

crai3162 commented 7 years ago

Hi @hmelendez we're aware of this and working to update the scripts now that Workforce supports Enterprise 10.5.1.

apulverizer commented 6 years ago

@hmelendez I added a few commits which should add portal support for all scripts, if using the Python API. Let me know if this does not resolve your issue.

ming800 commented 6 years ago

Hi Aaron,

I noticed that the attachments of assignment can be imported to WF in your Create Assignment scripts. Can the attachments of assignment be downloaded when export assignments to desktop? I heard that WF is going to add the function to allow workers to ass attachments in the field. Download attachments into a local folder and add the filepath to the each assignment will be great!

Enjoyed your scripts and thanks,

Ming

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Aaron Pulvermailto:notifications@github.com Sent: Wednesday, September 20, 2017 11:32 AM To: Esri/workforce-scriptsmailto:workforce-scripts@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: Re: [Esri/workforce-scripts] create_assignments_from_csv fails in ArcGIS Enterprise. (#11)

@hmelendezhttps://github.com/hmelendez I added a few commits which should add portal support for all scripts, if using the Python API. Let me know if this does not resolve your issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Esri/workforce-scripts/issues/11#issuecomment-330889536, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWeMAchthHuauUGIbKXgcu0qcnd7Sb7rks5skS_lgaJpZM4Ofmw3.

apulverizer commented 6 years ago

@ming800

I think this is something we could look into. So just to be clear, you'd like to download a CSV file and have one of the columns be the attachment files that were downloaded. And then download the attachments to a specific folder.

ming800 commented 6 years ago

Hi Aaron,

Sorry for the delay of reply, it is that season!

Yes, we like to be able to download attachments along with the completed assignments for archive and analysis purposes. The attachments are preferred to store in a separate folder instead of stored as blob in ….__ATTACH table.

In fact, we need to do this very often. We have a number the active WF projects in AGOL. Some of them created in Dispatcher, others created in 3rd party app and synced to WF project. We also archive all of them in local FGDB for historical records, as well as for system analysis (water utility) of the Assets Management process. The key step in the workflow is that every a while (monthly for now), manager will review the assignments in WF projects. Identify those completed assignments in last month, sync them into a master assignment Featureclass in local FGDB. Then remove these assignment from active WF projects.

Your python scripts provided a mean to do this. However, it is still not very intuitive for non-programmers. I actually using Win Form created a GUI APP for user to created batch assignments, sync/download completed assignments, and remove synced old assignments from active WF projects. Your scripts provided me the inspirations and approaches!

Speaking the attachments, I found that I can identify the url of each attachment and download them one-by-one. However, the my approach is the followings: 1. Created a replica for selected assignments; 2. Download the replica as SQLite; Extract the SQLite db to Master FGDB (assignments), extract the blob to local folder and pass the infos (path, name, format, etc.) to a related table in FGDB.

If you have any suggestions, please do not hesitate to share with me!

Thanks,

Ming

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: Aaron Pulver notifications@github.com Sent: Tuesday, November 21, 2017 3:23:27 PM To: Esri/workforce-scripts Cc: ming800; Mention Subject: Re: [Esri/workforce-scripts] create_assignments_from_csv fails in ArcGIS Enterprise. (#11)

@ming800https://github.com/ming800

I think this is something we could look into. So just to be clear, you'd like to download a CSV file and have one of the columns be the attachment files that were downloaded. And then download the attachments to a specific folder.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Esri/workforce-scripts/issues/11#issuecomment-346149676, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWeMAQ3HSwxseaVQgehAM_ogQvLS9TtGks5s4zE_gaJpZM4Ofmw3.

apulverizer commented 6 years ago

I am closing this as the initial issue was resolved.

@ming800 I think your idea for downloading the attachments is outside the scope of these scripts right now. That said, if you implement this, feel free to submit a PR.