Created
June 9, 2025 04:22
-
-
Save vikrantyadav11/6b80b429961e6a964f9e979c7e51f2a4 to your computer and use it in GitHub Desktop.
Hide/Unhide Field on Transition Screen Based on Dropdown field Value ( Jira Cloud)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const transitionId = await getContext().then(context => context.extension.issueTransition.id); | |
const releaseNotesField = getFieldById("customfield_10324"); | |
releaseNotesField.setVisible(false) | |
// Get the custom field (10323) that controls the logic (Yes/No) | |
const changeField = getFieldById("customfield_10323"); | |
const changeFieldValue = changeField.getValue().value | |
// Check condition: if transitioned to Done and changeField value is "Yes" | |
if (transitionId == 21 && changeFieldValue == "Yes") { | |
releaseNotesField.setRequired(true); | |
releaseNotesField.setVisible(true); | |
} else { | |
releaseNotesField.setRequired(false); | |
releaseNotesField.setVisible(false); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment