Skip to content

Commit

Permalink
EPMRPP-93189 || Impossible to Post issue with "Parent" field (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
APiankouski authored Jul 26, 2024
1 parent 6971cd4 commit da626df
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.atlassian.jira.rest.client.api.domain.Project;
import com.atlassian.jira.rest.client.api.domain.User;
import com.atlassian.jira.rest.client.api.domain.input.ComplexIssueInputFieldValue;
import com.atlassian.jira.rest.client.api.domain.input.FieldInput;
import com.atlassian.jira.rest.client.api.domain.input.IssueInput;
import com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder;
import com.epam.reportportal.model.externalsystem.PostFormField;
Expand Down Expand Up @@ -68,6 +69,8 @@ public class JIRATicketUtils {
// Field format from UI calendar control
public static final String JIRA_FORMAT = "yyyy-MM-dd";

public static final String PARENT_FIELD_ID = "parent";

private JIRATicketUtils() {
}

Expand Down Expand Up @@ -154,6 +157,13 @@ public static IssueInput toIssueInput(JiraRestClient client, Project jiraProject
if (one.getId().equalsIgnoreCase(IssueFieldId.LINKS_FIELD.id)) {
continue;
}
if (one.getId().equalsIgnoreCase(PARENT_FIELD_ID)) {
if (!one.getValue().isEmpty()) {
issueInputBuilder.setFieldInput(new FieldInput(PARENT_FIELD_ID,
ComplexIssueInputFieldValue.with("key", one.getValue().get(0))));
}
continue;
}

// Arrays and fields with 'allowedValues' handler
if (null != cimFieldInfo.getAllowedValues()) {
Expand Down

0 comments on commit da626df

Please sign in to comment.