Hi there!
JIRA have the wonderful custom fields and I plan on allowing tickets to be made which the option of allocating the documentation page of the project in Confluence. So basically I want a user to select a project in JIRA using a Project Picker (or something similar) and the project they picked will be sent to the second custom field.
This second custom field will grab the documentation page with the same project name (yes we make sure they are identical) as a URL Field which gives me an URL to said page.
So is this possible? One custom field giving a value to a second custom field who then shows an URL in the issue to the documentation in Confluence.
Thanks!
While my question was about grabbing one value from another, my main goal was to make a link for JIRA to use. A JIRA Project issue is where I wanted to go but a JIRA Project itself can hold a link to the Confluence Space in its sidebar.
For people who are trying to succeed in grabbing a value from one custom field and giving it to another, I suggest you look at the answer of Doug Swartz and Amar as Scriptrunner is pretty useful in that regard.
For people like myself who purely wanted a link, you can just click "Add link" in the sidebar from a JIRA Project and also under integrations under the cog in a Confluence Space you can add a link also.
Thank you for your answers!
If you're running in the cloud, as indicated by the tags on the question, I don't have an answer for you. If you're running on jira-data center, you can do this by making your second custom field a calculated field in the Script Runner plugin. You should also be able to do it with the Kepler Custom Field plugin, although I've not used the Kepler plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops! Jira-Cloud isn't the right tag. My mistake. I will try what you suggested! Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Script runner behavior plugin is the perfect solution for your problem
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
https://jamieechlin.atlassian.net/wiki/display/JBHV/JIRA+Behaviours+Plugin
This is the sample code available at script runner website hope it helps
import com.atlassian.jira.component.ComponentAccessor // set a select list value -- also same for radio buttons def faveFruitFld = getFieldByName("Favourite Fruit") def optionsManager = ComponentAccessor.getOptionsManager() def customFieldManager = ComponentAccessor.getCustomFieldManager() def customField = customFieldManager.getCustomFieldObject(faveFruitFld.getFieldId()) def config = customField.getRelevantConfig(getIssueContext()) def options = optionsManager.getOptions(config) def optionToSelect = options.find { it.value == "Oranges" } faveFruitFld.setFormValue(optionToSelect.optionId) // same example but setting a multiselect - also same for checkboxes fields def subComponentFld = getFieldByName("Subcomponent") customField = customFieldManager.getCustomFieldObject(subComponentFld.getFieldId()) config = customField.getRelevantConfig(getIssueContext()) options = optionsManager.getOptions(config) def optionsToSelect = options.findAll { it.value in ["Oranges", "Lemons"] } subComponentFld.setFormValue(optionsToSelect*.optionId)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, to be honest I really have no idea how this works. Do you perhaps have some sort of tutorial at hand? This is really quite new to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Jackson, M also new bee, tutorial is available at https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html#_description Lets learn together
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lol accidently used the account of a friend when asking you about this. Thanks for your link!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Something like a cascading select?
There is at least one add-on, but I haven't tried it.
https://marketplace.atlassian.com/plugins/com.sourcesense.jira.plugin.cascadingselect
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.