Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Problem

I would like to know when our Projects have been created in order to keep a thorough track of my projects. Is that possible?

Solution

Yes, that is possible. 

The first thing to keep in mind is that Jira does not save the Project creation date, but Profields does. What is the problem then? That the Project creation date will only appear since you first installed Profields forward. 

Here you can find a script that will help you fetch the Project creation date:

import com.atlassian.jira.component.ComponentAccessor
import com.deiser.jira.profields.project.extra.ProjectExtraService
import java.text.SimpleDateFormat

def projectExtraService = ComponentAccessor.getOSGiComponentInstanceOfType(ProjectExtraService.class)
def simpleDateFormat = new SimpleDateFormat("YYYY")
def pattern = "%s-%s"
def projectExtra = projectExtraService.get(project)
def date = projectExtra.creationDate ? simpleDateFormat.format(projectExtra.creationDate) : "1900"

return String.format(pattern, date, projectExtra.projectId)





  • No labels