Hello,
I have been searching the internet for a solution to a problem I am trying to tackle. I have come across a lot of different sites and input but nothing seems to really help me.
First, let me explain my problem at a high level. I have a team of developers that prefer to use GitLab to manage issues but I have a team of testers and product managers that prefer to manage issues in JIRA. I like to believe in win-win scenarios so I said "Why not both?"
I found a tool from unito.io that will sync issues between Gitlab and JIRA but the problem I am facing is that Gitlab doesn't have a concept of a workflow or statuses other than open/close. Gitlab primarily uses labels. What I am thinking about doing is: If a JIRA issue has been updated with a label==foo then transition JIRA issue from phase 1 to phase 2.
I have found that my JIRA instance (it is the enterprise edition that my company maintains, not the cloud edition) has the Script Runner plug in enabled. Based on documentation I have found on the web I believe it is possible to create my own groovy class as a custom listener and configure it to happen on issueUpdate in my specific project. This is perfect. I can write some code that will check to see what the update was and what phase it is in. If it was a label that was added I can check to see if it is the label I am interested in and if it is and the issue is in the correct phase I can issue a command to transition the issue to the correct phase.
The problem is the documentation is really hard for a newbie like me to understand. I am trying to read enough of https://scriptrunner.adaptavist.com to understand what to do but I am not finding what I need. The docs at https://docs.atlassian.com/software/jira/docs/api/7.3.7/ are massive and a newbie has no way to know what to look for. This site: http://igorpopov.io/2014/11/24/rocking-with-jira-script-runner/ makes it seem like I have to do a lot of stuff just to write this small script (it makes me think I have to compile the JIRA code? Woah!)
I am look for a simple class that I can add to my custom script listener, then I edit a bug, I check to see if my script made the changes I thought it would based on my code and if it works I add more code and if it doesn't I troubleshoot my code. Repeat.
I wrote a tome here. I am really hopeful that someone will read this question and
a) help me out with some sample code
b) explain that what I want to do is not possible and tell me why
c) offer up some alternative solutions to my problem.
Thank you Atlassian Community, you are great!