Skip to content

Instantly share code, notes, and snippets.

@vikrantyadav11
Last active November 1, 2023 16:27
Show Gist options
  • Save vikrantyadav11/8b8312372bd6487c9758f9c8a1998a95 to your computer and use it in GitHub Desktop.
Save vikrantyadav11/8b8312372bd6487c9758f9c8a1998a95 to your computer and use it in GitHub Desktop.
Set Description Template.groovy
import com.atlassian.jira.issue.*
def description = getFieldById("description")
def issuetype = getIssueContext().getIssueType().name
if (issuetype.contains("Bug") || issuetype.contains("Bug sub-task")){
if (!underlyingIssue?.description){
description.setFormValue("""h3.Description
_<Explain the observations as clear as possible>_
*Steps to reproduce*
_<-- minimum steps that describe the entire path of reproducing the bug._
_-- Describe one step per line>_
*Expected result*
_<Describe the expected result according to the technical task, design, test cases outcome>_
*Actual result*
_<Explain the current observation as clear as possible>_
*Attachments (screenshots, files, error log etc)*
_-- Screenshot (it's convenient when the bug is highlighted with a circle or an arrow),_
_-- Files (Uploaded files)_
_-- Error logs_
h4.NOTE (optional)
_-- Any other observations_""")
}
}
@Isranigit
Copy link

@vikrantyadav11 Hi again, is this possible to elseif condition or switch in the same script, for example Issue Type is Bug and acceptance criteria "ABC" and issue type is Incident then acceptance criteria would be "DEF" and so ? kindly help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment