Good Morning,How can i determine the creation date of an user with Scriptrunner?The Last Login date can i determine with
import com.atlassian.jira.component.ComponentAccessorCrowdService crowdService = ComponentAccessor.crowdServiceUserWithAttributes user = crowdService.getUserWithAttributes(it.getName())String lastLoginMillis = user.getValue('login.lastLoginMillis')Is there also exists a function like login.lastLoginMillis with the cration Time? I Cant find it in the documentations but perhaps I'm to Stupid!Ps: it is not possible for me to use SQL on the user table
From the code, you can see that the "user" object is an instance of a class that implements this interface:
https://docs.atlassian.com/atlassian-crowd/3.2.0/com/atlassian/crowd/model/user/UserWithAttributes.html
And that interface extends this super interface:
https://docs.atlassian.com/atlassian-crowd/3.2.0/com/atlassian/crowd/embedded/api/User.html
Which is also extended by this sub interface:
https://docs.atlassian.com/atlassian-crowd/3.2.0/com/atlassian/crowd/model/user/TimestampedUser.html
Therefore, if you are lucky, then the creation date would be available via this expression:
def x = user.createdDate
Thank you very much
It looks like you're new here. Sign in or register to get started.