-
Notifications
You must be signed in to change notification settings - Fork 131
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
[MM-1121]: Fix epic selector not displaying options if field is renamed in Jira #1134
base: master
Are you sure you want to change the base?
Conversation
…ing options if epic field is renamed in jira project configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper QA testing steps. As the QA will not know about renaming the fields on Jira side.
webapp/src/components/data_selectors/jira_epic_selector/jira_epic_selector.tsx
Outdated
Show resolved
Hide resolved
webapp/src/components/data_selectors/jira_epic_selector/jira_epic_selector.tsx
Outdated
Show resolved
Hide resolved
for (const project of this.props.issueMetadata.projects) { | ||
for (const issueType of project.issuetypes) { | ||
epicNameTypeId = Object.keys(issueType.fields).find((key) => isEpicNameField(issueType.fields[key])); | ||
if (epicNameTypeId) { | ||
epicIssueTypeId = issueType.id; | ||
projectKey = project.key; | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can create a util for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used only once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the above similar code has a different functionality
No need to rename the field, added the link |
Summary
Create Issue
modal had a bug: if theEpic
field in a Jira project was renamed to anything other thanEpic
, the dropdown for selecting Jira epics displayed no options.Epic
, and then checks if the filtered field matches the Epic field schema before fetching all epics from the project.Epic
. This PR removes the name-based check and instead relies exclusively on the field schema to identify the Epic field.Ticket Link
Fixes #1121
What to test