You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I need to get the date of certain transitions in certain issues. We are currently manually going into each issue to get the dates.
Hey Robert
When you say certain issues I suppose issues that you can get from a JQL ?
Also you say the date of certain transitions does this means the first time that the issues got into that transition ?
Hi Thanos,
Yes we run some JQL to export our SLA data, but we manually add a column for transition dates and we get these by manually going into each call. This is basically so we know when the SLA starts.
Example...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Robert,
So what about using a scripted field that will show you the date of first transition, and then since you will have this value in a field you will be able to export it in the same way as any other field.
How does this sound ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where do i declare what issuetype we are reporting?
(eg. issuetype=BILL01 and status=Review)
Sorry about this but im a beginner to this. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which version of ScriptRunner you use ?
If you are in one of the latest versions there is already a canned scripted field Date of First Transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately we are only using version 4.3.19, but we are doing an upgrade next year. Finally!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Robert,
No worries. So you have to create the scripted field manually. It is easy. So go to the scripted fields section and add a new one.
The script for this should be
import com.atlassian.jira.component.ComponentAccessor
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def created = changeHistoryManager.getChangeItemsForField(issue, "status").find {
it.toString == "In Progress"
}?.getCreated()
def createdTime = created?.getTime()
createdTime ? new Date(createdTime) : null
And the configuration should be
Searcher: Date Time Range picker
Template: Date Time Picker
In the end your scripted field should look like
And then you can start using it as any other custom field.
Please let me know how this went.
Regards, Thanos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The field created with the correct data! Cheers Thanos!
Would i need to create a new one for every transition an SLA starts on? For example we have 3 SLAs on one workflows which all start on different statutes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Robert,
No it's all right, I just missed the reply. Can you please give me an example or use case for your second question ?
Regards, Thanos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The users are running a report about SLAs which captures the usual, but they want the start date of the SLA (hence creating the script field), but some issues have more than one SLA, so does this mean have a different script field for each status (start of SLA).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.