Skip to content

Commit

Permalink
Merge pull request #157 from PaulARoy/main
Browse files Browse the repository at this point in the history
fix: support spaces between commas of worktypes
  • Loading branch information
BlueBasher authored Nov 26, 2024
2 parents 0404ea8 + d11f5a5 commit 7fa2578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WorkItemUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ async function getQueryWorkItemsRefs(workItemTrackingClient: IWorkItemTrackingAp

async function updateWorkItem(workItemTrackingClient: IWorkItemTrackingApi, workItem: WorkItem, settings: Settings): Promise<boolean> {
tl.debug('Updating WorkItem: ' + workItem.id);
if (settings.workItemType.split(',').indexOf(workItem.fields['System.WorkItemType']) >= 0) {
if (settings.workItemCurrentState && settings.workItemCurrentState !== '' && settings.workItemCurrentState.split(',').indexOf(workItem.fields['System.State']) === -1) {
if (settings.workItemType.split(',').map(s => s.trim()).indexOf(workItem.fields['System.WorkItemType']) >= 0) {
if (settings.workItemCurrentState && settings.workItemCurrentState !== '' && settings.workItemCurrentState.split(',').map(s => s.trim()).indexOf(workItem.fields['System.State']) === -1) {
console.log('Skipped WorkItem: ' + workItem.id + ' State: "' + workItem.fields['System.State'] + '" => Only updating if state in "' + settings.workItemCurrentState) + '"';
return false;
}
Expand Down

0 comments on commit 7fa2578

Please sign in to comment.