[script runner] Smart field that shows person who added it to the Sprint AFTER sprint start

Arturs Kalnins August 15, 2022

Hi! I'm fighting some anti-patterns in my organization and Want to present a use case of items being added into the sprint (without any discussion or anything) By our PO's. I'm trying to create a smart field that would present this information, but I lack a skill in groovy. Perhaps someone can give me an example in which I can modify the necessary fields. 

Thank you team! 

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 15, 2022

I am sure it can be done, but I'm not sure of the exact code you would need.

https://library.adaptavist.com/entity/show-last-comment-for-an-issue (click on the Cloud tab) fetches the last comment from the current issue that the field is on.  This should give you most of the code you need around reading something and getting it out into a scripted field.

But I'm not sure of the code for "get last person to modify" would work.

You'd want to change the REST call to /rest/api/3/issue/{issueIdOrKey}/changelog to look at the issue history, and parse it for lines like "Charlie changed Sprint from <something> to Sprint X" and then return "Charlie" from the latest change in the list.  But I'm not a coder (in this language), so I'm not sure.

Arturs Kalnins August 16, 2022

thank you so much! this helped! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events