How to use script listener with commented issues

Christian Johnson March 7, 2016

Hi All

 

I'm using script running to send customised emails. I've setup a "customer email listener "and also "Fast-track transition an issue". The idea being when a comment is added by the development team this would be picked up moved to a new status of "waiting for support" and an email sent to support.

What seems to be happening is the listeners are triggering but are not sending the email or moving the status so I think my condition is incorrect.

After that is working I need to figure out how to only trigger this if the comment is added by developers. I think "isUserMemberOfRole('jira-developers')" should work but not entirely sure where in the condition it should go.

 

Please help me resolve my condition issue. (I have other listeners based on events working fine).

 

custom email listerner.pngtransition.png

log:

2016-03-23 12:14:40,672 http-nio-8080-exec-16 ERROR      [o.a.c.c.C.[.[localhost].[/].[noopservlet]] Servlet.service() for servlet [noopservlet] in context with path [] threw exception
java.io.FileNotFoundException: /var/atlassian/application-data/jira/logos/jira-favicon-scaled.ico (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at com.atlassian.jira.lookandfeel.filter.ImageDownloader.doDownload(ImageDownloader.java:65)
        at com.atlassian.jira.lookandfeel.filter.FaviconInterceptor.doFilter(FaviconInterceptor.java:96)
        ... 55 filtered
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
2016-03-23 12:15:24,791 http-nio-8080-exec-14 ERROR      [o.a.c.c.C.[.[localhost].[/].[noopservlet]] Servlet.service() for servlet [noopservlet] in context with path [] threw exception
java.io.FileNotFoundException: /var/atlassian/application-data/jira/logos/jira-favicon-scaled.ico (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at com.atlassian.jira.lookandfeel.filter.ImageDownloader.doDownload(ImageDownloader.java:65)
        at com.atlassian.jira.lookandfeel.filter.FaviconInterceptor.doFilter(FaviconInterceptor.java:96)
        ... 55 filtered
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

4 answers

0 votes
JamieA
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.
March 21, 2016

For complicated stuff like this, we need to break it down into parts and make sure all the parts are working before assembling the whole.

You said:

I've setup a "customer email listener "and also "Fast-track transition an issue".

Can we do just one of those things and verify that it works, then we can move to the next part?

If it doesn't work, which one is it? What's the expected and actual outcome?


Christian Johnson March 21, 2016

Ok, what do you want me to do? The Fast-Track transition would be first I have this setup, when a comment is added it shows that its fired but doesn't move the transition.

JamieA
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.
March 21, 2016

So you just have a fast-track transition script, with the condition above? If it doesn't move the issue the logs should say why.

Christian Johnson March 21, 2016

Yes I have this, it fires but nothing happens which logs should I be looking at?

JamieA
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.
March 22, 2016

atlassian-jira.log. 

Christian Johnson March 23, 2016

I'm getting the below.

2016-03-23 12:14:40,672 http-nio-8080-exec-16 ERROR      [o.a.c.c.C.[.[localhost].[/].[noopservlet]] Servlet.service() for servlet [noopservlet] in context with path [] threw exception
java.io.FileNotFoundException: /var/atlassian/application-data/jira/logos/jira-favicon-scaled.ico (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at com.atlassian.jira.lookandfeel.filter.ImageDownloader.doDownload(ImageDownloader.java:65)
        at com.atlassian.jira.lookandfeel.filter.FaviconInterceptor.doFilter(FaviconInterceptor.java:96)
        ... 55 filtered
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
2016-03-23 12:15:24,791 http-nio-8080-exec-14 ERROR      [o.a.c.c.C.[.[localhost].[/].[noopservlet]] Servlet.service() for servlet [noopservlet] in context with path [] threw exception
java.io.FileNotFoundException: /var/atlassian/application-data/jira/logos/jira-favicon-scaled.ico (No such file or directory)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at com.atlassian.jira.lookandfeel.filter.ImageDownloader.doDownload(ImageDownloader.java:65)
        at com.atlassian.jira.lookandfeel.filter.FaviconInterceptor.doFilter(FaviconInterceptor.java:96)
        ... 55 filtered
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
JamieA
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.
March 23, 2016

I don't think that's relevant.

Christian Johnson March 23, 2016

When I add a comment this is all that is showing in the logs. I have checked and it is showing that the even has first. Although its not moved the status.

0 votes
Christian Johnson March 14, 2016

Anyone have any ideas?

0 votes
Christian Johnson March 10, 2016

Correct.

I will also need the same but for a customer too. So another path would be support email customer asking for more info, when the client replies I would want the status changing from waiting for customer to waiting for support and also support to receive an email. 

0 votes
Vasiliy Zverev
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.
March 10, 2016

I assume you need to get a comment author and then check if it is a member of developer group. Is it so?

Suggest an answer

Log in or Sign up to answer