Can we have the description pre-filled with text

Lance Li December 5, 2024

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?

5 answers

2 votes
Megha December 5, 2024

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

1 vote
Harshit Grover
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.
December 5, 2024

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

 

 

Lance Li December 5, 2024

Hi @Harshit Grover

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.

Harshit Grover
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.
December 5, 2024

@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.

 

new.jpg

Test the same weather it works as per your requirement. 

 

Regards,

Harshit

 

 

0 votes
Marc - Devoteam
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.
December 6, 2024

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.

See, managing-system-fields 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2024

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? 

Marc - Devoteam
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.
December 6, 2024

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.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2024

Have you validated that ProForma forms respect all Contexts for the the Custom Field? 

Marc - Devoteam
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.
December 6, 2024

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.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2024

No, I am specially asking about the Context if you add multiple Contexts to a custom field, does the form respect that? 

Marc - Devoteam
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.
December 6, 2024

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.

Sanjana Nalam December 8, 2024

@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

Like John Funk likes this
0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2024

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!

0 votes
Sanjana Nalam December 5, 2024

@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?

Lance Li December 5, 2024

Hi @Sanjana Nalam

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.12
TAGS
AUG Leaders

Atlassian Community Events