You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I am facing issue with User Management Active Directory Sync.
Sync is failing and When I checked Log , noticed that there are many errors related to Script field failed on issue .
2022-08-19 11:30:27,790 https-jsse-nio-443-exec-27 ERROR sonali.chatte 690x171768x3 15lqchs 10.202.3.104 /secure/QuickCreateIssue.jspa [c.o.scriptrunner.customfield.GroovyCustomField] *************************************************************************************
2022-08-19 11:30:27,790 https-jsse-nio-443-exec-27 ERROR sonali.chatte 690x171768x3 15lqchs 10.202.3.104 /secure/QuickCreateIssue.jspa [c.o.scriptrunner.customfield.GroovyCustomField] Script field failed on issue: D2C-483, field: Deadline
Kindly assist to fix this issue. Not sure whether because of this Active Directory sync is failing.
Thanks
Baskar
Hi @Gnanabaskar
Can you share the field's code? To me, it's not clear from the logs as to why the field fails.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import java.text.SimpleDateFormat
import java.util.Date.*
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
CustomField IncidentReportedDate = customFieldManager.getCustomFieldObject("customfield_11200"); //start date
long IncidentReported = (issue.getCustomFieldValue(IncidentReportedDate) as Date).getTime(); //start date value
def today = (new Date() as Date).getTime()
return (today-IncidentReported )/(1000*60*60*24) as int
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unable to synchronise directory
java.lang.IllegalStateException: User 'scotty.carnell' has no unique key mapping.
at com.atlassian.jira.user.ApplicationUsers.from(ApplicationUsers.java:46)
at com.atlassian.jira.crowd.embedded.ofbiz.OfBizUserDao.allowDeleteUser(OfBizUserDao.java:741)
at com.atlassian.jira.crowd.embedded.ofbiz.OfBizUserDao.remove(OfBizUserDao.java:707)
at com.atlassian.jira.crowd.embedded.ofbiz.OfBizUserDao.removeAllUsers(OfBizUserDao.java:637)
at com.atlassian.jira.crowd.embedded.ofbiz.DelegatingUserDao.removeAllUsers(DelegatingUserDao.java:133)
at com.atlassian.jira.crowd.embedded.ofbiz.IndexedUserDao.removeAllUsers(IndexedUserDao.java:376)
at com.atlassian.jira.crowd.embedded.ofbiz.DelegatingUserDao.removeAllUsers(DelegatingUserDao.java:133)
at com.atlassian.jira.crowd.embedded.ofbiz.SwitchingUserDao.removeAllUsers(SwitchingUserDao.java:30)
at com.atlassian.crowd.directory.AbstractInternalDirectory.removeAllUsers(AbstractInternalDirectory.java:771)
at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.deleteCachedUsersByName(DbCachingRemoteChangeOperations.java:318)
at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.deleteCachedUsersNotIn(DbCachingRemoteChangeOperations.java:414)
at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.deleteCachedUsersNotIn(DirectoryCacheImplUsingChangeOperations.java:171)
at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAllUsers(UsnChangedCacheRefresher.java:189)
at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:56)
at com.atlassian.crowd.directory.ldap.cache.UsnChangedCacheRefresher.synchroniseAll(UsnChangedCacheRefresher.java:163)
at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1186)
at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:74)
at com.atlassian.jira.crowd.embedded.JiraDirectorySynchroniser.synchronizeDirectory(JiraDirectorySynchroniser.java:77)
at com.atlassian.jira.crowd.embedded.JiraDirectorySynchroniser.runJob(JiraDirectorySynchroniser.java:52)
at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153)
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118)
at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:438)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(CaesiumSchedulerService.java:462)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:390)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285)
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59)
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34)
at java.lang.Thread.run(Thread.java:745)
This is log details.
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.