I was looking for a solution to create a Jira Issue with a prefilled Description aka. Issue Template.
I share here my learnings and solutions.
Problem description
It is quite useful in Jira to be able to prefill issues with default values based on their issue types before creation - feature known as "issue templates".
This isn't possible out of the box in Jira unfortunately: you need to use another Add-On to extend Jira capability (for Jira server-based) or use Jira Automation (included in the cloud).
As a (poor) workaround one could create template issues and then copy them (see for example this blog post). But it isn't very convenient/ user-friendly. You need to document where these templates issues are stored and share the information within your organization about it. Plus, these are many extra steps for such a simple request.
Tip for formatting Jira templates: see Jira templates for user stories, tasks and bugs - codecentric AG Blog and Text Formatting Notation Help - (Jira Wiki Renderer Help)
User local solutions
Local solutions need to be set up / configured by each user on their browser.
Chrome Extension
TamperMonkey Script
Example: JIRA templates (TamperMonkey Script)
Dedicated Add-Ons
Workflow Essentials Add-On
The quite cheap Workflow Essentials Add-On allows to define issue templates in a convenient way (and much more).
In the Admin→ Add-ons go to Workflow Essentials Add-On → Default Values for Create Screens
Here you can define for each issue type default values for any fields.
With this Add-On when you switch the issue type in the create screen, the description field is reset if it wasn't edited before (as normally expected behavior).
Unfortunately, the template defined here isn't used on a Elements Copy&Sync action (see alternative solutions based on ScriptRunner here).
ScriptRunner Solution
ScriptRunner (a highly recommended Jira Add-On) also allows according to its documentation to define for example a default issue description per issue type.
Unfortunately, the documented solution has the problem that when you switch the issue type the description field won't be reset, even if it wasn't edited from the original previous template.
This issue is mentioned here How to add Default text in Description using scrip... and here How do you clear description when changing project or issue type (Atlassian Community)
Improved ScriptRunner Solution
To circumvent the problem, the following approach based on this forum answer will work:
No comments:
Post a Comment