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

0 votes
MJ
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 14, 2014

I think your best bet in this situation would be to bulk assign issues from the imported user name to the existing user name on JIRA side, and upon completion disable the imported username in order to prevent it from counting toward your license limit.

Itamar Ostricher
July 15, 2014

Thanks. That's a valid option.

Just a few concerns I'd like to resolve before actually doing this:

  1. After doing the bulk changes, when a (Bitbucket) user mentions an issue in a commit message, how does JIRA know to update the issue as the appropriate user on JIRA's side?
  2. If a user performs repository operations from within a JIRA issue (like create a branch), how does Bitbucket know to associate the operation with the correct Bitbucket user?
Abdulrazaq Mohammed Ali Omar
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.
July 15, 2014

JIRA DVCS Connector will set up links between your repositories and your JIRA account, you can check those manually from the repository. Go to your repo settings on Bitbucket, and click on "links" and you should see the links that Bitbucket has to your JIRA URL.

As for actions performed from JIRA, Bitbucket will check if you have a session in the browser logged into your Bitbucket account, and will make API calls for the request to perform these operations. So authentication is done in the background, if there's no sessions, then Bitbucket will ask you to login.

Itamar Ostricher
July 17, 2014

Thanks. I'll give it a try.

Itamar Ostricher
July 19, 2014

I found how to bulk change assignee and reporter on issues,

but is there a way to bulk edit the user of issue comments?

Also, the Bitbucket issues are imported with their Bitbucket watchlists. Is there a way to bulk edit the watchlists user to the JIRA users?

Itamar Ostricher
July 19, 2014

btw, how do I "disable" the imported user? I could not find such an operation in the user management view.

Suggest an answer

Log in or Sign up to answer