Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Post-Function ScriptRunner script to update summary with name of following month

Chris Ghazanchian
Contributor
March 5, 2018

Hello! I am new to scriptrunner and programming in general so I am struggling with how to achieve what I would like.

Here's my scenario-

I have issues within my project that have a custom date field "Billing Cycle Date".

I would like to run a workflow post function script which will take the billing cycle date, calculate what the next month is, and then append the name of the month into the summary.

So, let's say for a given issue:

Summary: Issue1

Billing Cycle Date: 3/5/2018

Upon workflow transition, postfunction script runs and sets Summary to "Issue1 - April"

 

I have spent multiple days trying to figure this out but nothing is working properly, any guidance would be greatly appreciated!

1 answer

1 vote
Nic Brough -Adaptavist-
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 Champions.
May 16, 2016

Sub-tasks are included on a board with their parents - it's nonsense to do it any other way.

If you don't want to use them on the board, then change the board filter to have a clause "and issuetype in standardIssueTypes()"

This is somewhat clunky as it completely excludes them from the board, making it impossible to work with them at all - you might as well change the project setups and remove the subtask issue types completely to prevent users using them.

A better option would be to have a quick filter with JQL of "issuetype in standardIssueTypes()" - users can then click on it to hide all the sub-tasks on a board without losing them.

motherg
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 Champions.
May 17, 2016

This is what we practice as well - good shout on that query format, I did it as != sub-task but that's because we only have one sub-task type on my project. You're query is the correct option so I'll update mine.

Suggest an answer

Log in or Sign up to answer