I have a custom field called Due Date, which is a custom field in which a user inputs the date that they would like a Jira Issue to be resolved by. I also have a custom field called Why Was Due Date Missed, which is a multi line text entry field, which is hidden and not required by default. On the transition from the last workflow status to the resolution, I want the screen to force the user to enter something into the Why Was Due Date Missed Field before being able to transition the issue to a resolution status, if the current date is past the value of the Due Date field. What is the best/easiest way of doing this? Thanks in advance!
Hi Shounak,
You may need an add-on to fully accomplish this task, however, I would start with the knowledge base article How to display a Field based on another Field's selection and see if you can modify it for your needs:
If you would like show a Field B, ONLY if certain value from Field A is chosen, it can be achieved by performing the following steps:
In this example, if a Priority - Critical (Field A) has been chosen for an issue, another field (Field B) will be displayed. Fill in the following text into the Description field (Field B):
<script type="text/javascript">
priority = document.getElementById('priority');
if (priority) {
target = document.getElementById('customfield_10000');
// Hide the target field if priority isn't critical
if (priority.value != 2) target.style.display='none';
priority.onchange=function() {
if (this.value == 2) {
target.style.display = '';
target.value="enter message here";
} else {
target.style.display='none';
}
}
}
</script>
Make sure to change the
customfield_ID
and priority.value
. To find the customfield_id
, view the source of the page when viewing an issue, or check the URL when editing a custom field.
Cheers,
Branden
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.