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

EPMRPP-95629 start with organizations feature #10

Merged
merged 1 commit into from
Dec 19, 2024
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
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -251,13 +254,14 @@ private Map<String, CommonPluginCommand<?>> getCommonCommands() {
private Map<String, PluginCommand<?>> getCommands() {
List<PluginCommand<?>> 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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,8 +57,9 @@ public class GetIssueFieldsCommand extends ProjectManagerCommand<List<PostFormFi
private final ObjectMapper objectMapper;

public GetIssueFieldsCommand(ProjectRepository projectRepository,
MondayClientProvider mondayClientProvider, ObjectMapper objectMapper) {
super(projectRepository);
MondayClientProvider mondayClientProvider, ObjectMapper objectMapper,
OrganizationRepositoryCustom organizationRepository) {
super(projectRepository, organizationRepository);
this.mondayClientProvider = mondayClientProvider;
this.objectMapper = objectMapper;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.epam.reportportal.extension.ProjectManagerCommand;
import com.epam.ta.reportportal.dao.ProjectRepository;
import com.epam.ta.reportportal.dao.organization.OrganizationRepositoryCustom;
import com.epam.ta.reportportal.entity.integration.Integration;
import java.util.List;
import java.util.Map;
Expand All @@ -27,8 +28,9 @@
*/
public class GetIssueTypesCommand extends ProjectManagerCommand<List<String>> {

public GetIssueTypesCommand(ProjectRepository projectRepository) {
super(projectRepository);
public GetIssueTypesCommand(ProjectRepository projectRepository,
OrganizationRepositoryCustom organizationRepository) {
super(projectRepository, organizationRepository);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading