Giter Site home page Giter Site logo

Invalid Assignment Type about workforce-scripts HOT 8 CLOSED

esri avatar esri commented on June 12, 2024
Invalid Assignment Type

from workforce-scripts.

Comments (8)

apulverizer avatar apulverizer commented on June 12, 2024

@kawikakanaka

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.

kawikakanaka avatar kawikakanaka commented on June 12, 2024

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.

kawikakanaka avatar kawikakanaka commented on June 12, 2024

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.

apulverizer avatar apulverizer commented on June 12, 2024

@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.

apulverizer avatar apulverizer commented on June 12, 2024

@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.

kawikakanaka avatar kawikakanaka commented on June 12, 2024

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.

apulverizer avatar apulverizer commented on June 12, 2024

@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.

apulverizer avatar apulverizer commented on June 12, 2024

Closing due to inactivity and because the original issue was resolved.

from workforce-scripts.

Related Issues (20)

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.