Giter Site home page Giter Site logo

workforce-scripts's Introduction

Workforce Scripts

A set of Python scripts and notebooks to help administer and configure Workforce projects.

Notebooks

Several example Jupyter notebooks are provided to demonstrate some more advanced workflows that are possible via the ArcGIS API for Python and Workforce:

Notebooks used for previous demos are also available:

In addition, we have uploaded our AGOL-compatible notebooks into a publicly accessible group of Hosted Notebooks in ArcGIS Online

Scripts

Supports:

  • Python 3.6+
  • Python API for ArcGIS 1.8.3+

The Workforce team released a new version of the app supporting offline-enabled Projects in July 2020. To work with those projects in Python and deploy the corresponding scripts in this repo, users will need to update their version of the Python API to 1.8.3. This can be downloaded in Conda prior to 1.8.3's official release via:

conda install -c esri/label/prerelease -c esri arcgis

A set of Python scripts using the ArcGIS API for Python v1.8.3+. These scripts support Workforce in both ArcGIS Online and ArcGIS Enterprise.

Note that some may scripts may work with a Python API for ArcGIS version that is less than 1.8.3 but this cannot be guaranteed.

Features

Functionality Script
Create Assignment Types create_assignment_types.py
Import Workers import_workers.py
Import Dispatchers import_dispatchers.py
Create Assignments From CSV create_assignments_from_csv.py
Copy Assignments To Feature Service copy_assignments_to_fs.py
Export Assignments to CSV export_assignments_from_csv.py
Check Assignment Completion Location check_completion_location.py
Delete Assignments delete_assignments.py
Delete Assignment Types create_assignment_types.py
Assignment Monitor (Slack Integration) assignment_monitor.py
Migrate to Version 2 Project migrate_to_v2.py
Reset Stale Workers reset_stale_workers.py
Report Incomplete Assignments with Work Orders report_incomplete_assignments_with_work_orders.py
Report Complete Assignments without Work Orders report_complete_assignments_without_work_orders.py
Create Default Ops Dashboard create_ops_dashboard.py
Create Joined View create_joined_view

Instructions

  1. Install ArcGIS API for Python package via Conda as described here.
  2. Clone or download this repository
  3. In terminal/cmd navigate to the scripts folder
  4. Create Conda environment
    1. Install Anaconda
    2. Run conda env create --file environment.yml to create the virtual environment with the correct dependencies
    3. Run conda activate workforce-scripts to activate the environment
  5. (Optional - dev only) Configure pre-commit to run flake8 linting on pushes
    • pre-commit install --hook-type pre-push

To run in ArcGIS Notebooks:

  1. Visit our AGOL Hosted Notebooks group
  2. Click on "Content"
  3. Choose a notebook you'd like
  4. Click on the thumbnail for "Open Notebook" to open in ArcGIS Notebooks

Resources

Issues

Although we do our best to ensure these scripts and notebooks work as expected, they are provided as is and there is no official support.

If you find a bug, please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2020 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

workforce-scripts's People

Contributors

apulverizer avatar jmcmanus207 avatar niravi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

workforce-scripts's Issues

Add Documentation on configuring HTTP Proxy for use with Requests

Might be good to add information on configuring HTTP and HTTPS Proxy environment variables. If someone is using these scripts behind a corporate firewall and trying to connect to AGOL, they're probably going to need to configure those environment variables.

Standalone scripts - create_assignments_from_csv.py - Assignment Type field name

Enabling and inspection of the logger output from the above script reveals that the Assignment Type domain is defined in the feature layer (NB this is Enterprise Workforce) as follows:
'domain': { 'codedValues': [{ 'code': 1, 'name': 'Urban cut' }, { 'code': 2, 'name': 'Rural cut' }], 'type': 'codedValue', 'name': 'assignments_42e8961a29c44340b914a69737817f41_ASSIGN_TYPE' }, 'name': 'assignmenttype', 'nullable': True, 'editable': True, 'alias': 'Assignment Type', 'type': 'esriFieldTypeInteger' }
In the Python sample script supplied, the section for getting the codes of the domains includes:
if field["name"] == "assignmentType":
Changing this to if field["name"] == "assignmenttype": allows the search to be successful.

This worked fine with AGOL Workforce, I believe this may be a difference with Enterprise.
Hope this helps others.

Jonathan

Send notifications to "workers" via email/text

It would be very helpful if Workers could receive notifications outside of the application when new work is assigned to them. For a small organization where field workers aren't constantly interfacing with Esri apps, this type of function is near essential to help draw traffic to the Workforce application and complete critical work.

Matching Fields Assignments and Feature Layer

In a perfect world it would be great if there were matching fields between the assignments and feature layer that the field values would come over when the assignment is created as part of the GUI in workforce. If not a simple script to update matching fields between a feature layer and the corresponding assignment would be nice. I am wondering why there is not a relationship built between assignment and the feature layer(REL_GUID), this would make it even easier to update fields based on GUIDs. Is there a simple script to update the assignments layer from a feature layer?

create_assignments_from_csv fails in ArcGIS Enterprise.

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:

  • dueDate
  • assignmentType
  • workOrderId
  • workerId
    Here is the schema for ArcGIS Online and the one created in ArcGIS Enterprise.

image
image

Standalone Scripts - dispatcherId is not optional

The readme for the standalone create_assignments_from_csv.py script states:

-dispatcherIdField - The name of the field in the CSV file that contains the dispatcher ID (Optional - if not provided, the authenticated user is used as the dispatcher)_

Omitting the integer dispatcherId value in the input csv file causes this error:

[2018-02-19 08:56:08,973] [create_assignments_from_csv.py: 352 - <module>()] [MainThread] [ root] [CRITICAL] Traceback (most recent call last): | File "create_assignments_from_csv.py", line 348, in <module> | main(args) | File "create_assignments_from_csv.py", line 274, in main | args.dateFormat, args.wkid, args.attachmentFileField, args.workerField, args.timezone) | File "create_assignments_from_csv.py", line 84, in get_assignments_ from_csv | if dispatcherIdField: new_assignment["data"]["attributes"]["dispatcherId"] = int(assignment[dispatcherIdField]) | ValueError: invalid literal for int() with base 10: '' |

Assignment Migration - Attachments Failing

Running into a snag with migration, everything works except attachments. Is this an error on my end?

Describe the bug
Errors when migrating attachments: "Skipping migration of this attachment. It did not download successfully." Also "WinError 32 The process cannot access the file because it is being used by another process."

To Reproduce
Steps to reproduce the behavior:

  1. I cloned my ArcGIS Pro Python environment in ArcGIS Pro
  2. Installed newest prelease version of arcgis package via Conda terminal: activate arcgispro-py3-clone conda install -c esri/label/prerelease -c esri arcgis
  3. Verified arcgis version was now 1.8.3 (ArcGIS Pro > Python menu)
  4. Called the migrate_to_v2.py script with admin privs with this environment including my user credentials.
  5. Attachments failed to migrate with two errors provided (did not download and WinError 32 access issue).
  6. Script continued to complete successfully.
[2020-09-01 13:17:58,488] [              migrate_to_v2.py: 425 -                           main()][MainThread] [      root] [    INFO] Skipping migration of this attachment. It did not download successfully
[2020-09-01 13:17:58,706] [              migrate_to_v2.py: 430 -                           main()][MainThread] [      root] [    INFO] Not all of your attachments migrated successfully. Continuing with migration
[2020-09-01 13:17:58,707] [              migrate_to_v2.py: 433 -                           main()][MainThread] [      root] [    INFO] Migrating Integrations
[2020-09-01 13:18:04,416] [              migrate_to_v2.py: 453 -                           main()][MainThread] [      root] [    INFO] Integrations migrated successfully
[2020-09-01 13:18:07,717] [              migrate_to_v2.py: 460 -                           main()][MainThread] [      root] [    INFO] Migrating Webmaps
[2020-09-01 13:18:13,338] [              migrate_to_v2.py: 463 -                           main()][MainThread] [      root] [    INFO] Script Completed

Expected behavior
Migration to include attachments.

Desktop:

  • OS: Windows 10.0.17763.1339
  • Python Version: U:>C:\Users\lsanders\AppData\Local\Esri\conda\envs\arcgispro-py3-clone\python.exe
    Python 3.6.10 |Anaconda, Inc.| (default, May 20 2020, 01:49:13) [MSC v.1916 64 bit (AMD64)] on win32

Additional context
Call & Error message:

C:\windows\system32>C:\Users\lsanders\AppData\Local\Esri\conda\envs\arcgispro-py3-clone\python.exe "C:\Users\lsanders\Downloads\workforce-scripts-master\workforce-scripts-master\scripts\migrate_to_v2.py" -u [redacted] -p [redacted] -org https://marysville.maps.arcgis.com -project-id [redacted] -new-title "CurbStops_Test5"
[2020-09-01 13:09:45,393] [              migrate_to_v2.py: 162 -                           main()][MainThread] [      root] [    INFO] Authenticating...
[2020-09-01 13:09:48,735] [              migrate_to_v2.py: 179 -                           main()][MainThread] [      root] [    INFO] Water Curb Stop Assignments (Demo)
[2020-09-01 13:09:48,735] [              migrate_to_v2.py: 180 -                           main()][MainThread] [      root] [    INFO] Creating base v2 project...
[2020-09-01 13:09:48,735] [                  _portalpy.py:2427 -                 _contents_page()][MainThread] [arcgis.gis] [    INFO] getting user folders and items
[2020-09-01 13:10:22,336] [              migrate_to_v2.py: 203 -                           main()][MainThread] [      root] [    INFO] Migrating assignment types...
[2020-09-01 13:10:24,673] [              migrate_to_v2.py: 217 -                           main()][MainThread] [      root] [    INFO] Assignment Types successfully migrated
[2020-09-01 13:10:24,674] [              migrate_to_v2.py: 224 -                           main()][MainThread] [      root] [    INFO] Migrating dispatchers...
[2020-09-01 13:10:27,667] [              migrate_to_v2.py: 273 -                           main()][MainThread] [      root] [    INFO] Dispatchers successfully migrated
[2020-09-01 13:10:27,668] [              migrate_to_v2.py: 278 -                           main()][MainThread] [      root] [    INFO] Migrating workers...
[2020-09-01 13:10:29,777] [              migrate_to_v2.py: 325 -                           main()][MainThread] [      root] [    INFO] Workers successfully migrated
[2020-09-01 13:10:29,778] [              migrate_to_v2.py: 331 -                           main()][MainThread] [      root] [    INFO] Migrating assignments
[2020-09-01 13:12:55,152] [              migrate_to_v2.py: 408 -                           main()][MainThread] [      root] [    INFO] Assignments successfully migrated
[2020-09-01 13:12:55,153] [              migrate_to_v2.py: 414 -                           main()][MainThread] [      root] [    INFO] Migrating Attachments
[2020-09-01 13:12:56,407] [              migrate_to_v2.py: 424 -                           main()][MainThread] [      root] [    INFO] [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\lsanders\\AppData\\Local\\Temp\\tmpj5e2z54p\\683\\1\\Photo 1.jpg'
[2020-09-01 13:12:56,408] [              migrate_to_v2.py: 425 -                           main()][MainThread] [      root] [    INFO] Skipping migration of this attachment. It did not download successfully

Continued for all attachments until.

ot] [    INFO] Not all of your attachments migrated successfully. Continuing with migration
[2020-09-01 13:17:58,707] [              migrate_to_v2.py: 433 -                           main()][MainThread] [      root] [    INFO] Migrating Integrations
[2020-09-01 13:18:04,416] [              migrate_to_v2.py: 453 -                           main()][MainThread] [      root] [    INFO] Integrations migrated successfully
[2020-09-01 13:18:07,717] [              migrate_to_v2.py: 460 -                           main()][MainThread] [      root] [    INFO] Migrating Webmaps
[2020-09-01 13:18:13,338] [              migrate_to_v2.py: 463 -                           main()][MainThread] [      root] [    INFO] Script Completed```

AssignmentType shows GUID rather than text Alias in ArcGIS Pro

Describe the bug
New Workforce Projects AssignmentType field values in the Assignment layer display the GUID value rather than a human readable text value when the feature service is displayed in ArcGIS Pro. I was hoping to use Append in Pro to migrate assignments from V1 to V2 but found this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Migrate V1 to V2 project or create a new Project
  2. Create assignment types
  3. Add assignment layer to an ArcGIS Pro map and start editing
  4. In Attribute window, GUID values are shown rather than human readable aliases

image

Cannot execute create_assignments_from_csv due to Type error

Describe the bug
I am attempting to execute the above script but it fails on the Assignment Type field as follows:

Traceback (most recent call last): | File "create_assignments_from_csv.py", line 233, in | main(args) | File "create_assignments_from_csv.py", line 119, in main | assignment_type=assignment_type_dict[assignment[args.assignment_type_field]], | KeyError: 'Type' |

To Reproduce
Execute and Params as follows:
python create_assignments_from_csv.py -csv-file "..KSN\KSN_Script_Batch2.csv" -u ******* -p ******* -org "" -project-id "*" -assignment-type-field "Type" -location-field "Location" -description-field "Description" -priority-field "Priority" -work-order-id-field "Work Order Id" -due-date-field "Due Date" -attachment-file-field "Attachment" -log-file "..\log.txt" -worker-field "Worker" -timezone "US/Pacific"

CSV as follows:
Type,Location,Dispatcher,Description,Priority,Work Order Id,Due Date,Worker,Attachment
BEF,135 Ballymena Road Doagh Ballyclare BT39 0TN,,Test,high,1,18/12/2020,Lpowell,
BEF,18 High St Holywood BT18 9AD,,Test,low,2,19/12/2020,Lpowell,
BEF,Block B Ashtown Gate Navan Rd Ashtown Dublin 15 D15 NP9Y,,Test,med,3,20/12/2020,Lpowell,
BEF,234 Ballymena Rd BT39 0TP,,Test,none,4,21/12/2020,Lpowell,

Expected behavior
Batch upload of assignments to Workforce using Geocoder

Desktop (please complete the following information):

  • OS: Windows 10
  • Python Version: 3.7

Additional context
Download and created workforce-scripts env as per link.

create_assignments_from_csv.py fails with import error

create_assignments_from_csv imports the arrow module, which is not part of the standard distribution. Further, I tried to pip install arrow on both a Mac and Windows machine only to end up with pip failing with error message Could not find a version that satisfied the requirement arrow (from versions: ). No matching distribution found for arrow

-attachmentFileField

Describe the bug
the default python example for "create_assignments_from_csv.py" has "-attachmentFileField" which should be formatted as "-attachment-file-field"

To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Python Version:

Additional context
Add any other context about the problem here.

Will assign assignments based on point features

Is your feature request related to a problem? Please describe.
The script option for assigning assignments based on existing feature services will only work if that feature service is a point feature.

Describe the solution you'd like
I would like to be able to assign assignments to line and polygon features. For my use case, I want our field personnel to investigate all water utility assess along a length of water main. Doing this reduces the effort of assigning work assignments to all water assets.

Describe alternatives you've considered
The work around I am currently using incorporates the "points along a line" tool to generate mid points for each line feature. I than use this feature service to create the workforce assignments.
Additional context
The above work around is not ideal as it creates a additional update step for my team as we have to re-create the point features any time our line feature is updated.

Can't Assign Work: ValidationError: Assignment must have geometry

Describe the bug
I can create assignments but when I go to assign the assignments to a specific user I get this error: ValidationError: Assignment must have geometry

To Reproduce
Here's my code:

user = project.workers.get(user_id="username")
test_backflows = project.assignment_types.get(name="Test Backflow Device")
assignments = project.assignments.search(f"status=0 AND assignmentType={test_backflows.code}")
for assignment in assignments:
assignment.worker = user
assignment.status = "assigned"
assignment.assigned_date = datetime.datetime.utcnow()
assignments = project.assignments.batch_update(assignments)

KeyError 'globalid'

Hey,

i'm getting and error when I run this on my enterprise install. Copying assignments from workforce installed in portal to a feature service on the same server. Any thoughts? We have this working on the same layer on our previous server so I'm a bit stumped.

archived_assignments = target_fl.query(out_fields=field_mappings[project._assignment_schema.global_id]) | KeyError: 'globalid'

Thanks

Type Error: 'NoneType' Object is not subscriptable

Describe the bug
I am attempting to run the delete_assignments.py in order to delete assignments that have a status of Completed. When I pass in the parameters as outlined in the readme for the script I receive the Type Error: 'NoneType' Object is not subscriptable error.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Anaconda Prompt (run as administrator)
  2. Enter in parameters: python c:\git\workforce-scripts\scripts\delete_assignments.py -u myadmin -p mypassword -org "https://myorg.maps.arcgis.com" -project-id "assignment's id" -log-file "../log.txt" -where "Status=3"
    3.Hit enter

Expected behavior
I had hoped that all assignments with a status of Completed would be deleted. I tested at the REST endpoint of my assignments hosted feature layer and was able to query the layer successfully using where Status = 3.

Desktop (please complete the following information):

  • OS: Windows Server 2016
  • Python Version: 3.7.1

Additional context
I also tried -where "Status=Completed", but that also returned the same error.

Handle_json_error

Describe the bug
[2019-02-18 09:39:26,326] [create_assignments_from_csv.py: 75 - main()] [MainThread] [ root] [ INFO] Authenticating...
[2019-02-18 09:39:31,184] [ connection.py:1173 - handle_json_error()] [MainThread] [arcgis.im] [ ERROR] You do not have permissions to access this resource or perform this operation.
[2019-02-18 09:39:31,184] [create_assignments_from_csv.py: 217 - ()] [MainThread] [ root] [CRITICAL] Exception detected, script exiting
[2019-02-18 09:39:31,200] [create_assignments_from_csv.py: 218 - ()] [MainThread] [ root] [CRITICAL] You do not have permissions to access this resource or perform this operation.
(Error Code: 403)
[2019-02-18 09:39:31,215] [create_assignments_from_csv.py: 219 - ()] [MainThread] [ root] [CRITICAL] Traceback (most recent call last): | File "C:\temp\workforce-scripts-master\scripts\create_assignments_from_csv.py", line 215, in | main(args) | File "C:\temp\workforce-scripts-master\scripts\create_assignments_from_csv.py", line 82, in main | item = gis.content.get(arguments.project_id) | File "C:\Users\kangh\AppData\Local\ESRI\conda\envs\arcgispro-clone-new\lib\site-packages\arcgis\gis_init
.py", line 3288, in get | raise re | File "C:\Users\kangh\AppData\Local\ESRI\conda\envs\arcgispro-clone-new\lib\site-packages\arcgis\gis_init
.py", line 3283, in get | item = self._portal.get_item(itemid) | File "C:\Users\kangh\AppData\Local\ESRI\conda\envs\arcgispro-clone-new\lib\site-packages\arcgis_impl\portalpy.py", line 1212, in get_item | return self.con.post('content/items/' + itemid, self._postdata()) | File "C:\Users\kangh\AppData\Local\ESRI\conda\envs\arcgispro-clone-new\lib\site-packages\arcgis_impl\connection.py", line 1159, in post | self._handle_json_error(resp_json['error'], errorcode) | File "C:\Users\kangh\AppData\Local\ESRI\conda\envs\arcgispro-clone-new\lib\site-packages\arcgis_impl\connection.py", line 1180, in _handle_json_error | raise RuntimeError(errormessage) | RuntimeError: You do not have permissions to access this resource or perform this operation. | (Error Code: 403) |

To Reproduce
Steps to reproduce the behavior:

  1. I am running the script create_assignments_from_csv.py from the Python Command Prompt. I created a clone of arcgispro-py3 in ArcGIS Pro 2.2.3
  2. Here is the command that I am running:
    python C:\temp\workforce-scripts-master\scripts\create_assignments_from_csv.py
    -csv-file "../sample_data/assignments.csv"
    -u xxxxx
    -p xxxxx
    -org "https://xxxxx.maps.arcgis.com"
    -project-id "b973bac4f3794e2eacc975c315d88144"
    -x-field "xField"
    -y-field "yField"
    -assignment-type-field "Type"
    -location-field "Location"
    -description-field "Description"
    -priority-field "Priority"
    -work-order-id-field "Work Order Id"
    -due-date-field "Due Date"
    -attachment-file-field "Attachment"
    -wkid 102100
    -log-file "../log.txt"
    -worker-field "Worker"
    -timezone "US/Pacific"
  3. I am using the sample assignments.csv to upload the assignments

Expected behavior
A clear and concise description of what you expected to happen.
I am not even getting passed the very first step to run the script from the Python command prompt.

Desktop (please complete the following information):

  • OS: Windows 10
  • Python Version: 3.x

Additional context
Add any other context about the problem here.

Not letting worker finish assignment if worker is not nearby assignment

*If a worker is not nearby a mission worker still can finish the mission. If you have let's say 500 worker in a project it won't be easy to track down which missions are correctly completed.

It is not easy to track down a lot of workers. We have a workforce project fully integrated with many other arcgis platforms such as dashboard and collector. If a worker completes the mission without being there, all the data we collect becomes unusable.

**In order to complete the mission worker must be inside of the described radius around the assignment mission **

An implementation or if there is a way to make this happen or any alternative to consider.

Automation needed features

Hi there,

I am new to this workforce python scripts; I have several things need help:

  • in the script, I found the string "Public Works Work Orders", I suppose it's an folder name in workforce website point to? Not sure how to create such a folder. If I don't have a folder, how I reference an existing workforce project like classic project?

  • Since I don't have folder name, so I try to run following code, it get item success, but it return none type is not subscriptable error. I saw it's coming from self._item_data is None in project.py. Could you help me to point what issue it is?

from arcgis.apps import workforce
from arcgis.gis import GIS
gis = GIS("https://arcgis.com/", "my_username", 'my_password')

item = gis.content.get("2edca7cf30314f69abfe6c69891567b4")
project = workforce.Project(item)

Thank you very much.

Allen

Exceptions on migrate_assignments.py

Describe the bug
First time run migrate_assignments.py and two exceptions happened, both on "workforce.project" module.

on line 108, exception shows: 'Project' object has no attribute '_is_v2_project'.

Then, I changed to code to "if False:" and the exception happened on line 113:
migrate_assignments.py: 98 - main()][MainThread] [root] [ INFO] Authenticating...
migrate_assignments.py: 251 - ()][MainThread] [root] [CRITICAL] Exception detected, script exiting
migrate_assignments.py: 252 - ()][MainThread] [root] [CRITICAL] 'assignments'
migrate_assignments.py: 253 - ()][MainThread] [root] [CRITICAL] Traceback (most recent call last):
| File "G:/Development/workforce-scripts-master/scripts/migrate_assignments.py", line 249, in
| main(args)
| File "G:/Development/workforce-scripts-master/scripts/migrate_assignments.py", line 114, in main
| v2_project = workforce.Project(item2)
| File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\workforce\project.py", line 45, in init
| self._assignment_schema = AssignmentSchema(self.assignments_layer)
| File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis_impl\common_utils.py", line 158, in _lazy_property
| setattr(self, attr_name, fn(self))
| File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\workforce\project.py", line 233, in assignments_layer
| return FeatureLayer(self.assignments_layer_url, self.gis)
| File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\workforce\project.py", line 183, in assignments_layer_url
| return self._item_data['assignments']['url']
| KeyError: 'assignments' |

Desktop (please complete the following information):

  • OS: [Win 10]
  • Python Version: 3.6

Additional context
I did not follow the steps to install the Python API 1.8.3+. Because I just upgraded my Pro to latest v.2.6.0 and it says the Python 1.8.3 will be installed with the Pro v 2.6.0

thanks,

Ming

How to migrate completed assignments?

Hi,
I was using migrate_assignments.py to migrate assignments from the classic project and the new project during the migration I encountered an error - "Assignments not migrated successfully. Unknown error".
When I checked the new project I found that only the Assigned and In Progress assignments got migrated. While going through the Migrate a Classic Workforce project blog i have found that we can optionally provide and attribute called where “status IN (0,1,2)”. Refer to the below screenshot for the same.

image.

I just wanted to what is the status code we need to provide for migrating the completed assignments or how we can migrate the completed assignments.?

Any help would be really appreciated.

Thanks
Ayush

FYI using "Work Order ID" with spaces results in error.

oops, adding details.

I'm using the Create Assignments From CSV tool and if i name my CSV field "Work Order ID" i get an error:
[MainThread] [ root] [CRITICAL] Traceback (most recent call last): | File "C:\Data\FaresWorkforce\workforce-scripts-master\scripts\create_assignments_from_csv.py", line 215, in | main(args) | File "C:\Data\FaresWorkforce\workforce-scripts-master\scripts\create_assignments_from_csv.py", line 161, in main | if args.work_order_id_field and assignment[args.work_order_id_field]: | KeyError: 'WorkOrderId' |

Changing field to "WorkOrderID" resolved this issue

Create Assignments

First I would like to say these scripts are great!! Thanks you!

I would like to request to be able to designate the workerId in this script. I have around 350 dumpsters assignments each day and need to assign them to the proper truck or worker. This will prevent the dispatcher from having to manually assign them to the proper worker each day.

Thanks

Tred

Standalone Scripts - create_assignments_from_csv.py - OBJECTID references fail

Whilst it appears that objectid fields are aliased as OBJECTID in the feature layer (although navigating this is somewhat challenging!) I have been unable to get the above Python script to run unless I replace all instances of OBJECTID with objectid.
This seemed to work fine with AGOL-based Workforce, I believe it may be a change introduced for Enterprise Workforce.
Hope this helps.

Jonathan

Upload multiple attachments

Hi,

is it possible to allow for uploading of multiple attachments with the create assignments from csv script?

Copy assignments does not copy feature service attachments

Is your feature request related to a problem? Please describe.
When utilizing the copy_assignments_to_fs.py script attachments are not copied to the target feature service.

Describe the solution you'd like
Attachments if present should be copied over.

I was trying to utilize this script for archival purposes, without attachments copying over, I am not able to utilize this script.

Add option to set Requests verify=False and disable insecure connection warnings

I needed to modify the Workforce Helpers script as follows for use behind my corporate firewall:

import logging
import sys
import requests
# Disable warnings about Insecure Connections
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

def post(url, data=None, files=None):
    """
    Makes a POST request with the provided url and data
    :param url: (string) The url to post to
    :param data: (dictionary) The data (if any) to send
    :param files: (dictionary) The json data the holds the file info
    :return:
    """
    logging.getLogger().debug("Posting to: {}".format(url))
    # Added verify=False flag to prevent issues with SSL Verification errors
    response = requests.post(url, data, files=files, verify=False).json()
    logging.getLogger().debug(response)
    return response


def get(url, params=None):
    """
    Makes a GET request with the provided url and parameters
    :param url: (string) The url to get
    :param params: (dictionary) The parameters to submit
    :return:
    """
    params['f'] = 'json'
    logging.getLogger().debug("Getting: {}".format(url))
    # Added verify=False flag to prevent issues with SSL Verification errors
    response = requests.get(url, params, verify=False).json()
    logging.getLogger().debug(response)
    return response```

Might be better to add these as options to the Workforce Scripts

assignementread field doesn't exist

I received the following error when running the migrate_assignments.py script:

"... Exception: The submitted field 'assignmentread' does not exist in the table 'db_ugnsv.hsu_ao66g.workforce_b_cc64467abc4e3b9fd14283_assignments'. | (Error Code: 500) |"

My classic project had that field, as an integer field, so I simply added it to the V2 project and the script ran successfully. I didn't see this issue mentioned anywhere so I thought I'd post it.

Mr

there is not delete_assignment_types.py, instead create_assignment_types.py appears twice

Create assignments - workOrderIdField & locationField

Scripts work great and are very useful, but I'm a bit unclear on two things on the assignment creation script:

  1. It seems the script tries to enforce the workOrderIdField being an integer. Why is that? The Assignments schema in a Workforce project seems to have the workOrderId field as text. This is actually a bit of a blocker since those IDs might originate from other systems, and in my case they are not just numbers.
    workforce_servicesschema

UPDATE: Modified line 81 in the script, by removing the int() around the workOrderIdField and it now imports the ID fields as is. Still would like to know why it was enforced?

  1. Why is the locationField required? Shouldn't it be enough having X/Y coordinates to establish it? If X/Y is all you have you would potentially need to reverse geocode to get some sort of textual location info

create_assignments_from_csv xField label corruption issue

I'm using create_assignments_from_csv.py to upload assignments into Enterprise Workforce.
(NB I have not before tried to get this working since my Customer migrated from AGOL (where it worked fine)).
I call the script from a bash script, which passes the right parameters.
I get this error on the end of my output:
args.dateFormat, args.wkid, args.attachmentFileField, args.workerField, args.timezone) | File "create_assignments_from_csv.py", line 78, in get_assignments_ from_csv | new_assignment["data"]["geometry"] = dict(x=float(assignment[xField]), y=float(assignment[yField]), | KeyError: 'xField' |
If I tweak your script to show the assignment created I get this:
{'yField': '50.93831389', 'Description': 'Cut 2', 'Due Date': '08/21/2018 23:59:59', '\xef\xbb\xbfxField': '-0.033513889', 'Worker': 'ruralgrass1', 'Work Order Id': 'RUZ7', 'Priority': '3', 'Location': 'Rural Zone 7', 'Type': '2', 'Dispatcher': '1', 'attachment': ''}
Clearly, the xField label is causing issues. I can't find those extra characters anywhere in the Python scripts. This happens every time I run it.

The section of my Bash script which names the column label is as follows:
-xField \"xField\"

Thanks very much for reading this.
[Edited to remove extra line feed in quote caused by pasting error]

Getting KeyError as "assignments" when using workforce with geoprocessing tool.

Hello,

I created a toolbox that works in local server but i could not make it work as a geoprocessing service.

My idea is that i want to be able to reach to workforce through using ArcGIS API and want to make operations over there by using the tool i created. It works without a problem on the ArcGIS Pro, but when i publish it as a geoprocessing device i get the following error.

Traceback (most recent call last): File "", line 71, in execute File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\apps\workforce\project.py", line 45, in init self._assignment_schema = AssignmentSchema(self.assignments_layer) File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis_impl\common_utils.py", line 158, in _lazy_property setattr(self, attr_name, fn(self)) File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\apps\workforce\project.py", line 233, in assignments_layer return FeatureLayer(self.assignments_layer_url, self.gis) File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\apps\workforce\project.py", line 183, in assignments_layer_url return self._item_data['assignments']['url'] KeyError: 'assignments' Failed to execute (Tool). Failed to execute (Tool). Failed.

What could be the reason?

delete_assignments.py - 'NoneType' object is not subscriptable

I'm trying to run an unaltered copy of the delete_assignments.py script, with the ArcGIS Pro 2.2 Python default install, and am getting the following error:

python delete_assignments_MG.py -u MYUSERNAME -p THEPASSWORD -org "https://OURORG.maps.arcgis.com" -project-id "efb4cb86b3514eefb64a9a31d6b6e329" -log-file "../logs/deletedAssignments.log" -where "1=1"
[2018-08-27 12:49:16,273] [ delete_assignments.py: 55 - main()] [MainThread] [ root] [ INFO] Authenticating...
[2018-08-27 12:49:19,410] [ delete_assignments.py: 93 - ()] [MainThread] [ root] [CRITICAL] Exception detected, script exiting
[2018-08-27 12:49:19,412] [ delete_assignments.py: 94 - ()] [MainThread] [ root] [CRITICAL] 'NoneType' object is not subscriptable
[2018-08-27 12:49:19,418] [ delete_assignments.py: 95 - ()] [MainThread] [ root] [CRITICAL] Traceback (most recent call last): | File "delete_assignments_MG.py", line 91, in | main(args) | File "delete_assignments.py", line 64, in main | project = workforce.Project(item) | File "C:\Users\giesbm\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\workforce\project.py", line 45, in init | self._assignment_schema = AssignmentSchema(self.assignments_layer) | File "C:\Users\giesbm\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis_impl\common_utils.py", line 95, in _lazy_property | setattr(self, attr_name, fn(self)) | File "C:\Users\giesbm\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\workforce\project.py", line 216, in assignments_layer | return FeatureLayer(self.assignments_layer_url, self.gis) | File "C:\Users\giesbm\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\apps\workforce\project.py", line 166, in assignments_layer_url | return self._item_data['assignments']['url'] | TypeError: 'NoneType' object is not subscriptable |

Running from command line with:

  • OS: Win 10 64bit
  • Python Version: 3.6.5

I do have records in the assignments table, is enabled for editing, allowing others to export, etc.

Update import_workers.py to allow importing Dispatchers as well

Would be useful if import_workers.py could also be used to add Dispatchers as well. I'd suggest changing the name of the script to import_users.py (breaking change?) and adding a userRole field where the value could be either worker or dispatcher.

Maybe this is already possible and I just missed the documentation on it

Optimally Creating and Assigning Work Orders Based on Routes

Hello,
In the 'Optimally Creating and Assigning Work Orders Based on Routes' notebook there is the following code:

assignments_to_add = []
for _, row in routes.iterrows():
    worker = random.choice(workers)
    workers.remove(worker)
    route_stops = stops.loc[(stops['RouteName'] == row["RouteName"]) & stops['globalid'].notnull()]
    for _, stop in route_stops.iterrows():
        assignments_to_add.append(workforce.Assignment(
            project,
            assignment_type="Inspection",
            location=stop["name"],
            status="assigned",
            worker=worker,
            assigned_date=datetime.now(),
            due_date=stop["DepartTime"],
            geometry=stop["SHAPE"]
        ))
assignments = project.assignments.batch_add(assignments_to_add)

I think the line workers.remove(worker) should be removed because then in assignments_to_add.append() the worker=worker will give an error of empty list. Am I wrong?

Thanks

ASSIGNMENT MONITOR

WHERE I CAN GET AN CONFIG.INI FILE FOR THE ASSIGNMENT_MONITOR PROGRAM

Authentication fails when using Enterprise login

Describe the bug
Authentication fails when using Enterprise account. The Enterprise account is added as a dispatcher so the account has permissions on the project. It works if an ArcGIS Online login is used instead. I have tried the Enterprise email address and username for -u argument and it still fails. I don't see any additional arguments for enterprise account.

python C:\temp\workforce-scripts-master\scripts\export_assignments_to_csv.py
-csv-file "C:\temp\workforce-scripts-master\sample_data\export_assignments.csv"
-u <enterprise email/enterprise username>
-p
-org "https://xxxxx.maps.arcgis.com"
-project-id "the project id"
-log-file "C:\temp\workforce-scripts-master\sample_data\logExportAssignments.txt"
-where "status=1"
-date-format "%m/%d/%Y %H:%M:%S"
-timezone "US/Pacific"

To Reproduce
Steps to reproduce the behavior:

  1. I am running the script from the Python Command Prompt
  2. I get an error - Unable to generate token. Invalid username or password.

Expected behavior
Be able to use a dispatcher enterprise account to export/create assignments

Desktop (please complete the following information):
OS: Windows 10
Python Version: 3.x

Additional context
Add any other context about the problem here.

Invalid Assignment Type

Describe the bug
The script returns this output every time:

[2018-11-28 14:56:33,043] [create_assignments_from_csv.py: 75 - main()] [MainThread] [ root] [ INFO] Authenticating...
[2018-11-28 14:56:36,363] [create_assignments_from_csv.py: 88 - main()] [MainThread] [ root] [ INFO] Reading CSV file: ../sample_data/assignments.csv...
[2018-11-28 14:56:36,454] [create_assignments_from_csv.py: 217 - ()] [MainThread] [ root] [CRITICAL] Exception detected, script exiting
[2018-11-28 14:56:36,455] [create_assignments_from_csv.py: 218 - ()] [MainThread] [ root] [CRITICAL] Invalid Assignment Type
[2018-11-28 14:56:36,462] [create_assignments_from_csv.py: 219 - ()] [MainThread] [ root] [CRITICAL] Traceback (most recent call last)
To Reproduce
Steps to reproduce the behavior:

  1. When I clear out the assignments.csv file of any entries (only the headers are left), the script completes successfully, which makes me think that my formatting is wrong.

  2. Here is my script (minus the credentials):
    python create_assignments_from_csv.py -csv-file "../sample_data/assignments.csv" -u xxxxx -p xxxxxx -org "XXXXXXX" -project-id "f1908a1781734f3a890add01718e08b9" -x-field "xField" -y-field "yField" -assignment-type-field "Type" -location-field "Location" -description-field "Description" -priority-field "Priority" -work-order-id-field "WorkOrderId" -due-date-field "DueDate" -attachment-file-field "Attachment" -wkid 102100 -log-file "../log.txt" -worker-field "Worker" -timezone "US/Pacific"

  3. Here is the csv I'm trying to upload:
    xField,yField,Type,Location,Dispatcher,Description,Priority,WorkOrderId,DueDate,Attachment,Worker
    4232820.809,289619.8689,2,Flush,1,Flush,None,1,01/31/2019,,1
    4232820.809,289619.8689,2,Flush,1,Flush,None,2,01/31/2019,,1

4.There are currently two assignment types in the project: Flush and Don't Flush (which are shown as coded values 2 & 3).

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: windows 10
  • Python Version:3.6.5

Additional context
Add any other context about the problem here.

Export to CSV file

Because I am very new to Python and do not want to mess up the AGOL data, I am just trying to export the online assignments to CSV file. However, I got a error message as the following:

Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.

================================ RESTART ================================

Traceback (most recent call last):
File "C:\GIS\workforce-scripts-master\standalone_scripts\export_assignments_to_csv.py", line 31, in
import workforcehelpers
File "C:\GIS\workforce-scripts-master\standalone_scripts\workforcehelpers.py", line 28, in
import requests
ImportError: No module named requests

=============================================================

Here is the command line:
C:\Python27\ArcGISx6410.4\python.exe export_assignments_to_csv.py -outCSV "
../exported_assignments.csv" -u mingzhang -p mingzhang -url "https://b-w.maps.arcgis.com" -pid "4b34bbfec3204f80b8752894f7dae8d1" -logFile "../log.txt" -outSR 102323 -where "1=1" -dateFormat "%m/%d/%Y"

Please help and let me what I did wrong!

Thank you very much,

Ming

Export assignment to CSV is still using arrow instead of pendulum

Describe the bug
The script can't run if using the default environment.yml file since arrow was removed.

To Reproduce
Steps to reproduce the behavior:

  1. Install the environment using the yml file
  2. Run export_assignments_to_csv.py script

Expected behavior
It should be using pendulum but looks like we missed updating this script script.

Desktop (please complete the following information):

  • OS: Any
  • Python Version: Any

Additional context
Add any other context about the problem here.

Service name already exists; misreported error, perhaps '&'

When trying to run script create_joined_view.py I receive the error

[CRITICAL] Traceback (most recent call last): | File "create_joined_view.py", line 457, in | main(args) | File "create_joined_view.py", line 360, in main | assignment_type_fields) | File "create_joined_view.py", line 231, in create_joined_view | "name": f"{name}" | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_init_.py", line 5453, in create_service | snippet, | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_impl_portalpy.py", line 555, in create_service | resp = self.con.post(path, postdata) | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_impl_con_connection.py", line 1079, in post | force_bytes=kwargs.pop("force_bytes", False), | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_impl_con_connection.py", line 607, in _handle_response | raise Exception(data["error"]) | Exception: {'message': "Service name '('Reveg _ Invasive Veg Treatments Intermediate View 0 1650930822',)' already exists for 'qZ0lWJiFyXo3xsF1'"} |

I can find no view with the name Reveg _ Invasive Veg Treatments Intermediate View 0 1650930822 to delete. On speculation of illegal character, I edited the script to eliminate the ampersand in the source project name to no effect. the name is 62 characters, well less than the maximum 128 for a feature service.

I have run the script successfully on other workforce projects. None have '&' in the name.

To test, I created an empty WF project "Test & Go" This recieved the same error. While not conclusive, this indicats the ampersand is the likely culprit. As i already chagned the layer name for he output, I am not sure what othre modifications to make--perhpas the names of the input join layers?

here is the full eror for Test & Go
[2022-04-25 17:17:44,719] [ create_joined_view.py: 334 - main()] [MainThread] [ root] [ INFO] Authenticating...
[2022-04-25 17:17:48,712] [ create_joined_view.py: 338 - main()] [MainThread] [ root] [ INFO] Getting Workforce Project...
[2022-04-25 17:17:53,137] [ create_joined_view.py: 351 - main()] [MainThread] [ root] [ INFO] Phase 1: Joining assignments to assignment types...
[2022-04-25 17:17:57,660] [ create_joined_view.py: 459 - ()] [MainThread] [ root] [CRITICAL] Exception detected, script exiting
[2022-04-25 17:17:57,660] [ create_joined_view.py: 460 - ()] [MainThread] [ root] [CRITICAL] {'message': "Service name '('Test _ Go Intermediate View 0 1650932273',)' already exists for 'qZ0lWJiFyXo3xsF1'"}
[2022-04-25 17:17:57,665] [ create_joined_view.py: 461 - ()] [MainThread] [ root] [CRITICAL] Traceback (most recent call last): | File "create_joined_view.py", line 457, in | main(args) | File "create_joined_view.py", line 360, in main | assignment_type_fields) | File "create_joined_view.py", line 231, in create_joined_view | "name": f"{name}" | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_init_.py", line 5453, in create_service | snippet, | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_impl_portalpy.py", line 555, in create_service | resp = self.con.post(path, postdata) | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_impl_con_connection.py", line 1079, in post | force_bytes=kwargs.pop("force_bytes", False), | File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis_impl_con_connection.py", line 607, in _handle_response | raise Exception(data["error"]) | Exception: {'message': "Service name '('Test _ Go Intermediate View 0 1650932273',)' already exists for 'qZ0lWJiFyXo3xsF1'"} |

Desktop (please complete the following information):

  • OS: Windows 11
  • Python Version: 3.7.11

Additional context
Add any other context about the problem here.

Create Assignment from Existing Feature Service

I am looking for a script to take an existing FS and then map the fields to an existing Assignments FS to generate new assignments. I assumed the copy_assignments_fs was exactly this, but I had the logic backwards.

This would be really useful in the gas space, where users may have overlapping areas that need to be managed by different types of assignments. While the batch assignment tool works great for many features of one type in a geography, it becomes difficult to create assignments of many different overlapping types.

Do scripts work with New WorkForce?

Describe the bug
I created a new WorkForce project at workforce.arcgis.com.

From within ArcGIS Online, using Notebooks.....
In script 1, I connect to the organization using the same account used to create a WorkForce Project.

The following code does not list any New WorkForce projects. I do see classic WorkForce Projects
item = gis.content.search("type:'Workforce Project' '*'")

I also try AGO assistant. I grab the project id code of the New WorkForce project and use it to search AGO assistant. The only items returned are the Feature Layer for the New Workforce Project.

import_workers should throw an error if workerId is not valid

Stumbled across this out of blatant user error. I had a typo in one of my workerId values in my CSV. I was able to execute import_workers.py against that CSV without any errors or warnings.

When I executed create_assignments_from_csv.py, it threw an error when it tried to give assignments to the invalid workerId.

Clearly there is some user error here but, when you're creating thousands of assignments, this is way too far down the line to find out you had an invalid workerId in your workersCSV. Imho, that should have been called out when you ran import_workers.py, probably as a warning because if you dont fix it, you're going to run into issues when you try to create assignments .

It was only about 1,100 assignments for me but it still took a good 3-4 minutes before create_assignments_from_csv.py came across my invalid workerId and the error was raised.

Unknown object [OBJ] causes export_assignments_to_csv.py script to fail

Describe the bug
This script fails when it reaches an unknown object [OBJ] added to notes in Workforce. The object is not visible in Workforce, so inspectors are not sure what they do to cause the insertion of the [OBJ]. An object may be generated when the inspector saves a note while Workforce is "thinking" in dictation mode. For example, "Canceled by contractor" is what the inspector says, only "Canceled by" get written out and it still says "listening...". The inspector saves the note then opens it again and dictates "contractor". The final note is "Canceled by [OBJ] Contractor", but it looks like" Canceled by Contractor" in Workforce.

To Reproduce
I do not know how to reproduce the issue, but I have a Workforce project with an example note with an object. You can't actually see the object [OBJ] until you export it to Word or Excel (see attached image). I could work with someone in a remote session, or here is one of the problem notes - but I'm not sure if it will work for you - the object is at the end of the paragraph:
Stormwater follow up inspection. Continued. Minor track out on the speedway and on Tyndall. Work in the right of way. Ally is closed off. There is some dirt on the sidewalk at bus stop location. I spoke with Antonio at 602-292-0989. He would like a pre-final walk-through. I requested that he call for that inspection early next week so we can provide the time necessary for that inspection.

This is what it looks like copied to Word from Workforce:
Capture

Expected behavior
It would be helpful if the script either skipped over records with objects, or ideally, just excluded the object from the export.

Desktop (please complete the following information):

  • OS: iOS - unsure if this happens with Android.
  • OS: Scheduled Task running on Windows Server 2012 R2
  • Python Version: Python 3

Additional context
Add any other context about the problem here.

Adding Carriage Returns to Description Field?

Is anyone aware of a way to add carriage returns to a description field from the CSV using "Create Assignments From CSV"? using \n in the CSV does not work. I'm tempted to try closing the string by placing a double quote but i'm not sure how the python interpreter would read that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.