*********************************************************
* Fusion Online CSV Download Tool                       *
* Version 15.4                                          *
* Copyright (c) by ProChain Solutions, Inc.             *
* All rights reserved.                                  *
*********************************************************

The Fusion Online CSV Download Tool is a command-line executable that connects to the Fusion API and allows you to download data in CSV format. Open a command prompt and run ProChain.Tools.CsvDownload.cmd.exe for more information. The tool supports the download of tasks, projects, users, project history, endpoints, task neighbors (links), impact chain, task history, and checklists.

You can specify all parameters directly from the command-line, or you can use a JSON file to supply the parameters to the tool.

Two example batch files and an example JSON file are also available in this folder:

	- DownloadTasks.bat		Downloads the task history for the specfied task
	- DownloadFromJsonInput.bat	Downloads a CSV using parameters specfied in a separate JSON file
	- DownloadTasks.json		Example JSON file for providing parameters to the download tool

Tool Options
============

-h,      --help                                   Display this help
-hd,     --help-data                              Display help for the data parameter
-v,      --version                                Display the version of application
-s,      --server [value]                         Sets server url (Required)
-u,      --username [value]                       Sets auth username (Required)
-p,      --password [value]                       Sets auth password (Required)
-o,      --output-file [value]                    Path to output csv file
-i,      --input [value]                          Path to input json file
         --tasks                                  Download tasks
         --projects                               Download projects
         --users                                  Download users
         --project-history [project-id-or-key]    Download project history with provided id
         --endpoints [task-id-or-key]             Download endpoints with provided id
         --task-neighbors [task-id-or-key]        Download task neighbors with provided id
         --impactchain [task-id-or-key]           Download impactchain with provided id
         --task-history [task-id-or-key]          Download task history with provided id
         --checklist [task-id-or-key]             Download checklist with provided id
-d,      --data [value]                           Url data parameters separated by &. Example: maxResults=10&viewId=1

Examples:

-s https://tenant-name.prochain.app -p my-secret -u my-user --tasks -o result.csv
-i DownloadTasks.json


Data parameters for tasks:
==========================

    maxResults                  max download entities
    skip                        skip download entities
    viewId                      view id. Use filters from this view
    dataFields                  list of task data fields to load. Available values:[Organization,Indicators,StatusComment,Notes,AssignedUser,ProjectedDates,ActualDates,AsapDates,ScheduledDates,AssignmentDates,Program,Endpoint,SummaryTask,TaskManagers,TaskGroups,ResourceAssignments,LastUpdateInfo,TaskLinkPredecessors,TaskLinkSuccessors,SubprojectReference,NptViewPermission,ExpandedDates]
    sorts                       list of sorts by field. Max 3 values. Available values:[TaskState,TaskName,Duration,AssignedUser,StatusComment,BlockedReasonCode,LastUpdatedDate,AssignmentImpact,EndPointTask,IsNoLoad,ActualStartDate,ActualFinishDate,CriticalityRatio,EligibleDate,ASAPStartDate,ASAPFinishDate,ProjectName,ProjectedStartDate,ProjectedFinishDate,AssignmentStartDate,AssignmentFinishDate,ViewOrderNumber,TaskUid,TaskManagers,Resources,SummaryTask,TaskGroups,Program,PercentComplete,ScheduledStartDate,ScheduledEndDate,ResourceDependencies,AssignmentDelay,UpdatedBy,Criticality,LinkType,AssignmentScheduleOrder,AssignmentPriority,Organization,TaskKey,ProjectAbbreviation,CustomField,ExpandedStartDate,ExpandedFinishDate,SchedulingPriority,SchedulingPriorityDesc,ExpandedFinishDateDesc,ExpandedStartDateDesc,CustomFieldDesc,ProjectAbbreviationDesc,TaskKeyDesc,OrganizationDesc,AssignmentPriorityDesc,AssignmentScheduleOrderDesc,LinkTypeDesc,CriticalityDesc,UpdatedByDesc,AssignmentDelayDesc,ResourceDependenciesDesc,ScheduledEndDateDesc,ScheduledStartDateDesc,PercentCompleteDesc,ProgramDesc,TaskGroupsDesc,SummaryTaskDesc,ResourcesDesc,TaskManagersDesc,TaskUidDesc,ViewOrderNumberDesc,AssignmentFinishDateDesc,AssignmentStartDateDesc,ProjectedFinishDateDesc,ProjectedStartDateDesc,ProjectNameDesc,ASAPFinishDateDesc,ASAPStartDateDesc,EligibleDateDesc,CriticalityRatioDesc,ActualFinishDateDesc,ActualStartDateDesc,IsNoLoadDesc,EndPointTaskDesc,AssignmentImpactDesc,LastUpdatedDateDesc,BlockedReasonCodeDesc,StatusCommentDesc,AssignedUserDesc,DurationDesc,TaskNameDesc,TaskStateDesc]
    searchText                  filter by task name
    hasChecklist                filter by has checklist  [true/false],
    eligibility                 list of eligible filters. Available values:[Eligible,NotEligible]
    taskTypes                   list of task types filters. Available values:[Standard,ChecklistTask,Milestone,Summary,NonProjectStandard,NonProjectChecklistTask,SubprojectReferenceTask]
    taskStates                  list of task states filters. Available values:[NotStarted,Started,Completed,Focus,Blocked]
    organizationIds             list of organization ids
    projectGroupIds             list of project group ids
    projectManagerIds           list of manager ids
    projectIds                  list of project ids
    resourceNames               list of resource names
    resourceGroupIds            list of resource group ids
    resourceManagerIds          list of resource manager ids
    taskGroupIds                list of task group ids
    taskManagerIds              list of task manager ids
    assignedUserIds             list of assigned user ids
    updaterUserIds              list of update user ids
    includeAllAssignments       include all assignments [true/false]
    hasAssignmentPriority       filter by has assignment priority [true/false]
    summaryTaskId               summary task id
    isPendingScheduleChange     filter by is pending schedule change [true/false]
    customFieldIds              list of custom field ids
    customSort                  list of custom sort ids

Data parameters for projects:
=============================

    maxResults                  max download entities
    skip                        skip download entities
    viewId                      view id. Use filters from this view
    permission                  filter by permission, Available values:[None,ViewName,View,Update]
    dataFields                  list of project data fields to load. Available values:[ProjectManagers,ProjectGroups,Notes,Program,LastUpdateInfo,CredibilityProfile,PriorityEndpoint,BufferedEndpointsCount,UnbufferedEndpointsCount,TotalTaskCount,EligibleTaskCount,PendingDurationChangeTaskCount,NeedingUpdateTaskCount,CriticalTaskCount,RecentUpdateTaskCount,ProjectReferences,CredibilityScore,SelectedCustomFieldIds,SummaryTaskCount,DurationOptions,LatestStatusPoint,BacklogTaskCount]
    sorts                       list of sorts by field. Available values:[ProjectName,ProjectState,StatusDate,FinishDate,LastUpdateDate,PriorityEndpoint,AddDate,CheckInDate,ProjectType,Program,ProjectManagers,ProjectGroups,ProjectId,CredibilityScore,Organization,ProjectAbbreviation,CustomField,Endpoints,UpdateComment,CriticalityRatio,LandingZoneStartDate,LandingZoneFinishDate,EndpointProjectedFinishDate,EndpointProjectedFinishDateDesc,LandingZoneFinishDateDesc,LandingZoneStartDateDesc,CriticalityRatioDesc,UpdateCommentDesc,EndpointsDesc,CustomFieldDesc,ProjectAbbreviationDesc,OrganizationDesc,CredibilityScoreDesc,ProjectIdDesc,ProjectGroupsDesc,ProjectManagersDesc,ProgramDesc,ProjectTypeDesc,CheckInDateDesc,AddDateDesc,PriorityEndpointDesc,LastUpdateDateDesc,FinishDateDesc,StatusDateDesc,ProjectStateDesc,ProjectNameDesc]
    searchText                  filter by project name
    isProjectCompleted          filter by project complete [true/false]
    hasUpdateError              filter by has update error [true/false]
    organizationIds             list of organization ids
    projectGroupIds             list of project group ids
    projectManagerIds           list of manager ids
    projectIds                  list of project ids
    projectStart                filter by horizon. Available values:[OneDay,TwoDays,ThreeDays,FourDays,OneWeek,TwoWeeks,ThreeWeeks,OneMonth,TwoMonths,ThreeMonths,FourMonths,SixMonths,NineMonths,OneYear,TwoYears,ThreeYears]
    projectStates               list of project states. Available values:[Ok,LockedByUser,ChangeSubmitted,RunningUpdate,Deactivated,DeactivatedPendingUpdate,LockedBySystem,OrphanedSubproject,UnreferencedSubproject]
    customFieldIds              list of custom field ids
    customSort                  list of custom sort ids

Data parameters for project history:
====================================

    maxResults                  max download entities
    skip                        skip download entities
    searchText                  filter by project name
    sortUpdateDateAscending     order by update date [true/false]

Data parameters for users:
==========================

    maxResults                  max download entities
    skip                        skip download entities
    searchText                  filter by user name
    userIds                     list of user ids
    userGroupIds                list of user group ids
    viewId                      view id. Use filters from this view
    dataFields                  list of user data fields to load. Available values:[AssignmentLoadPercent,MaxAssignmentImpact,AssignedTaskCount,AvailableDuration,TotalAssignedTaskCount,CurrentTask,AssignedTasks]
    taskDataFields              list of task data fields to load. Available values:[Organization,Indicators,StatusComment,Notes,AssignedUser,ProjectedDates,ActualDates,AsapDates,ScheduledDates,AssignmentDates,Program,Endpoint,SummaryTask,TaskManagers,TaskGroups,ResourceAssignments,LastUpdateInfo,TaskLinkPredecessors,TaskLinkSuccessors,SubprojectReference,NptViewPermission,ExpandedDates]
    sort                        list of sorts by field. Available values:[UserFullName,Department,Role,Organization,CurrentTaskProjectName,CurrentTaskState,CurrentTaskName,CurrentTaskCriticality,CurrentTaskLastUpdateDate,CurrentTaskAssignmentImpact,CurrentTaskAssignmentDelay,CurrentTaskDuration,CurrentTaskStatusComment,CurrentTaskBlockedReasonCode,CurrentTaskProjectedStartDate,CurrentTaskProjectedFinishDate,CurrentTaskAssignmentStartDate,CurrentTaskAssignmentFinishDate,CurrentTaskKey,AssignmentLoadPercent,MaxAssignmentImpact,AssignedTaskCount,AvailableDuration,TotalAssignedTaskCount,TotalAssignedTaskCountDesc,AvailableDurationDesc,AssignedTaskCountDesc,MaxAssignmentImpactDesc,AssignmentLoadPercentDesc,CurrentTaskKeyDesc,CurrentTaskAssignmentFinishDateDesc,CurrentTaskAssignmentStartDateDesc,CurrentTaskProjectedFinishDateDesc,CurrentTaskProjectedStartDateDesc,CurrentTaskBlockedReasonCodeDesc,CurrentTaskStatusCommentDesc,CurrentTaskDurationDesc,CurrentTaskAssignmentDelayDesc,CurrentTaskAssignmentImpactDesc,CurrentTaskLastUpdateDateDesc,CurrentTaskCriticalityDesc,CurrentTaskNameDesc,CurrentTaskStateDesc,CurrentTaskProjectNameDesc,OrganizationDesc,RoleDesc,DepartmentDesc,UserFullNameDesc]
    assignmentStart             filter by assignment start. Available values:[Default,TwoWeeks,OneWeek,OneMonth,TwoMonths,ThreeMonths,FourMonths,SixMonths,NineMonths,OneYear]

Data parameters for endpoints:
==============================

    maxResults                  max download entities
    skip                        skip download entities
    viewId                      view id. Use filters from this view
    dataFields                  list of endpoint data fields to load. Available values:[Buffer,TrendIndicator,ProjectedFinishDate,Project,BufferVersions,BufferVersion,BufferVariabilityProfilePoints,LatestStatusPoint,CriticalityRatio]
    projectDataFields           list of project data fields to load. Available values:[ProjectManagers,ProjectGroups,Notes,Program,LastUpdateInfo,CredibilityProfile,PriorityEndpoint,BufferedEndpointsCount,UnbufferedEndpointsCount,TotalTaskCount,EligibleTaskCount,PendingDurationChangeTaskCount,NeedingUpdateTaskCount,CriticalTaskCount,RecentUpdateTaskCount,ProjectReferences,CredibilityScore,SelectedCustomFieldIds,SummaryTaskCount,DurationOptions,LatestStatusPoint,BacklogTaskCount]
    sorts                       list of sorts by field. Max 3 values. Available values:[Status,EndpointName,ChainDone,BufferEndDate,OriginalChain,ChainLeft,OriginalBuffer,ProjectName,Program,ProjectGroups,ProjectManagers,StatusDate,LastUpdateDate,ProjectId,CredibilityScore,Organization,ProjectAbbreviation,CustomField,BufferUsedInLastWeek,UpdateComment,CriticalityRatio,LandingZoneStartDate,LandingZoneFinishDate,EndpointProjectedFinishDate,EndpointPriority,EndpointPriorityDesc,EndpointProjectedFinishDateDesc,LandingZoneFinishDateDesc,LandingZoneStartDateDesc,CriticalityRatioDesc,UpdateCommentDesc,BufferUsedInLastWeekDesc,CustomFieldDesc,ProjectAbbreviationDesc,OrganizationDesc,CredibilityScoreDesc,ProjectIdDesc,LastUpdateDateDesc,StatusDateDesc,ProjectManagersDesc,ProjectGroupsDesc,ProgramDesc,ProjectNameDesc,OriginalBufferDesc,ChainLeftDesc,OriginalChainDesc,BufferEndDateDesc,ChainDoneDesc,EndpointNameDesc,StatusDesc]
    searchText                  filter by endpoint name
    isProjectCompleted          filter by project complete [true/false]
    hasUpdateError              filter by has update error [true/false]
    isPriorityEndpoint          filter by is priority endpoint [true/false]
    organizationIds             list of organization ids
    projectGroupIds             list of project group ids
    projectManagerIds           list of manager ids
    projectIds                  list of project ids
    projectStart                filter by project start. Available values:[OneDay,TwoDays,ThreeDays,FourDays,OneWeek,TwoWeeks,ThreeWeeks,OneMonth,TwoMonths,ThreeMonths,FourMonths,SixMonths,NineMonths,OneYear,TwoYears,ThreeYears]
    projectStates               list of project states. Available values:[Ok,LockedByUser,ChangeSubmitted,RunningUpdate,Deactivated,DeactivatedPendingUpdate,LockedBySystem,OrphanedSubproject,UnreferencedSubproject]
    bufferStatuses              list of buffer statuses. Available values:[Unbuffered,Red,Yellow,Green,Completed]
    customFieldIds              list of custom field ids
    customSort                  list of custom sort ids

Data parameters for task neighbors:
===================================

    maxResults                  max download entities
    skip                        skip download entities
    dataFields                  list of task data fields to load. Available values:[Organization,Indicators,StatusComment,Notes,AssignedUser,ProjectedDates,ActualDates,AsapDates,ScheduledDates,AssignmentDates,Program,Endpoint,SummaryTask,TaskManagers,TaskGroups,ResourceAssignments,LastUpdateInfo,TaskLinkPredecessors,TaskLinkSuccessors,SubprojectReference,NptViewPermission,ExpandedDates]
    sorts                       list of sorts by field. Max 3 values. Available values:[TaskState,TaskName,Duration,AssignedUser,StatusComment,BlockedReasonCode,LastUpdatedDate,AssignmentImpact,EndPointTask,IsNoLoad,ActualStartDate,ActualFinishDate,CriticalityRatio,EligibleDate,ASAPStartDate,ASAPFinishDate,ProjectName,ProjectedStartDate,ProjectedFinishDate,AssignmentStartDate,AssignmentFinishDate,ViewOrderNumber,TaskUid,TaskManagers,Resources,SummaryTask,TaskGroups,Program,PercentComplete,ScheduledStartDate,ScheduledEndDate,ResourceDependencies,AssignmentDelay,UpdatedBy,Criticality,LinkType,AssignmentScheduleOrder,AssignmentPriority,Organization,TaskKey,ProjectAbbreviation,CustomField,ExpandedStartDate,ExpandedFinishDate,SchedulingPriority,SchedulingPriorityDesc,ExpandedFinishDateDesc,ExpandedStartDateDesc,CustomFieldDesc,ProjectAbbreviationDesc,TaskKeyDesc,OrganizationDesc,AssignmentPriorityDesc,AssignmentScheduleOrderDesc,LinkTypeDesc,CriticalityDesc,UpdatedByDesc,AssignmentDelayDesc,ResourceDependenciesDesc,ScheduledEndDateDesc,ScheduledStartDateDesc,PercentCompleteDesc,ProgramDesc,TaskGroupsDesc,SummaryTaskDesc,ResourcesDesc,TaskManagersDesc,TaskUidDesc,ViewOrderNumberDesc,AssignmentFinishDateDesc,AssignmentStartDateDesc,ProjectedFinishDateDesc,ProjectedStartDateDesc,ProjectNameDesc,ASAPFinishDateDesc,ASAPStartDateDesc,EligibleDateDesc,CriticalityRatioDesc,ActualFinishDateDesc,ActualStartDateDesc,IsNoLoadDesc,EndPointTaskDesc,AssignmentImpactDesc,LastUpdatedDateDesc,BlockedReasonCodeDesc,StatusCommentDesc,AssignedUserDesc,DurationDesc,TaskNameDesc,TaskStateDesc]
    customFieldIds              list of custom field ids
    customSort                  list of custom sort ids

Data parameters for impactchain:
================================

    maxResults                  max download entities
    skip                        skip download entities
    searchText                  filter by task name
    sensitivity                 filter by sensitivity. Available values:[None,OneDay,TwoDays,ThreeDays,FourDays,OneWeek,TwoWeeks,ThreeWeeks,FourWeeks,Minimum,Infinite]
    dataFields                  list of task data fields to load. Available values:[Organization,Indicators,StatusComment,Notes,AssignedUser,ProjectedDates,ActualDates,AsapDates,ScheduledDates,AssignmentDates,Program,Endpoint,SummaryTask,TaskManagers,TaskGroups,ResourceAssignments,LastUpdateInfo,TaskLinkPredecessors,TaskLinkSuccessors,SubprojectReference,NptViewPermission,ExpandedDates]
    horizon                     filter by horizon. Available values:[Default,TwoWeeks,OneWeek,OneMonth,TwoMonths,ThreeMonths,FourMonths,SixMonths,NineMonths,OneYear]
    groupByImpact               group by impact [true/false]
    customFieldIds              list of custom field ids

Data parameters for task history:
=================================

    maxResults                  max download entities
    skip                        skip download entities
    updateSource                filter by update source. Available values:[Fusion,MicrosoftProject]
    updateType                  filter by update type. Available values:[System,User]
    sortUpdateDateAscending     sort by update date [true/false]
    historyFields               load history fields. Available values:[None,TaskName,TaskUID,Assignee,NoLoad,UrgentDate,TaskState,BlockedReason,Criticality,CriticalIn,Duration,StatusComment,TaskGroups,TaskManagers,Resources,Eligible,EligibleDate,ProjectedStart,ProjectedFinish,Constraint,ActualStart,ActualFinish,ASAPStart,ASAPFinish,ScheduledStart,ScheduledFinish,Predecessors,Successors,CriticalityRatio,CumulativeBuffer,CumulativeIntegrationRisk,SubProject,SubTaskUID,IsEndpoint,SchedulingPriority,ChecklistIndex,Notes,ChecklistState,CustomField,IsDurationAutoCalculatedFromChecklist]

Data parameters for checklist:
==============================

    dataFields                  list of task data fields to load. Available values:[Organization,Indicators,StatusComment,Notes,AssignedUser,ProjectedDates,ActualDates,AsapDates,ScheduledDates,AssignmentDates,Program,Endpoint,SummaryTask,TaskManagers,TaskGroups,ResourceAssignments,LastUpdateInfo,TaskLinkPredecessors,TaskLinkSuccessors,SubprojectReference,NptViewPermission,ExpandedDates]
    customFieldIds              list of custom field ids
