Dear team,
We have JSM Data Center implemented, recently I got a request from a team, they have a request type called "New Report", they are asking if we can add pre-filled text for the description filed on the request type when the user opens "New Report" form and will see the pre-filled text and fill with the right information. May I know if you have any suggestions on how to achieve this? I know we can create a custom field, but how to add the pre-filled texts? And how the content of this custom field can be copied to the Description instead?
Steps:
Create a Custom Field:
Administration > Issues > Custom Fields.
Create a Text Field (multi-line) (e.g., "Pre-filled Description") with default text.
Add the Field to the Request Form:
Go to Project Settings > Request Types > New Report.
Add the custom field to the form.
Set Automation Rule:
Go to Project Settings > Automation.
Create a rule:
Trigger: Issue Created.
Condition: Request Type is New Report.
Action: Copy the custom field content to the Description field using:
Copy code
{{issue.Pre-filled Description}}
THANK YOU
Hi @Lance Li ,
This would be possible through "Behaviours" in Script Runner. Please confirm if you have a Script Runner plugin as well.
Follow below to know more :
https://docs.adaptavist.com/sr4js/6.37.0/features/behaviours
Regards,
Harshit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, no we don't have it here. Soo what I need is to find a workaround with an out-of-box JSM Datacenter set up. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lance Li Just tested this approach at my end and this works :
Description is a system field where you can create Context.
You can do the same and add a context with the Default Value for Description field.
Setting>Issue>System Field>Click on .... besides the Description field > Click Context and Default Values > Add Context > Select Issue Type/Project , Fill Pre-text Description template and Save Changes.
Test the same weather it works as per your requirement.
Regards,
Harshit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lance Li
Within DC you have the System Fields section.
There you will fond the description field, you can create different contexts for the description field based on issue type and project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A couple of questions about this method. Do Forms respect and use the Context? Because I think there is still trouble with that in Jira Cloud.
Also, I think he wants to do it by Request Type. What happens if multiple Request Types are tied to the same Issue Type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
What I described is only an option in DC, in Cloud this can't be done.
And Yes this is linked to a request type, so if this requirement is there related to a Request Type, the Issue Type has to be unique.
Other option is as you already described, in Cloud this is the only option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you validated that ProForma forms respect all Contexts for the the Custom Field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no requirement set based on a from in the request of @Lance Li
And Yes, I have done this for a client on DC and this gets respected if you link the paragraph field in a form to the description field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I am specially asking about the Context if you add multiple Contexts to a custom field, does the form respect that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
In Cloud, I haven't tried this.
In DC you can set a context, as described to the Description field, but the context is related to a single or multiple issues types in a project.
And you can only have a single context set to a project, so creating a different one for another issue type on the same project can't be done.
Then you need the same path as you are to do in Cloud, create a new paragraph field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@John Funk In cloud you can try this free plugin, I have not tried it but while searching for this requirement I got to know about this free plugin Default Values for 'Create Issue' screen - Issue Templates | Atlassian Marketplace
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lance,
Create a new custom Paragraph field. But in your default text that you want the user to see and add the field to the Request Type form. Do no put the Description field on the form.
Add the field to the Create screen used by the project but not the Edit or View screen. And put the Description field on those screens but not the Create screen.
Then create an automation rule for the project based on Field Value Changed trigger. Then add a Condition for that Request Type.
Finally, add an action for Edit Issue and select the Description field. Click the 3 dots beside the Description field and select Copy. Then update it to copy from the Trigger Issue and use the custom field as the field to coy from.
That should do it for you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Lance Li you can use scriptrunner for this scenario, We can use scriptrunner behaviours to pre populate the description field with the text and also make it editable field before the issue creation
Are you having scriptrunner plugin in your Jira instance?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know we can use 3rd party tools like scriptrunner to pre-populate the description field, but unfortunately, we don't have it in place in our environment, so what I need is to find a workaround with out-of-box JSM Datacenter set up. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.