diff --git a/build.gradle b/build.gradle index af72b0a..37ed32b 100644 --- a/build.gradle +++ b/build.gradle @@ -40,9 +40,9 @@ dependencies { implementation("com.epam.reportportal:plugin-api") annotationProcessor 'com.epam.reportportal:plugin-api' } else { - implementation 'com.github.reportportal:commons-dao:adbb40e' - implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT' - annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT' + implementation 'com.github.reportportal:commons-dao:426f3fe' + implementation 'com.github.reportportal:plugin-api:c2a742a' + annotationProcessor 'com.github.reportportal:plugin-api:c2a742a' } implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2' diff --git a/src/main/java/com/epam/reportportal/extension/monday/MondayExtension.java b/src/main/java/com/epam/reportportal/extension/monday/MondayExtension.java index 09bcdee..1f6b71d 100644 --- a/src/main/java/com/epam/reportportal/extension/monday/MondayExtension.java +++ b/src/main/java/com/epam/reportportal/extension/monday/MondayExtension.java @@ -55,6 +55,7 @@ import com.epam.ta.reportportal.dao.ProjectRepository; import com.epam.ta.reportportal.dao.TestItemRepository; import com.epam.ta.reportportal.dao.TicketRepository; +import com.epam.ta.reportportal.dao.organization.OrganizationRepositoryCustom; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; @@ -111,6 +112,8 @@ public class MondayExtension implements ReportPortalExtensionPoint, DisposableBe @Autowired private ProjectRepository projectRepository; @Autowired + private OrganizationRepositoryCustom organizationRepository; + @Autowired private LogRepository logRepository; @Autowired private TestItemRepository testItemRepository; @@ -251,13 +254,14 @@ private Map> getCommonCommands() { private Map> getCommands() { List> commands = new ArrayList<>(); commands.add(new TestConnectionCommand(mondayClientProvider.get())); - commands.add(new GetIssueTypesCommand(projectRepository)); + commands.add(new GetIssueTypesCommand(projectRepository, organizationRepository)); commands.add( - new GetIssueFieldsCommand(projectRepository, mondayClientProvider.get(), objectMapper)); + new GetIssueFieldsCommand(projectRepository, mondayClientProvider.get(), objectMapper, + organizationRepository)); commands.add( new PostTicketCommand(projectRepository, requestEntityConverter, mondayClientProvider.get(), issueParamsConverter, issueDescriptionProvider, logSenderProviderSupplier.get(), - objectMapper, testItemRepository, logRepository + objectMapper, testItemRepository, logRepository, organizationRepository )); return commands.stream().collect(Collectors.toMap(NamedPluginCommand::getName, it -> it)); diff --git a/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueFieldsCommand.java b/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueFieldsCommand.java index a39ced5..252d8b0 100644 --- a/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueFieldsCommand.java +++ b/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueFieldsCommand.java @@ -28,6 +28,7 @@ import com.epam.reportportal.model.externalsystem.AllowedValue; import com.epam.reportportal.model.externalsystem.PostFormField; import com.epam.ta.reportportal.dao.ProjectRepository; +import com.epam.ta.reportportal.dao.organization.OrganizationRepositoryCustom; import com.epam.ta.reportportal.entity.integration.Integration; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -56,8 +57,9 @@ public class GetIssueFieldsCommand extends ProjectManagerCommand> { - public GetIssueTypesCommand(ProjectRepository projectRepository) { - super(projectRepository); + public GetIssueTypesCommand(ProjectRepository projectRepository, + OrganizationRepositoryCustom organizationRepository) { + super(projectRepository, organizationRepository); } @Override diff --git a/src/main/java/com/epam/reportportal/extension/monday/command/PostTicketCommand.java b/src/main/java/com/epam/reportportal/extension/monday/command/PostTicketCommand.java index 90788d8..63e8f0e 100644 --- a/src/main/java/com/epam/reportportal/extension/monday/command/PostTicketCommand.java +++ b/src/main/java/com/epam/reportportal/extension/monday/command/PostTicketCommand.java @@ -42,6 +42,7 @@ import com.epam.ta.reportportal.dao.LogRepository; import com.epam.ta.reportportal.dao.ProjectRepository; import com.epam.ta.reportportal.dao.TestItemRepository; +import com.epam.ta.reportportal.dao.organization.OrganizationRepositoryCustom; import com.epam.ta.reportportal.entity.integration.Integration; import com.epam.ta.reportportal.entity.log.Log; import com.fasterxml.jackson.core.JsonProcessingException; @@ -77,8 +78,9 @@ public PostTicketCommand(ProjectRepository projectRepository, RequestEntityConverter requestEntityConverter, MondayClientProvider mondayClientProvider, IssueParamsConverter issueParamsConverter, IssueDescriptionProvider issueDescriptionProvider, LogSenderProvider logSenderProvider, ObjectMapper objectMapper, - TestItemRepository testItemRepository, LogRepository logRepository) { - super(projectRepository); + TestItemRepository testItemRepository, LogRepository logRepository, + OrganizationRepositoryCustom organizationRepository) { + super(projectRepository, organizationRepository); this.requestEntityConverter = requestEntityConverter; this.mondayClientProvider = mondayClientProvider; this.issueParamsConverter = issueParamsConverter;