Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
We have 2 JIRA environments(test,production). We would like to automate the process of refreshing the test environment using different values for example(application links, general URL, delete mail server).
I came up with the following process...
1. Create a backup of JIRA prod database (Powershell with SQL Server Module)
2. Store backup file in shared location
3. Stop services for JIRA Training Environment
4. Restore database using (Powershell SQL Server Module)
5. Archive log files (Shared Location)
6. Perform specific training instance updates
6.a Delete the Mail Server (DELETE FROM dbo.mailserver where ID in (10010, 10031);)
6.b UPDATE dbo.propertystring SET propertyvalue='http://testenv.jira.mycompany.com' WHERE ID=10012;
6.c DELETE FROM dbo.notificationscheme where ID in(10000, 10021, 10032, 10040, 10171, 10270, 10370, 10371);
7. Update Application Link for Confluence Test Environment (PENDING)
8. Reindex (PENDING)
Question
----------
How do we reindex or update the application link if there is no API or Database Table that holds this data.
We have the same type of situation there, and we usually don't bother re-indexing.
I am not sure whether it's missing in your steps or if it's implied, but JIRA is using some file system storage as well (in the Applicaiotn Data\JIRA folder for us).
In those folders, you will have things such as :
So we are usually copying this folder (a zipped version) from production to test environment as well.
As well, in your point 6b, I believe you need to repoint the database in the dbconfig.xml file (part of that famous folder) rather than changing it in the database. It's kind of a chicken and egg problem, the configuration for the database accessed by JIRA cannot be in the database, because JIRA needs this information before accessing the database.
Copying the folder will take care of your indexing, as the indexes will be copied over from production, so we usually don't bother rebuilding them (since it's test, not too many people are using it and load is not an issue).
No advice for application links, as we are not using those.
I was trying to remove an application link using the selenium-webdriver ruby gem.
require "selenium-webdriver" driver = Selenium::WebDriver.for :chrome, :switches => %w[--ignore-certificate-errors --disable-popup-blocking --disable-translate --ash-immersive-fullscreen ] driver.navigate.to 'http://jira.mycompany.com/secure/Dashboard.jspa' driver.switch_to.frame "gadget-0" puts "Title: #{driver.title}" element = driver.find_element(:id, 'login-form-username') element.clear element.send_keys "myusername" element = driver.find_element(:id,'login-form-password') element.clear element.send_keys "mypassword" element = driver.find_element(:name,'login') element.click wait = Selenium::WebDriver::Wait.new(:timeout => 10) wait.until { driver.title.start_with? "CM/Quality" } puts "Title: #{driver.title}" element = driver.find_element(:link_text,'Administration') element.click wait = Selenium::WebDriver::Wait.new(:timeout => 10) wait.until { driver.title.start_with? "JIRA Administration" } element = driver.find_element(:link_text,'Application Links') element.click element = driver.find_element(:id,'login-form-authenticatePassword') element.clear element.send_keys "mypassword" element = driver.find_element(:name,'authenticate') element.click wait = Selenium::WebDriver::Wait.new(:timeout => 10) wait.until { driver.title.start_with? "Application Links" } #driver.click("css=a[class=app-delete-link]") #element = driver.find_element(:link_text,'Delete') #element.click driver.save_screenshot("jira.png") puts driver.inspect
Still need to figure out the Delete click and Add a new application link.
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.