Targetprocess

The Targetprocess Developer Hub

Welcome to the Targetprocess developer hub. Here you'll find comprehensive guides and documentation to help you start working with Targetprocess as quickly as possible and support you if you get stuck. Let's jump right in!

Docs

System custom fields in Targetprocess 3.11.6

Starting with Targetprocess version 3.11.6 you can mark a custom field as System:

The query to update a system custom field will be exactly the same as for a regular custom field, but it has to be run on behalf of System user:

POST to /api/v1/userstories/3347?token=[token]

{
  CustomFields:
	[
      {
        Name:"External ID",
        Value:"123" 
      }
	]
}
<Error>
  <Status>BadRequest</Status>
  <Message>Value of system custom field External ID can be set only by System User or system activities (e.g. metrics).</Message>
  <Type>Presentational</Type>
  <Details>Tp.Integration.Common.Exceptions.Dtos.PresentationExceptionDetails</Details>
  <ErrorId>a2103edd-1c11-4a07-94e3-2cb0e0b9a77e</ErrorId>
</Error>
<UserStory ResourceType="UserStory" Id="3347" Name="Brainstorm Blogs page">
  <Description nil="true" />
  <StartDate nil="true" />
  <EndDate nil="true" />
  <CreateDate>2016-03-07T00:00:00</CreateDate>
  <ModifyDate>2017-08-18T17:48:20</ModifyDate>
  <LastCommentDate nil="true" />
  <Tags></Tags>
  <NumericPriority>2391</NumericPriority>
  <Effort>19.0000</Effort>
  <EffortCompleted>0.0000</EffortCompleted>
  <EffortToDo>19.0000</EffortToDo>
  <Progress>0.0000</Progress>
  <TimeSpent>0.0000</TimeSpent>
  <TimeRemain>0.0000</TimeRemain>
  <LastStateChangeDate>2017-03-04T15:14:00</LastStateChangeDate>
  <PlannedStartDate nil="true" />
  <PlannedEndDate nil="true" />
  <InitialEstimate>19.0000</InitialEstimate>
  <Units>pt</Units>
  <EntityType ResourceType="EntityType" Id="4" Name="UserStory" />
  <Project ResourceType="Project" Id="1839" Name="Core Development">
    <Process ResourceType="Process" Id="3" Name="Work Process" />
  </Project>
  <LastEditor ResourceType="GeneralUser" Id="2">
    <FirstName>Target</FirstName>
    <LastName>Process</LastName>
    <Login>System</Login>
  </LastEditor>
  <Owner ResourceType="GeneralUser" Id="2">
    <FirstName>Target</FirstName>
    <LastName>Process</LastName>
    <Login>System</Login>
  </Owner>
  <LastCommentedUser nil="true" />
  <LinkedTestPlan nil="true" />
  <Release nil="true" />
  <Iteration nil="true" />
  <TeamIteration nil="true" />
  <Team nil="true" />
  <Priority ResourceType="Priority" Id="2" Name="High">
    <Importance>2</Importance>
  </Priority>
  <EntityState ResourceType="EntityState" Id="73" Name="Open">
    <NumericPriority>73</NumericPriority>
  </EntityState>
  <ResponsibleTeam nil="true" />
  <Feature ResourceType="Feature" Id="3341" Name="Support Portal integration" />
  <CustomFields>
    <Field Type="Money">
      <Name>Cost</Name>
      <Value>60.00</Value>
    </Field>
    <Field Type="Number">
      <Name>External ID</Name>
      <Value>123.00</Value>
    </Field>
  </CustomFields>
</UserStory>

You can get a token of System user by performing GET /api/v1/Authentication?login=system
More details at https://dev.targetprocess.com/docs/authentication#section-token-authentication