title: TFS Api not giving custom states in a customized Process Template on Dev Azure
body: <p>I have added a custom state in a Scrum Process Template but API is not giving newly added state until I create a new project based on that customized process template.</p>
  <p><a href="https://i.stack.imgur.com/r37UG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r37UG.png" alt="enter image description here" /></a></p>
  <p><strong>Every time I have to create project as a resolution to resolve this issue. What can I do to fix this issue?</strong></p>
  <pre><code>WorkItemStore workItemStore = this.tfsTeamProjectCollection.GetService&lt;WorkItemStore&gt;();
  
              int projectConunt = workItemStore.Projects.Count;
  
              for (int i = 0; i &lt; projectConunt; i++)
              {
                  WorkItemTypeCollection workItemTypeCollection = workItemStore.Projects[i].WorkItemTypes;
  
                  for (int j = 0; j &lt; workItemTypeCollection.Count; j++)
                  {
                      string workitemType = workItemTypeCollection[j].Name;
  
                      for (int k = 0; k &lt; workItemTypeCollection[j].FieldDefinitions.Count; k++)
                      {
                          Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinition fieldDefinition =
                              workItemTypeCollection[j].FieldDefinitions[k];
                         
                          if (filedRefName == fieldDefinition.ReferenceName)
                          {
                              List&lt;string&gt; allowedValues = new List&lt;string&gt;();
  
                              foreach (var allowedValue in fieldDefinition.AllowedValues)
                              {
                                  allowedValues.Add(allowedValue.ToString());
                              }
  
                              WorkItemFieldsInfo workItemFieldInfo = workItemFieldsInfo.Find(st =&gt; st.Type == workitemType);
  
                              if (workItemFieldInfo == null)
                              {
                                  workItemFieldsInfo.Add(new WorkItemFieldsInfo()
                                  {
                                      Type = workitemType,
                                      AllowedValues = allowedValues
                                  });
                              }
                              else
                              {
                                  List&lt;string&gt; unionFields = workItemFieldInfo.AllowedValues.Union(allowedValues).ToList();
                                  workItemFieldInfo.AllowedValues = unionFields;
                              }
  
                              break;
                          }
                      }
                  }
              }
  </code></pre>