Hi,
We need to place a text template in the Description field on the subtask creation screen. How can this be configured?
I set up description filling with Behaviors. But the completed template cannot be edited during creation, all changes are not saved. As a result, the subtask is created with the description specified in the script.
Script:
def srd = getFieldById("description")
def defaultValue = "* Precondition: *\n"+
"* Playback steps: *\n"+
"1. \n"+
"2. \n"+
"3.\n"+
"* Actual result: *\n"+
"*Expected Result:*"
if(getActionName() in ["Create Issue", "Create"]){
srd.setFormValue(defaultValue)
}
I wonder if you have some leftover attempts to set the description in the Create transition of your workflow. That's what overwriting the user input after submitting.
Because what you have there should work and allow you to edit the default before submitting and the user-submitted description should be saved correctly.
No, this option is correct. But for some reason, in the created task, the description becomes the one specified in the script. Is there any way to fix this? It is necessary that the set description is not fixed, but has the ability to be added and edited on the task creation screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But for some reason, in the created task, the description becomes the one specified in the script
I'm confused. Isn't that the reason why you have the script in the first place?
If the description is read-only. Check that you don't have another behaviour that's adjusting this property.
And if you are able to edit the description before you submit the form, but you see something else in the sub-task then what you typed, then you have a postfunction or a listener that's making that change somehow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I fill in other fields, then the edited description changes to the original text.
We don't have listeners, so I don't understand why this can happen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you show me the full configuration screen for your behaviour? Do you have other behaviours that map to the same project/issuetype (or all projects/all issuetypes)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh ... where do you have your script? Did you put it in the description server-side script?
If so, then that's would be the issue.
Default description scripts have to be put in the initializer. Otherwise, each time you edit the description, when you leave the field, the script executes and resets the field.
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.