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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create comment or tasks in pull requests with Scriptrunner from Bitbucket v5.9.0?

rlandes I'm New Here Dec 16, 2020

I'd like to create tasks when a pull request is created via the Custom Event Handler feature from Bitbucket Scriptrunner, but I couldn't manage to find how to do it so far. I did find solutions on this website but they seem not to apply in v5.9.0, for example this one: https://community.atlassian.com/t5/Bitbucket-questions/How-to-auto-comment-Pull-Requests/qaq-p/266093

 

Even after replacing

pullRequestService.addComment

with

commentService.addComment

and after importing the right interface, since I noticed the function switched interface between versions (https://docs.atlassian.com/bitbucket-server/javadoc/5.9.0/api/reference/com/atlassian/bitbucket/comment/CommentService.html), it didn't work, I got the following message in the logs:

groovy.lang.MissingMethodException: No signature of method: com.sun.proxy.$Proxy454.addComment() is applicable for argument types: (Integer, Long, String) values

The solutions I found on other questions got the same fate, and I'm still unable to automatically create tasks or even comments right now.

 

Any solution? Thanks a lot in advance.

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,558 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you