We have too many types of links in Jira and want to delete some of them.
I have tried them deleting them in jira, which has the options of fully deleting them or replacing them with other links. In both options the updated date of the tickets gets updated.
The thing is some of this links have been used a lot, I am talking about more than 1000 issues. If I delete this link, hundred of issues get their updated date modified, some of them really old.
Has anyone had a similar problem? Is there any way to replace the links without affecting the updated date?
Thanks
I just came across this as we also have quite a lot of duplicate content such as link types (and custom fields, priorities, statuses and other stuff) after moving multiple server instances to a single data centre instance.
I was also unable to stop the updated-date from changing, but having experienced this I can perhaps recommend one thing:
I have a script to reset the updated date to the last update not made by a particular user.
The use case for this was that we had changed updated-dates to change some custom field values and we needed to reset them to not mess up some teams filters. So for a JQL search, we reset the updated date to the last date that was not caused by the admin user (with which we replaced the custom field values).
Let me know if you want to see the code. The hardest part of this would be identifying the tickets for which you want to reverse/reset the dates.
Thanks Cornelius for the idea.
We have given up modifying the links as we thought it would be too much noise for the teams.
We are not doing this right now but I am curious about your script. Did you just update the last issue update or did you delete from the history the changed link ? Did that update the issue updated date?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lara,
it basically just updates the issue update date. Nothing gets deleted.
It requires Sriptrunner's HAPI.
Here's a redacted version of it:
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.changehistory.ChangeHistoryManager
import com.atlassian.jira.component.ComponentAccessor
ApplicationUser currentUser = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
ChangeHistoryManager changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
IssueManager issueManager = ComponentAccessor.getIssueManager()
Issues.search("project = JQL AND updated > -1d").each { issue ->
def changes = changeHistoryManager.getAllChangeItems(issue)
for (change in changes.reverse()) {
if (change.userKey != "JIRAUSER0815") {
MutableIssue thisIssue = Issues.getByKey(change.issueKey) as MutableIssue
log.debug(change.issueKey + ": " + change.created)
thisIssue.setUpdated(change.created.toTimestamp())
thisIssue.store()
break
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lara Lopez
I think It is not feasible. The actual updated field doesn't care how the update came to the issue but just reflects that there was an update.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Manoj,
But for example when you delete a resolution from the system neither the udpated date nor the resolution date get modified. Different behaviours for the same action.
The question is if someone has eve had this problem, if they found and alternative method (that does not involve touching the database).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe this is working as designed. I just tested it in my cloud test instance, and there the same behavior occurs.
Since you are in fact making a significant change to a ticket (linked issues are pretty important), I can imagine that it is intended to update the 'Last Updated' date accordingly.
Since you are in datacenter, maybe you could attempt something via the database, but I would stay away from that (and I don't know if this in fact would or would not trigger the 'Last Updated' date itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The database will not trigger the updated date, but I rather stay away from it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.