Comments (8)
Can you try using "Flush" as the Type instead of 2? Does that resolve it?
We changed the script to expect the string value of the assignment type, but looks like we may have missed updating a section of the readme doc for it.
from workforce-scripts.
I tried:
xField,yField,Type,Location,Dispatcher,Description,Priority,WorkOrderId,DueDate,Attachment,Worker
4232820.809,289619.8689,Flush,Flush,1,Flush,None,1,01/31/2019,,1
4232820.809,289619.8689,Flush,Flush,1,Flush,None,2,01/31/2019,,1
And it returned the same error. Do I need to add double quotes to the types?
from workforce-scripts.
I forgot to mention that I'm working on the enterprise version of workforce, so I'm not sure if that might be a factor.
from workforce-scripts.
@kawikakanaka The issue is in the Python API Module. I recently made an update and it appears to have caused a slight regression. We should be able to work around this in the script, I'll see if I can push a fix for it.
from workforce-scripts.
@kawikakanaka I pushed a bug fix directly to the master branch. If you pull down the latest changes I believe it should work:
Test with:
xField,yField,Type,Location,Dispatcher,Description,Priority,WorkOrderId,DueDate,Attachment,Worker
4232820.809,289619.8689,Flush,Flush,aaron_nitro,Flush,None,1,01/31/2019,,aaron_nitro
4232820.809,289619.8689,Flush,Flush,aaron_nitro,Flush,None,2,01/31/2019,,aaron_nitro
-csv-file "../sample_data/repro_data.csv" -u <username> -p <password> -org "https://<org>.maps.arcgis.com" -project-id "e3e72afa819d4e4a85f89ec62faff1ba" -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 "dev2018.log" -worker-field "Worker" -timezone "US/Eastern" --skip-ssl-verification -date-format "%m/%d/%Y"
Note the scripts currently expect the username of the worker/dispatcher (not the id). We changed this so you don't have look up the ids anymore.
from workforce-scripts.
It's working now! Thanks! The only problem I had was that I couldn't use the same user as a dispatcher and a worker even though that user is added into the project under both categories.
from workforce-scripts.
@kawikakanaka nice!
I can't reproduce the issue with the user being the same as the dispatcher though. Same CSV as above works for me using myself as the dispatcher and worker (also tried another user).
from workforce-scripts.
Closing due to inactivity and because the original issue was resolved.
from workforce-scripts.
Related Issues (20)
- Service name already exists; misreported error, perhaps '&' HOT 3
- How to migrate completed assignments? HOT 1
- Handle_json_error HOT 2
- Type Error: 'NoneType' Object is not subscriptable HOT 1
- Authentication fails when using Enterprise login HOT 4
- Unknown object [OBJ] causes export_assignments_to_csv.py script to fail HOT 3
- Copy assignments does not copy feature service attachments HOT 3
- Will assign assignments based on point features HOT 2
- Exceptions on migrate_assignments.py HOT 2
- AssignmentType shows GUID rather than text Alias in ArcGIS Pro HOT 5
- Assignment Migration - Attachments Failing HOT 3
- Automation needed features HOT 1
- Do scripts work with New WorkForce? HOT 10
- Export assignment to CSV is still using arrow instead of pendulum
- Cannot execute create_assignments_from_csv due to Type error HOT 4
- Can't Assign Work: ValidationError: Assignment must have geometry HOT 4
- assignementread field doesn't exist HOT 1
- Getting KeyError as "assignments" when using workforce with geoprocessing tool. HOT 6
- Not letting worker finish assignment if worker is not nearby assignment HOT 2
- Optimally Creating and Assigning Work Orders Based on Routes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workforce-scripts.