Hi Community.
I am want to make a custom field required when
> Click on 3 dots on the parent issue present in Filter result gadget on Dashboard
> Click on Create subtask option > Create subtask screen opens in a new tab
> a Select List (single select) field should be required in jira cloud
I have tried multiple ways to do it but with no success:
getFieldById("customfield_12345").setRequired(true)
However, the field is not showing as required withn asterisk.
Tried making the field required in validation, but it didn't give any validation on creating subtask from dashboard.
Please guide further on how to create a new subtask linked to a parent on dashboard with a required field.
Thank
Hi @Digvijay Singh and Welcome to Atlassian Community!
I assume you are configuring a company-managed project. In this case, there are two options to make a field mandatory when creating an issue from the dashboard: setting a Validator or making the field required in the Field Configuration.
Behaviours are not workflow properties. They are rendered when opening the creation form, but since the creation form is not opening from the dashboard, the Behaviours cannot render the mandatory fields.
If you have any additional questions or encounter any difficulties, let me know, and I'll do my best to help you.
Thank you for your message.
I am able to set field required in Field Configuration and adding them on Workflow Validators, and it worked fine.
But I am unable to set the below when opening Create subtask screen on parent from Dashboard in Jira Cloud:
In Jira data center, via scriptrunner behavior, I am able to configure my above requirements on this url:
https://<jira-dc-instance>.com/secure/CreateSubTaskIssue.jspa?parentIssueId=1234567&pid=12345&issuetype=54321&returnUrl=https://<jira-dc-instance>.com/secure/Dashboard.jspa?selectPageId=32145
But in Jira Cloud, I am not able to see any changes on the below url via cloud behavior even though I have set it as On load & on Create View with mapping required Project and Subtask issuetype:
https://<jira-clound-instance>.com/secure/CreateSubTaskIssue.jspa?parentIssueId=123456&pid=54321&issuetype=12345&returnUrl=https://<jira-cloud-instance>.com/jira/dashboards/12345
So, why there is no impact of Cloud behavior on Create Subtask screen when opening it from Dashboard in Jira Cloud, but it is possible to do so in Jira Data center?
Please guide me further and provide any other alternative or workaround to achieve my usecase in Jira Cloud.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Digvijay Singh hope you're doing well!
Yes, unfortunately, pre-filling fields with URL parameters only works on the Customer Portal:
(see Pre-populate Fields from URL)
But you can still prefill fields using Scriptrunner Behaviour:
You will get:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your message.
As I am working on Jira Software Cloud, I am able to set pre-fill values of Summary and Description via scriptrunner using this example: https://www.scriptrunnerhq.com/help/example-scripts/set-default-description-upon-issue-creation-cloud
Also able to hide Summary and Description, set custom field as Required/ ReadOnly on Create Subtask screen via behavior.
My question still remains, why behavior is not running when user opens the Create Subtask screen from Dashboard, although the same behavior runs fine on Create Subtask screen when user creates the subtask on Parent issue on Issue View screen.
And in DC, the behavior runs successfully on both Issue View and from Dashboard.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.