Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
491 views
in Technique[技术] by (71.8m points)

azure devops - AzureDevOps: Bug Creation with Resolved to Field and Tags Addition

I have a service to create bugs and using the below Documentation https://docs.microsoft.com/es-es/azure/devops/integrate/quickstarts/create-bug-quickstart?view=azure-devops&viewFallbackFrom=vsts

Question is that,

a. Since service account(say:abc) is creating bug, once bugs gets resolved, its getting assigned to that same service account(abc). Is here a way i can hardcode to assign to someone say:xyz while bug is getting created. Or

Is there any JsonPathOperation Path that i can use to solve this?

b. What is JsonPathOperation Path for adding the tags to the Bug?

Appreciate any help or please direct to any references

Thanks

question from:https://stackoverflow.com/questions/65944373/azuredevops-bug-creation-with-resolved-to-field-and-tags-addition

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can try to add the following code:

a.

patchDocument.Add(
    new JsonPatchOperation()
    {
        Operation = Operation.Add,
        Path = "/fields/System.AssignedTo",
        Value = "***@***.com"//Accound Name
    }
);

b.

patchDocument.Add(
    new JsonPatchOperation()
    {
        Operation = Operation.Add,
        Path = "/fields/System.Tags",
        Value = "tag"//Tag Name
    }
);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...