Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Make field required on create subtask from dashboard in jira cloud

Digvijay Singh
Contributor
March 22, 2025

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:

  • Created a scriptrunner cloud behavior, by selecting a Parent project and issuetype as Subtask, and passing the below code:
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

1 answer

0 votes
Sergei Troshin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2025

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.

  • The first option is setting a validator on the Create transition.
    screen1.png
  • The second option is making the field required in the Field Configuration.
    screen2.png

Why doesn't Scriptrunner Behaviour work?

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.

Digvijay Singh
Contributor
March 23, 2025

Hi @Sergei Troshin 

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:

  • Not able to prefill Summary & Description values
  • Not able to hide Summary & Description fields
  • Not able to set a Custom field as ReadOnly

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

Sergei Troshin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 24, 2025

Hi @Digvijay Singh hope you're doing well!

Yes, unfortunately, pre-filling fields with URL parameters only works on the Customer Portal:
screen1.png
(see Pre-populate Fields from URL)

But you can still prefill fields using Scriptrunner Behaviour:

screen3.png

You will get:
screen2.png

Digvijay Singh
Contributor
March 26, 2025

Hi @Sergei Troshin 

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

Suggest an answer

Log in or Sign up to answer