Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not updating multiple Work Items in the same release #66

Open
jwar-gilson opened this issue May 28, 2020 · 11 comments
Open

Not updating multiple Work Items in the same release #66

jwar-gilson opened this issue May 28, 2020 · 11 comments

Comments

@jwar-gilson
Copy link

jwar-gilson commented May 28, 2020

Can you provide some insight why my WorkItemUpdater is not updating multiple work items but just one every time?

Here are my settings configured:
image

Here is the log in VSTS showing one work item being updated. There were TWO work items in the release:
image

@jwar-gilson
Copy link
Author

Created another Release today that had two related WITs attached. Below is the debug log (minus some sensitive information related to my company/employees (used [BLAH BLAH BLAH])):

Work Items

image

Debug logs

2020-05-29T15:53:38.4913145Z ##[debug]Evaluating: succeeded()
2020-05-29T15:53:38.4914011Z ##[debug]Evaluating succeeded:
2020-05-29T15:53:38.4915063Z ##[debug]=> True
2020-05-29T15:53:38.4915594Z ##[debug]Result: True
2020-05-29T15:53:38.4916143Z ##[section]Starting: WorkItem Updater
2020-05-29T15:53:38.5024779Z ==============================================================================
2020-05-29T15:53:38.5025120Z Task         : WorkItem Updater
2020-05-29T15:53:38.5025422Z Description  : This task adds functionality to update WorkItems during a Build or Release.
2020-05-29T15:53:38.5025741Z Version      : 2.5.797
2020-05-29T15:53:38.5025931Z Author       : Blue Basher
2020-05-29T15:53:38.5026929Z Help         : 
2020-05-29T15:53:38.5027185Z ==============================================================================
2020-05-29T15:53:38.7205577Z ##[debug]agent.TempDirectory=d:\a\_temp
2020-05-29T15:53:38.7238096Z ##[debug]loading inputs and endpoints
2020-05-29T15:53:38.7248568Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-05-29T15:53:38.7263417Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-05-29T15:53:38.7267135Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-05-29T15:53:38.7269968Z ##[debug]loading INPUT_ALLWORKITEMSSINCELASTRELEASE
2020-05-29T15:53:38.7274350Z ##[debug]loading INPUT_ASSIGNEDTO
2020-05-29T15:53:38.7276329Z ##[debug]loading INPUT_BYPASSRULES
2020-05-29T15:53:38.7279812Z ##[debug]loading INPUT_FAILTASKIFNOWORKITEMSAVAILABLE
2020-05-29T15:53:38.7299312Z ##[debug]loading INPUT_LINKBUILD
2020-05-29T15:53:38.7299908Z ##[debug]loading INPUT_UPDATEASSIGNEDTO
2020-05-29T15:53:38.7300343Z ##[debug]loading INPUT_UPDATEASSIGNEDTOWITH
2020-05-29T15:53:38.7300750Z ##[debug]loading INPUT_WORKITEMCURRENTSTATE
2020-05-29T15:53:38.7301136Z ##[debug]loading INPUT_WORKITEMDONE
2020-05-29T15:53:38.7301544Z ##[debug]loading INPUT_WORKITEMKANBANSTATE
2020-05-29T15:53:38.7304116Z ##[debug]loading INPUT_WORKITEMSSOURCE
2020-05-29T15:53:38.7314303Z ##[debug]loading INPUT_WORKITEMTYPE
2020-05-29T15:53:38.7319659Z ##[debug]loading SECRET_AZURE_APP_SERVICE_KUDU_PRODUCTION_PASSWORD
2020-05-29T15:53:38.7326414Z ##[debug]loaded 16
2020-05-29T15:53:38.7350267Z ##[debug]Agent.ProxyUrl=undefined
2020-05-29T15:53:38.7352003Z ##[debug]Agent.CAInfo=undefined
2020-05-29T15:53:38.7352496Z ##[debug]Agent.ClientCert=undefined
2020-05-29T15:53:38.7352898Z ##[debug]Agent.SkipCertValidation=undefined
2020-05-29T15:53:38.9168872Z ##[debug]System.TeamFoundationCollectionUri=https://[BLAH BLAH BLAH.COM]/
2020-05-29T15:53:38.9178872Z ##[debug]SYSTEMVSSCONNECTION auth param AccessToken = ***
2020-05-29T15:53:38.9208207Z ##[debug]Build.BuildId=2797
2020-05-29T15:53:38.9208851Z ##[debug]System.TeamProjectId=[BLAH BLAH BLAH]
2020-05-29T15:53:38.9209331Z ##[debug]Build.RequestedFor=[BLAH BLAH BLAH]
2020-05-29T15:53:38.9213443Z ##[debug]workitemsSource=Build
2020-05-29T15:53:38.9213998Z ##[debug]workitemsSourceQuery=null
2020-05-29T15:53:38.9216450Z ##[debug]allWorkItemsSinceLastRelease=false
2020-05-29T15:53:38.9218841Z ##[debug]workItemType=Bug,User Story
2020-05-29T15:53:38.9219309Z ##[debug]workItemState=null
2020-05-29T15:53:38.9220610Z ##[debug]workItemCurrentState=Active
2020-05-29T15:53:38.9221079Z ##[debug]workItemKanbanLane=null
2020-05-29T15:53:38.9297108Z ##[debug]workItemKanbanState=Test
2020-05-29T15:53:38.9298066Z ##[debug]workItemDone=false
2020-05-29T15:53:38.9298813Z ##[debug]linkBuild=true
2020-05-29T15:53:38.9299658Z ##[debug]updateAssignedTo=Always
2020-05-29T15:53:38.9300284Z ##[debug]updateAssignedToWith=FixedUser
2020-05-29T15:53:38.9300739Z ##[debug]assignedTo=[BLAH BLAH BLAH]
2020-05-29T15:53:38.9301163Z ##[debug]updateFields=null
2020-05-29T15:53:38.9301571Z ##[debug]bypassRules=false
2020-05-29T15:53:38.9302498Z ##[debug]failTaskIfNoWorkItemsAvailable=false
2020-05-29T15:53:38.9303300Z ##[debug]addTags=null
2020-05-29T15:53:38.9306419Z ##[debug]removeTags=null
2020-05-29T15:53:38.9306890Z ##[debug]Release.ReleaseId=682
2020-05-29T15:53:38.9307667Z ##[debug]Release.DefinitionId=2
2020-05-29T15:53:38.9308277Z ##[debug]Release.DefinitionEnvironmentId=2
2020-05-29T15:53:38.9309091Z ##[debug]BuildId 2797
2020-05-29T15:53:38.9309834Z ##[debug]ProjectId [BLAH BLAH BLAH]
2020-05-29T15:53:38.9310255Z ##[debug]ReleaseId 682
2020-05-29T15:53:38.9310625Z ##[debug]DefinitionId 2
2020-05-29T15:53:38.9310992Z ##[debug]DefinitionEnvironmentId 2
2020-05-29T15:53:38.9311414Z ##[debug]requestedFor [BLAH BLAH BLAH]
2020-05-29T15:53:38.9312195Z ##[debug]workitemsSource Build
2020-05-29T15:53:38.9327528Z ##[debug]workitemsSourceQuery null
2020-05-29T15:53:38.9327981Z ##[debug]allWorkItemsSinceLastRelease false
2020-05-29T15:53:38.9328412Z ##[debug]workItemType Bug,User Story
2020-05-29T15:53:38.9328794Z ##[debug]WorkItemState null
2020-05-29T15:53:38.9329187Z ##[debug]workItemCurrentState Active
2020-05-29T15:53:38.9329617Z ##[debug]updateWorkItemKanbanLane null
2020-05-29T15:53:38.9330025Z ##[debug]WorkItemKanbanState Test
2020-05-29T15:53:38.9330416Z ##[debug]WorkItemDone false
2020-05-29T15:53:38.9330802Z ##[debug]updateAssignedTo Always
2020-05-29T15:53:38.9331192Z ##[debug]updateAssignedToWith FixedUser
2020-05-29T15:53:38.9331703Z ##[debug]assignedTo [BLAH BLAH BLAH]
2020-05-29T15:53:38.9332098Z ##[debug]addTags null
2020-05-29T15:53:38.9332469Z ##[debug]updateFields null
2020-05-29T15:53:38.9332842Z ##[debug]removeTags null
2020-05-29T15:53:38.9333210Z ##[debug]bypassRules false
2020-05-29T15:53:38.9333617Z ##[debug]failTaskIfNoWorkItemsAvailable false
2020-05-29T15:53:38.9334032Z ##[debug]Get WorkItemTrackingApi
2020-05-29T15:53:38.9357212Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9357835Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9358267Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9358722Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9359199Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9359616Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9360042Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9360449Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9360872Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9361287Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9361710Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9362161Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9362574Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9362994Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9363406Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:38.9363850Z (node:2548) Warning: Use Cipheriv for counter mode of aes-256-ctr
2020-05-29T15:53:39.1983575Z ##[debug]Get workItemsRefs
2020-05-29T15:53:39.1989193Z Using Build as WorkItem Source
2020-05-29T15:53:39.3905060Z ##[debug]Loop workItemsRefs
2020-05-29T15:53:39.3910558Z ##[debug]Found WorkItemRef: 5056
2020-05-29T15:53:39.6076368Z Found WorkItem: 5056
2020-05-29T15:53:39.6077220Z ##[debug]Using fixed user "[BLAH BLAH BLAH]" as assignedTo.
2020-05-29T15:53:39.6088172Z ##[debug]Updating  WorkItem: 5056
2020-05-29T15:53:39.6088646Z Updating WorkItem 5056
2020-05-29T15:53:39.6091400Z ##[debug]Found KanbanLane: 
2020-05-29T15:53:39.6092734Z ##[debug]Found KanbanColumn: WEF_38DD72CBDD224FAD9E544F9A54C6FFB8_Kanban.Column
2020-05-29T15:53:39.6093526Z ##[debug]Found KanbanColumnDone: WEF_38DD72CBDD224FAD9E544F9A54C6FFB8_Kanban.Column.Done
2020-05-29T15:53:39.6094782Z Patch: /fields/WEF_38DD72CBDD224FAD9E544F9A54C6FFB8_Kanban.Column Test
2020-05-29T15:53:39.6096666Z Linking Build 2797 to WorkItem 5056
2020-05-29T15:53:39.6097350Z Patch: /relations/- [object Object]
2020-05-29T15:53:39.6097724Z Patch: /fields/System.AssignedTo [BLAH BLAH BLAH]
2020-05-29T15:53:39.6098127Z ##[debug]Start UpdateWorkItem
2020-05-29T15:53:40.0544265Z WorkItem 5056 updated
2020-05-29T15:53:40.0545239Z ##[debug]Finished loop workItemsRefs
2020-05-29T15:53:40.0547302Z ##[debug]task result: Succeeded
2020-05-29T15:53:40.0550567Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]
2020-05-29T15:53:40.0640196Z ##[section]Finishing: WorkItem Updater

@jwar-gilson
Copy link
Author

@BlueBasher is this still an active project?

@BlueBasher
Copy link
Owner

Yes it is still active. Currently have very little time though to do any coding on it. Happy to accept any PR though.. ;)

@jwar-gilson
Copy link
Author

@BlueBasher looking at this https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get%20build%20work%20items%20refs?view=azure-devops-rest-5.1

There is a $top optional parameter and it looks like you already merged this into your latest #65 but I am not seeing it in the settings configurations for the extension. Was there a default of 1 before this was merged? Is this going to get published so we can configure it to see if this solves my issue?

@BlueBasher
Copy link
Owner

You are correct, the Access Token for publishing the extension was expired..
I updated it and the new version should now be available.

@jwar-gilson
Copy link
Author

jwar-gilson commented Jun 22, 2020

@BlueBasher Ran another release today with 4 work items and got the same results here -#66 (comment)

It only updated one work item and the workItemLimit did not fix the issue I am having.

If I knew how to run this type of project, I would love to submit a PR but never worked with VSTS extensions.

@BlueBasher
Copy link
Owner

In your screenshot it shows that it compares the release with previous deployment Release-405.
Was that your last successful deployment? If so, maybe you need to check this box "Include workitems since previously completed deployment".

@jwar-gilson
Copy link
Author

@BlueBasher I checked that box and ran a new release with two work items. None of them updated.

2020-07-09T15:45:13.4239881Z ##[debug]Get WorkItemTrackingApi
2020-07-09T15:45:13.8298863Z ##[debug]Get workItemsRefs
2020-07-09T15:45:13.8307600Z Using Release as WorkItem Source
2020-07-09T15:45:14.2693327Z ##[debug]Using Release 704 as BaseRelease for 712
2020-07-09T15:45:14.4568377Z No workitems found to update.
2020-07-09T15:45:14.4569590Z ##[debug]task result: Succeeded
2020-07-09T15:45:14.4574970Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]
2020-07-09T15:45:14.4691885Z ##[section]Finishing: WorkItem Updater

@Quent1L
Copy link

Quent1L commented Nov 24, 2023

Hi @BlueBasher, I have the same bug as the last two messages. Do you know if this bug has been fixed?

@BlueBasher
Copy link
Owner

As far as I know there should not be any bug that causes workitems not to be updated.
If something is not updated, it could be because of how the task is configured.
If the task is running in a Release Pipeline, often the checkbox "Include workitems since previously completed releases" needs to be checked (if that's what you want). DevOps itself shows workitems in the Release view based on the curernt release in comparison with the last successful Release for that specific Release Stage.

@Quent1L
Copy link

Quent1L commented Nov 24, 2023

Thanks @BlueBasher for your quick reply!

I'm trying to use your extension with Azure yaml pipelines like this :

   task: WorkItemUpdater@3
    displayName: "WorkItem Updater"
    inputs:
      workitemsSource: Build
      workItemType: Task
      updateAssignedTo: Never
      linkBuild: true
      comment: "TEST"
    continueOnError: true

When I launch my pipeline, the work item is recognised by azure but not by WorkItemUpdater :
image

##[debug]Get WorkItemTrackingApi
##[debug]Get workItemsRefs
Using Build as WorkItem Source
No workitems found to update.
##[debug]task result: Succeeded

Do you know why it doesn't work? Have I forgotten something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants