How do i copy values of two system field into a custom field. Say for eg. text field type custom field "Final Status" needs to be updated like this: "<status value> - <resolution value>" for the value of system field Status and Resolution. I cannot do it manually since there are more than 1500 issues in my project, please suggest.
@Fidel Castro Armario
Thanks a lot FIdel for your pointer and it worked indeed !
Thanks Nic and Vasiliy for taking time to look after my query, unfortunately we don't have script runner plugin at the moment but certainly your response gives me workaround to use when i wouldn't have workflow toolbox Plugin.
Hi Pratiyush,
You can do it using "Copy a parsed text to a field" post-function (provided by JIRA Workflow Toolbox plugin) with the following configuration:
Captura de pantalla 2016-02-16 a las 10.38.30.png
Note that:
In order to execute the transition on your 1500 issues at once, I recommend you to do the following:
Your "Temporary Transition" should look like this:
Captura de pantalla 2016-02-16 a las 10.38.52.png
Another possible solution is to use "Write field on issues returned by JQL query" (provided by JIRA Workflow Toolbox plugin) with the following configuration:
Captura de pantalla 2016-02-16 a las 10.59.41.png
Regards,
Fidel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is code example to copy one custom filed value to another. You can modify it and run via Script console provided Script Runner Plugin.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.project.Project /** * Move date value from one custom field to another */ CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager(); CustomField dateFrom = customFieldManager.getCustomFieldObjectByName("Дата выдачи согласованного MD.050"); if(dateFrom == null) return "field for date from not found" CustomField dateTo = customFieldManager.getCustomFieldObjectByName("Дата окончания"); if(dateFrom == null) return "field for date from not found" //Loop issues and update IssueManager issueManager = ComponentAccessor.getIssueManager(); for(Project project: ComponentAccessor.getProjectManager().getProjectObjects()) for(MutableIssue issue: issueManager.getIssueObjects( issueManager.getIssueIdsForProject())){ issue.setCustomFieldValue(dateTo, issue.getCustomFieldValue(dateFrom)) issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getUser().getDirectoryUser(), issue, EventDispatchOption.ISSUE_UPDATED, false) }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll need a bit of code to do that. There are a load of add-ons that can do this in varying ways.
If it were up to me, I'd use the Script Runner to create a "scripted field" that concatenates those two together, but that's not quite the same as poking the calculated value into a custom field (with a bit more work, you can still do it with Script Runner)
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.