Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ You can then clone the repository to your development environment and start work
- You should write unit test before you start writing the function/method/class. This way you can decide on how
the functionality of your code should be.
- You can use the existing class as template to create your own. This way we maintain consistent across the library.
- Maintain the versions of different endpoints in Versions.java class
- Maintain the versions of different endpoints in the [ApiVersions.java](../azd/src/main/java/org/azd/common/ApiVersion.java) class
- Manage all the types under `types` package and define your own if necessary
- Code your function and write help.
- Update `_unitTest.json` file under `test` package with your own organisation name, project and personal access token
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# 8.0.0

**Major breaking change**
- Fixed issue:
- Fixed issues:
- workitemsbatch used the wrong api version.
- Issue: [invoking at any of the builders with the wrong organization causes an AzException #110](https://github.com/hkarthik7/azure-devops-java-sdk/issues/110)
- The above change introduces `AzDException` in [AzDServiceClient.java](https://github.com/hkarthik7/azure-devops-java-sdk/blob/main/azd/src/main/java/org/azd/serviceclient/AzDServiceClient.java)
and it's implementation class [BaseServiceClient.java](https://github.com/hkarthik7/azure-devops-java-sdk/blob/main/azd/src/main/java/org/azd/serviceclient/BaseServiceClient.java).
Expand Down
1 change: 1 addition & 0 deletions azd/src/main/java/org/azd/common/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public abstract class ApiVersion {
public static final String WORK_ITEM_WIQL = "7.2-preview.2";
public static final String WORK_ITEM_CLASSIFICATION_NODES = "7.2-preview.2";
public static final String WORK_ITEM_ATTACHMENT = "7.2-preview.4";
public static final String WORK_ITEM_BATCH = "7.2-preview.1";
public static final String MAVEN = "7.2-preview.1";
public static final String UPACK = "7.2-preview.1";
}
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ public WorkItem getTemplate(String type, Consumer<GetRequestConfiguration> reque
*/
public WorkItemList getBatch(WorkItemBatchGetRequest workItemBatchGetRequest) throws AzDException {
return builder()
.apiVersion(ApiVersion.WORK_ITEM_BATCH)
.location("908509b6-4248-4475-a1cd-829139ba419f")
.POST(workItemBatchGetRequest)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,11 @@ public void shouldRetainUnauthorizedStatusInResponseHandlerWhenProjectIsAbsent()
HttpStatusCode.OK, response.getStatusCode());
}
}

@Test
public void shouldGetItemsViaBatch() throws AzDException{
WorkItemBatchGetRequest batchRequest = new WorkItemBatchGetRequest();
batchRequest.ids = List.of(1);
w.workItems().getBatch(batchRequest);
}
}
Loading