Hosting
Status | ||
---|---|---|
|
Problems and solutions
Here are some scripts that address common Projectrak Data Center (DC) problems. These scripts should be executed in the Projectrak console, which can be accessed from the Manage Apps section and is only accessible to Jira Administrator.
Click here to learn more about the Projectrak Script Console console.
Note |
---|
Most of the scripts make irreversible changes that can impact the proper functioning of the application. They should be used with caution. Please contact our support team before using them. |
Scripts for values
Values
: You need to delete values by their identifiers
Solution
: The introduced identifiers are being traversed, and if they exist, they are deleted from the database.
Expand | ||
---|---|---|
| ||
Code Block | ||
| ||
import com.atlassian.jira.component.ComponentAccessor
import com.deiser.jira.profields.ao.v2.projectvalue.ProjectValueMgr
def VALUES_IDS = [x,x]
def projectValueMgr = ComponentAccessor.getOSGiComponentInstanceOfType(ProjectValueMgr.class)
def value = null
def println = ""
VALUES_IDS.each {
println += "*** *** *** <br/>"
println += "Value ID: " + it + "<br/>"
value = projectValueMgr.get(it)
if(value != null){
projectValueMgr.delete(value)
println += "Deleted!! <br/>"
}
else{
println += "Can not found this Value <br/>"
}
println += "<br/><br/>"
}
return println |
Problem
: Delete all values from Projectrak within a set of projects.
Solution
: All the introduced project identifiers are being traversed, and for each of them, all their values are being iterated to subsequently delete them.
| ||
Code Block | ||
---|---|---|
| ||
import com.atlassian.jira.component.ComponentAccessor
import com.deiser.jira.profields.ao.v2.projectvalue.ProjectValueMgr
def PROJECTS_IDS = [x, x]
def projectValueMgr = ComponentAccessor.getOSGiComponentInstanceOfType(ProjectValueMgr.class)
def value = null
def println = ""
PROJECTS_IDS.each {
println += "*** *** *** <br/>"
println += "Project Value for Project: " + it + "<br/>"
value = projectValueMgr.getByProject((Long) it)
if(value != null){
projectValueMgr.delete(value)
println += "Deleted!! <br/>"
}
else{
println += "Can not found this Value <br/>"
}
println += "<br/><br/>"
}
return println |
Problem / Suggestion
The values in the columns where the value is stored in lowercase do not have the same equivalent value as those where the value is stored as raw data.
Solution
All existing values are verified. Each field type has a different validation check.
Expand | ||
---|---|---|
| ||
|
Problem / Suggestion
Information of values still exists in Projectrak for projects that no longer exist in Jira.
Solution
All value records are being traversed, and those where the project does not exist are being deleted.
Expand | ||
---|---|---|
| ||
|
Problem / Suggestion
There are projects with duplicate values for the same field.
Solution
Traverse all values and delete the duplicates, leaving the oldest value in the database.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Scripts for layouts
Layouts
Problem / Suggestion
We have found non-existent fields in the structure of a layout.
Solution
Traverse the structure of all layouts to check if their fields exist, and if not, we delete them.
Expand | ||
---|---|---|
| ||
|
Problem / Suggestion
Within a layout, there is duplicated information and orphaned structures.
Solution
Traverse all the layouts and verify their internal structure. If they have duplicated or orphaned structures, we delete them.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Problem / Suggestion
We have found duplicate associations between layouts and projects.
Solution
Traverse all existing associations and remove the duplicates.
Expand | ||
---|---|---|
| ||
|
Problem / Suggestion
We have found associations of layouts with non-existent projects.
Solution
Traverse all associations and delete those that are associated with non-existent projects.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Tip |
---|
Items of list fields |
Problem / Suggestion
We are experiencing issues with the items in the list fields, but we are uncertain about the root cause. We need to identify where the problem originates.
Solution
Display the information of the problematic items.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Problem / Suggestion
There are issues with the sequential order of items in list fields. They maintain their order, but it is not sequential.
Solution
Establish a new sequential order through the script.
Expand | |||||
---|---|---|---|---|---|
| |||||
| |||||
Tip |
Scripts for connections
Problem / Suggestion
Establishing a connection to a pre-existing database is required for certain fields of Projectrak's external list.
Solution
Through a set of IDs of external list fields, they are traversed to establish the selected connection using their respective ID.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Subscriptions
Problem / Suggestion
Know which subscriptions the instance has and who their owner is.
Solution
Retrieve all subscriptions stored in Projectrak along with their respective users.
Expand | |||||
---|---|---|---|---|---|
| |||||
| |||||
Tip |
Scripts for Mapping to Jira custom fields
Problem / Suggestion
We have encountered Jira custom fields that have lost their association with Projectrak fields.
Solution
All Jira custom fields that belong to Projectrak are traversed to verify if they are related to a Projectrak field. If not, the Jira custom field is deleted.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Problem / Suggestion
The Jira custom fields related to Projectrak cannot be edited or deleted as they are currently locked.
Solution
All Jira custom fields that belong to Projectrak are traversed to unlock.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Problem / Suggestion
We want to regenerate the mapping of all Projectrak fields with the Jira custom fields.
Solution
Traverse the Projectrak fields that have mapping enabled to remove the current Jira custom field and generate a new one.
Expand | ||
---|---|---|
| ||
| ||
Tip |
Scripts for gadgets
Problem / Suggestion
There are issues with data migrations related to the gadgets, and we want to identify the problematic gadget.
Solution
All users of the instance are being traversed to check the Projectrak gadgets. Both correct and erroneous gadgets are displayed on the screen.
Expand | ||
---|---|---|
| ||
| ||
Tip |
Script for Projectrak
Cachecache
Problem / Suggestion
Need to enable or disable the Projectrak cache for testing purposes.
Solution
Set the desired value in the Projectrak configuration related to the cache.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
| |||||
Tip |
Scripts for Projectrak database version
Problem / Suggestion
We want to know the latest Projectrak migration registered in Jira that has been performed. Please note that there may be other types of migrations that are not recorded in Jira.
Solution
Accessing the Jira tables where the migration code is stored.
Expand | |||||
---|---|---|---|---|---|
| |||||
| |||||
Tip |
Scripts for Oracle
databaseDatabase
Problem / Suggestion
When making a change in the database properties, we encountered Clob-type columns in the Projectrak tables, which is causing errors in certain functionalities.
Solution
Execute three scripts to modify the column type. This involves creating a new column for data dumping and subsequently deleting the erroneous column. No information is lost during the execution of the scripts.
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page Properties | ||
---|---|---|
| ||
|