Using Jira server, I have created a custom field that requires a groovy script to calculate duration. Using that field I want to get a time in status for tickets in a jira project, let's say project X. There are several tickets, now in project X, that were in other projects before landing in project X; I only want to extract the time in a status for the time in project X only. Is there a way to do that?