As preparation of my migration from server to cloud, i want cleanup some issuetypes and some issue statusses.
Because i don't want to loose information about the issue's, i want to keep thisinformation in the issues by creating a custom fields for holding the status and name of my issueType.
So my plan is to create custom fields
- old_issue_type and populate it with the name of the issuetype.
- old_issue_status and populatie it with the status of the issuetype
After this operation, i will move the issue's of issueType A to a general issuetype, with a screen with all fields.
If i can arrange this, i can cleanup a lot of obsolete issueTypes and obsolete statusses.
Issuetype = A / Status = X
Custom field
- old_issue_type must be populated with value A.
- old_issue_status must be populated with value X
Question is how do i save the value of issueType name and status in the new created custom fields.
You will need to manually bulk edit each status/issue-type combination.
If it were me, I think I'd write a script to do it (obviously, you'll need a scripting app to do it, or writing something that can do it over REST)
We have a license of Adaptavist Scriptrunner, can you provide me a script for populating
- a custom field with the issue type
- a custom field with the status
This would help me a lot.
I'm not familiar with writing scripts in Scriptrunner, but perhaps you can help me with this.
Thanks in advance !
Erik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a snippet that tells you how to write to most custom field types - https://library.adaptavist.com/entity/update-the-value-of-custom-fields-through-the-script-console
This one runs a search (you'll probably want to run a search like "project = X" and iterate over the results to copy the data into the custom fields) https://library.adaptavist.com/entity/update-the-value-of-custom-fields-through-the-script-console
I'm not sure what you're aiming to store - status and issue type are objects, not simple strings, and I don't know if you're looking to store their immutable id, or the current name (the string the users see on screen), or something else.
But if it's the name, then you can fetch that with
def sname = issue.getStatus().getName()
def iname = issue.getIssueType().getName()
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.