Skip to content

Commit

Permalink
Merge pull request #10 from reportportal/EPMRPP-95629
Browse files Browse the repository at this point in the history
EPMRPP-95629 start with organizations feature
  • Loading branch information
grabsefx authored Dec 19, 2024
2 parents 0cce96e + 803fb4b commit e866583
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
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

0 comments on commit e866583

Please sign in to comment.