I am using a Script Runner custom 'Issue Picker' field to display the JQL results the 'Prior Release Names' field. This 'Prior Release Name' works fine and displays the prior values, e.g Release 1, Release 2, Release 3 etc.
However when I pick the value, e.g. Release 3, I need the display value 'Release 3", but this is a custom issue picker, this it returning issue ID e.g. TESTPROJ-15.
Is there a way that I can populate the release name value from TESTPROJ-xx using some advanced scripting for custom Issue Picker or any other custom scripted fields? I need the custom script dropdown field to be visible in the CREATE Screen.
Yes, you could write a scripted field for this - the pseudo-code for it would be broadly
You could easily do more than just a list of fixVersions on the issue-picked, but I think your question was about doing the basics.
Thank you very much for the reply.
Now, I am trying to use the Script Runner "Custom picker."
In my case the Release Name if not the inbuilt Release feature, My 'Release Name' is a custom field e.g. customfield_12345.
I need the code to perform the following JQL query
project=TESTPROJ123 AND issuetype ="Action Item"
this should return the value of customfield_12345 (which is my Release Name) in string format.
Please support.
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 delay.
I am afraid I am very confused by what you are trying to do now. You were talking about using the value of an issue picker to get the list of versions of the target issue, but now you've started talking about a query, which has nothing to do with that.
What, exactly, do you want your scripted field to show the users? Is it the value of customfield_12345 from the issue that you picked with the issue picker?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please refer to the screen shot. which displays the 'Prior Release Name', but when I choose a value from the drop down e.g. 'Test Release 1.0' it returns the Issue ID, e.g 'TESTPROJ-1452'.
Now I need the code which will update a new custom text field [customfield_12345] with 'Test Release 1.0'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, that's a start, but you are asking for a field to do something it is not built for.
To run over the setup:
>which displays the 'Prior Release Name',
Ok, that's fine, that's just the name you've picked for the field
>but when I choose a value from the drop down e.g. 'Test Release 1.0' it returns the Issue ID, e.g 'TESTPROJ-1452'.
Yes, this is all the field can do. It is an "issue picker", intended to let you choose an issue. It's not there to pick from other bits of data, it is an issue-picker,
Later, I see you've mentioned "release name" in fields to search, which isn't really about searching, it's actually about displaying fields from the issue you have picked.
>Now I need the code which will update a new custom text field [customfield_12345] with 'Test Release 1.0'.
Ok, so where are you wanting to extract this value from? I assume it is going to vary, but I'm not sure where you are trying to fetch it from. The issue-picker field will already pull it from the linked issue, as the "fields to search" setting, but I don't know if that's what you need to get.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response, the understanding is correct. My expectation is, since we have the Issue Key e.g. TESTPROJ-1452, can we extract the Release Name of TESTPROJ-1452 and populate it in customfield_12345. As you rightly mentioned, this issue picker is intended to return the only issue key, which it's doing correctly. May be I am taking a wrong approach.
What are the other alternatives to achieve this? All I need is a picker which returns the list of values from a JQL and when a value is chosen from the picker, the displayed value should be updated to a custom field [customfield_12345]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, so your issue-picker gives you an issue to work with when you ask it for a value.
You can read the value of "release" from that issue, and copy that into your current custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I need to code for copying the get release value of the dynamically selected issue, so that I can copy the value into the custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are loads of examples for reading custom fields if you visit https://library.adaptavist.com/search?term=custom%20field
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.