Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,788
Community Members
 
Community Events
184
Community Groups

[ScriptRunner] Get list of overdue issues

Deleted user Oct 04, 2017

Hey all

I have just added an escalation service in scriptrunner which triggers my custom event which then triggers my mail listener.

The goal is to get all overdue issues of each reporter and send them an email containing a list of said issues with the task to go through them.

I've so far only been able to trigger one mail per overdue issue which can be quite overwhelming depending on how many there are.

Now, how could I get a list or a collection of all overdue issues for each reporter and send them only one email with this list?

Here's my code so far.

Generate Event

grafik.png

Send Custom Mail

Condition and Configuration

//---Ressources
    
    //---Main

        import com.atlassian.jira.component.ComponentAccessor
    
    //---Render Manager

        def rendererManager = ComponentAccessor.getComponent(com.atlassian.jira.issue.RendererManager.class)
        def fieldLayout     = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue)
        
        //---Description
        
            def rndDesc = rendererManager.getRendererForField(fieldLayout.getFieldLayoutItem("description"))
    
//---Issue Info

    config.issueKey = issue.key
    config.issueSum = issue.summary

    config.issueRep = issue.reporter?.displayName

    config.issueAssignee = issue.assignee?.displayName
    config.issuePrio     = issue.priority?.name

    config.issueStatus = issue.status?.name
    config.issueURL    = "[OUR_JIRA]/browse/$issue.key"
    
    config.issueDesc = "Keine."
    
//---Format specific values
        
    //---Description
        
        if (issue.description)
        {
            config.issueDesc = rndDesc.render(issue.description, null)
        }

//---Conditions

    issue.reporter != issue.assignee

Thanks for any help

Marius

1 answer

2 votes
Jonny Carter
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.
Oct 09, 2017

Perhaps you could accomplish something similar with Jira's built-in Issue Filter subscriptions? https://confluence.atlassian.com/jira064/receiving-search-results-via-email-720416706.html 

Each user could just subscribe to a filter with JQL like

duedate < now() and resolution = Unresolved and assignee = currentUser()

 

If all the users are in a group, you could just setup a subscription to that filter for them.

Screen Shot 2017-10-09 at 4.27.37 PM.png

Deleted user Feb 23, 2018

Hi Jonny,

Works for us! Thanks for your help.

Best Regards,

Marius

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events