I want to copy custom field value of one issue type to all other issues of the project.
We have Issue type "Project info" and we created one issue of "Project info" type per project to maintain all project related information.
So anything changes in the project we update the respective field on of project info issuetype of that project.
Now I want to copy one of the custom field value of project info issue type to all other issue of that project.
Can anybody help me with this?
Hi,
You can do this with the Field Teller Plugin available on the marketplace. The plugin's capabilities are to display the field on an Issue on another specified Issue.
You can Download it here: https://marketplace.atlassian.com/apps/1224310/field-teller?hosting=server&tab=overview
Best Regards.
You need to write a custom listener, which will be triggered everytime there is a change in the custom field value of the project info type and then traverse over all the issues of the project and update them with the value coming from project info issueType.
An example here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The link which is shared with you is the example from script runner only.
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.
Sorry for the confusion..
Just wanted to know if this can be possible through scripted field.
Can I created a scripted text field for all other issues types and copy custom field value of "Project info " issue type to that scripted field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can do that, in the scripted field you can fetch the custom field value from the issue of type "project info" and then return that value as a string. You can fetch the value either by hard-coding the issue key or using an JQL in the scripted field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have multiple projects and I want it to be applicable on all the projects.
Can you help me with the sample code to fetch the value from one issue type and apply it to the same custom field of other issue type
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You just need to have a scripted custom field and in it's context, map it to all the projects and then add the field to the "view screen" of all the issuetypes in the project's screen configuration scheme. Thus, everytime the issue loads the script on the scripted field will be executed and in the script you will be fetching the custom field value from the project info issuetype.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have configured everything.. Only challenge I am facing here is to fetch the value from Project info issue type of each project.
See I have one "project info" issue per project and I am not able to fetch the value from "project info" issue type as I have to first fetch the project of current issue. 2) Then look for its project info issuetype and then fetch the value from it . 3) return its value.
If you can help me with some sample code to copy the value of custom field from one issue into another then I can extend it to work for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just perform a JQL search within the scripted field. You can easliy create the proper jql since you have the issue object. From issue object you can fetch the project key and thus create a JQL string like
def projectKey = issue.projectObject.key
String jql = <below value>
project = $projectKey and type = "project info"
And this will return only 1 issue as you have only 1 project info per project and that one search result will be what you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code sample (performing JQL in scripted field) -https://stackoverflow.com/questions/31978345/groovy-scripted-field-to-display-result-of-jira-jql
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.