Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I am looking for a SQL query in order to update the data from custom field to jira issue field

Hi,

I am looking for a SQL query in order to update the data from custom field to jira issue field.

I have a custom field call “Issue Description” and the Field Type = Free Text Field (unlimited text).

I wanted to update all the issue Description data to Description field for a particular project.

I am not sure, what are the tables I have to join in order to update field.

My question:

It might cause any issue in terms of data integrity stand point?

Database MS SQL 2008

JIRA version 4.4

GH 5.7

Thanks

Ganga S

1 answer

1 accepted

1 vote
Answer accepted

You'll need to copy data from customfieldvalue to jiraissue - you'll find customfieldvalue has several columns but you're interested only in issue (this is the column ID in Jiraissue), customfield (this is the id of the customfield, you can get that in several ways - hovering the cursor over the "edit" next to the custom field in the full list of fields for example) and textvalue. Iterate through the customfieldvalue table, and copy the textvalue to jiraissue.description

Bear in mind a flat copy will replace any existing Description on the issues.

For data integrity, you don't need to worry too much, as the structure is quite simple, but you absolutely must

  1. Have a proven backup
  2. Have Jira offline while you amend the database - it is not an option to do this while it is running
  3. Re-index when you have finished

@Nic Brough - just curious - why 2? I sometimes make changes in the database while JIRA's running so maybe I shouldn't be? Is this a problem for all tables or just for changes to the issue table?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you