I am working on jira database and trying to change the dates for sprints and issues. I am trying to find a link table between jira issue and sprint so I can update the things accordingly.
I am working on jira database and trying to change the dates for sprints and issues. I am trying to find a link table between jira issue and sprint so I can update the things accordingly.
First find the customfield id of Sprint in your instance
mysql> select id from customfield where cfname='Sprint';
+-------+
| id |
+-------+
| 13792 |
+-------+
Then the values are in customfieldvalue where customfield=13792 The id of each sprint is stored in stringvalue. The issue field is the issue id (not issue key) which is the id of the issue in jiraissue
The id of each sprint is stored in stringvalue. The Sprint-Name is in table AO_60DB71_SPRINT. The following query lists issueID and sprint-Name:
SELECT sp.name, ji.ID AS issueID FROM customfield cf
INNER JOIN customfieldvalue cfv ON cf.ID = cfv.CUSTOMFIELD
INNER JOIN jiraissue ji ON ji.ID = cfv.ISSUE
INNER JOIN AO_60DB71_SPRINT sp ON cfv.stringvalue = sp.ID
WHERE cfname = 'Sprint'