-
Suggestion
-
Resolution: Unresolved
-
None
-
2
-
3
-
Issue statement
The "Set Required Field" screen does not honor/support the fields configured as mandatory via the behavior configuration from the 3rd party add-on ScriptRunner for Jira.
Because of that, if a field is set as mandatory via ScriptRunner behaviors, this field will not show in the "Set Required Field" screen from Roadmaps plan, and the issue will fail to be created: nothing will happen when clicking on the Create button:
For more information about this behavior, you can refer to the KB article below:
https://confluence.atlassian.com/roadmaps-kb/advanced-roadmaps-for-jira-the-create-button-from-the-set-required-field-screen-does-not-work-1452670977.html
Steps to replicate
- Configure a field to be required using Jira's native field configuration feature
- Configure another field to be required via the behavior configuration from ScriptRunner (for example, the Fix Version field as illustrated below)
- Open a Roadmap Plan, create an issue from the plan, and click on Review changes
- From the pop-up, click Save selected changes in Jira.
- The "Set Required Fields" screen will open
- Click on the Create button
Expected behavior
The mandatory field should show in the "Set Required Fields" screen, and the issue should be created after clicking the Create button
Actual behavior
The mandatory field is not showing in the "Set Required Fields" screen, and nothing happens after clicking the Create button
Suggestion for the bug fix
Ensure that the "Set Required Field" screen support the "Mandatory Field" configuration coming from ScriptRunner behaviors.
Note
This issue only occurs if there is:
- at least 1 field set as required using Jira's native field configuration
- at least 1 field set as required using ScriptRunner's behavior
If there is no field set as required through Jira's field configuration, then it will be possible to create a Jira issue from a Plan, despite having 1 field set as required through ScriptRunner's behavior.
Workaround
Instead of using ScriptRunner behaviors to make the field mandatory, make it mandatory via Jira's native Field Configuration as illustrated below:
Another possible workaround is adding a JS script through the announcement banner.
It will display all fields when trying to create the issue from a roadmaps plan. That way, the field will be visible if one is made required through ScriptRunner.
The script to be added to the banner is the following.
<script type="module"> document.addEventListener('DOMContentLoaded', function() { if (window.location.pathname.includes("/secure/PortfolioPlanView.jspa")) { const targetNode = document.body; const config = { childList: true, subtree: true }; const callback = function(mutationsList, observer) { for (let mutation of mutationsList) { if (mutation.type === 'childList') { mutation.addedNodes.forEach(node => { if (node.tagName === 'SECTION' && node.id === 'jpo-dialogs-jira-create-issue'){ const allFields = node.getElementsByClassName('qf-field'); allFields.forEach(checkdiv => {checkdiv.style.display = 'block'}) } }); } } }; const observer = new MutationObserver(callback); observer.observe(targetNode, config); } }); </script>
- is related to
-
JSWSERVER-24900 Issue Creation fails within the plan if Required fields in the workflow are defined
-
- Closed
-
- relates to
-
JSWSERVER-24900 Issue Creation fails within the plan if Required fields in the workflow are defined
-
- Closed
-
-
JSWSERVER-25061 Create custom sub-task type with mandatory field from Plan doesn’t work
-
- Gathering Impact
-
- links to
Moving this JAC ticket back to a Feature Request, since the issue is caused by a 3rd party add-on functionality (ScriptRunner's behaviors)