I've created a Script fragment to create a subtask, Please see below xml similar to the one mentioned here(https://community.atlassian.com/t5/Product-Apps-questions/Scriptrunner-web-fragments-for-creating-subtask-with-default/qaq-p/55927)
Error: I have 2 subtasks types, because of jira's default behavior the issue type is selected to the latest subtask issue type created. Steps taken to solve the error: I tried using the Behaviours integration to set the issue type to default, Please see below script as mentioned in the documentation:https://scriptrunner.adaptavist.com/4.1.3.24/jira/fragments/CreateConstrainedIssue.html#_behaviours_integration
But this doesn't work. Am I missing anything or is this because of the styleClass I've used. issueaction-create-subtask I need the subtask screen to popup when the script fragment button is clicked, with the issue type field set as read only. Pleas advise. Thanks. |
Hello,
In the following line
getFieldById("issuetype-field").setReadOnly(true)
What do you use for issuetyle-field? It must be like customfield_<id>. If you use the name of the custom field you need to call getFieldByName method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.