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.
As the question...for a specific user using a Jython script
I have tried using the [UserHistoryManager Class|http://docs.atlassian.com/software/jira/docs/api/4.2/com/atlassian/jira/user/UserHistoryManager.html ], but have been unsucessful.
We are using Jira v4.4.5
This is something that is definitely not recommended. It may be possible to do this via the database access.
Definitely Backup your database first.
I believe the tables you'll want to take a look at are the:
Thanks for your response David. We have a custom field to gather information about about a tree of improvements under a given feature (done via Jython). It makes some time computations in the process via a virtual (not a person) user account. The problem is the flooding of information in the history due to this. Wonder if anyone knows a Jython or Java based solution for this problem, than at database level.
I have already found out the tables affected by the change, but thanks for re-assuring the list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I clean like this
def isPreview = true /* That script clean last view activity, just in case it was related to the performance degradation in Jira Service Desk and Jira Software for the 10k+ */ import com.atlassian.jira.user.ApplicationUser; import com.atlassian.jira.user.UserHistoryItem; import com.atlassian.jira.user.UserHistoryManager; import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.user.UserHistoryItem.*; import com.atlassian.jira.bc.user.search.UserSearchService import com.atlassian.jira.bc.user.search.UserSearchParams import com.atlassian.jira.user.ApplicationUser import org.apache.log4j.Logger import org.apache.log4j.Level def log = Logger.getLogger("com.gonchik.scripts.groovy.cleanupLastViewHistoryForInactiveUsers") log.setLevel(Level.DEBUG) boolean cleanForActiveUsers = false // This script shows how to clean up the history items from inactive users UserSearchService userSearchService = ComponentAccessor.getComponent(UserSearchService.class) UserSearchParams userSearchParams = (new UserSearchParams.Builder()).allowEmptyQuery(true).includeActive(cleanForActiveUsers).includeInactive(true).maxResults(100000).build() def userHistoryManager = ComponentAccessor.getComponent(UserHistoryManager.class) def sb = new StringBuilder() for (ApplicationUser appUser : userSearchService.findUsers("", userSearchParams)) { List<UserHistoryItem> recentUserHistory = userHistoryManager.getHistory(UserHistoryItem.ASSIGNEE, appUser); if (!isPreview){ userHistoryManager.removeHistoryForUser(appUser) } sb.append("${appUser.name}<br/>\n") } return sb.toString()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.