I have the JIRA Utilities Suite installed and there are two options but neither offer Component as an update field:
1. Update Issue Custom Field:Updates an issue custom field to a given value.
2. Update Issue Field:Updates a simple issue field to a given value.
Is this a problem with my Component field type or is Component not able to be edited using Post Functions?
Specifically, I want all issues of a single type to be assigned into a specific Component.
Short answer would be no.
@All Thanks for all the suggestions. In the basic install of OnDemand with JIRA Utilities Suite, We are not able to update Component(s) field as a post function (which seems like a no brainer).
To update the Component(s) field as a transition Post Function, I have two options:
Again, thanks @All for the suggestions!
2 years later I encountered this problem and here is my solution / hack for whoever else finds this topic on Google:
It's dirty but it works
EDIT 4 years later: This workaround is still "helping" people. For the love of your sanity though, if you can, please use a more elegant solution that doesn't make you maintain a separate custom field for no apparent reason.
1. JMWE now supports updating the Component/s field on transition and is a great app overall, I definitely recommend it.
2. Create a custom Scriptrunner script to run on transition. Scriptrunner I see as absolutely vital for JIRA, so I assume everyone has it. Example code to set the component:
import com.atlassian.jira.component.ComponentAccessor
def projectComponentManager = ComponentAccessor.getProjectComponentManager()
projectComponentManager.findAllForProject(issue.projectObject.id)
def component = projectComponentManager.findByComponentName(issue.projectObject.id, "YOUR COMPONENT HERE")
issue.setComponent([component])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, this workaround does work. You have to be careful to use a select list not a regular text field because it wouldn't work that way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Not a 'clean' solution, you're right, but this worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sadek Joma'a As of today, the workaround using Single-line text field works as well, FYI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the best solution so far, you could also create an automation to update the issue - but it's also a massive overhead
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Conditioned Workflow Functions for JIRA has a post function for updating issues including components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the best way is write a postfunction using java syntax or using script runner plugin
https://jamieechlin.atlassian.net/wiki/display/GRV/Script+Runner
another way is by using javascript you can set default value for component!
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.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.