Skip to main content

The dreaded "Clone" in Jira

Jira Cloud
Scrum Teams

Case: We clone template issues, as our work is repetitive, and get “clone” in the summary and it makes it hard to read. Built-In Jira allows you to remove "Clone" from the story you are cloning, but if you are also copying the sub-tasks there is not the option to remove it. There are ways to turn this off in Jira Server, but I could not find it in Jira cloud.

Solution:

Jira - Settings - Add-Ons - ScriptRunner - Escalation Service

The Escalation Service called: Remove Clone In Summary
As this user: (myself)
Checked - enabled
On this schedule: Every Hour
For first 50 results returned by this query: Project in (pipe) and Summary ~ "CLONE"

Will run this code: 

// check if issue.fields.summary looks like "CLONE -"
def updatedSummary =""
if (issue.fields.summary.startsWith("CLONE -")) {
    //if so, modify issue.fields.summary to not suck.
    updatedSummary = issue.fields.summary.replace("CLONE -", "")
    //update it.
    def result = put('/rest/api/2/issue/' + issue.key)
            .header('Content-Type', 'application/json')
            .body([
            fields: [
                 summary: updatedSummary
            ]
    ])
            .asString()
    if (result.status == 204) {
        // If you want to leave a comment, you can add this
        //def commentResp = post("/rest/api/2/issue/${issue.key}/comment")
        //    .header('Content-Type', 'application/json')
        //    .body([
        //    body: """The ScriptRunner Bot has updated the description of ${issue.key} due to the name looking like CLONE -"""
        //])
        return "Updated summary of ${issue.key}"
    } else {
        return "Failed to update: ${issue.key}. " + "${result.status}: ${result.body}"
    }

}

Comments

Popular posts from this blog

How do I find the Custom Field ID in Jira Cloud?

So you need to find the Custom Field ID in Jira Cloud. Perhaps you need the ID for a custom field to work on soem code, an API call or a script. How do you find it? You can find the ID in the URL when managing custom fields Jira - Settings - Issues - Fields - Custom Fields https://***.atlassian.net/secure/admin/ViewCustomFields.jspa Select "Edit" on the desired custom field .../admin/EditCustomField!default.jspa?id=12802 There you go! It is that number at the end of the URL Alternately, you can use ScriptRunner Jira - Setttings - Add-ons - Script Runner - Script Console and run the following def issueKey = '***-####' def result = get('/rest/api/2/issue/' + issueKey)         .header('Content-Type', 'application/json')         .asObject(Map) if (result.status == 200){     return result.body.fields } else {     return "Failed to find issue: Status: ${result.status} ${result.body}"

When Hiring (Job Posts)

I know this is not about Agile specifically but I wanted to share how I craft Job Posts when hiring, I would love to continue to improve my process. When writing a Job Post I do the following; Have boilerplate about the company itself. Yes, the candidate should dig more but you want them to want to apply and want to research. Describe the Role, where the department fits within the company, what the team/departments purpose is, and what normal activities the job will encompass. Indicate the type of person/passions which would work well List requirements , real requirements, this should be 5 or less, these should be demonstrable items Demonstrable - Upbeat attitude is not easy to demonstrate, for example Always have alternatives to a major! Great technical people can have humanities majors – i.e. use “or equivalent experience” List bonuses/ nice to have /additional items that a candidate would benefit by having Explain the benefits of the company (should be boilerplate tal

Sprint Planning - Poker

Here are some free resources I plan to try for sprint planning. Let me know what you think if you enjoy doing planning poker as your given method of story-pointing and try these or have others to recommend. http://www.votingpoker.com http://firepoker.io/#/ https://www.pointingpoker.com/ https://scrumpoker.online/ https://play.planningpoker.com/plans https://scrumpoker.online/ https://tools.wmflabs.org/hatjitsu/