You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hey, guys!
What I want is to create custom button which is the same like Component/s button:
So I need to have the content of Component/s button and behaviour of Component/s button in custom button.
I've tried to create a custom button and put this code inside of "Description":
(function($){
new AJS.MultiSelect({
element: $("#customfield_10653"),
itemAttrDisplayed: "label",
errorMessage: AJS.params.multiselectComponentsError
});
})(AJS.$);
However, the above code is not working and I see just the above code.
Guys, how can it possible to create custom field like "Component/s" button?
I have an option to use ScriptRunner.
Please KB article on how to add new custom field Add custom field
What do you hope to achieve? component field is a system field by default.
Best
Thanks for your reply, Moses. I can add custom field, however I cannot create a custom field which is populated by components.
What I want is to create custom field "ComponentsLinked" which looks exactly the same like "Component/s" field and set Components value in that custom field.
How can I do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@zaharovvv_suek_ruYou don't need to create a new one, we have the component/s
field,
Why you want to complicate things ?
Best!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Moses Thomas yeah, I know, however I was asked by my chief to create the same custom field "ComponentsLinked" which looks exactly the same like "Component/s" field and set Components value in that custom field.
So I cannot protest to his requirements.
Is it possible to create such a field?
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.
Hello @zaharovvv_suek_ru
As I can remember, you are using scriptrunner
Component/s field it's just like labels field, so why not try to create labels field that will be populated from components via listener on Issue Update event?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Markov yeah, you are right!
Thanks for your reply.
It sounds really good. However, I am not really aware how it is possible to populate by components and what does "via listener on Issue Update" event. Could you be very kind to clarify that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira based on event architecture. When something happens(changes) in system, jira thtows an specific event(for example, when you made some changes to the field values, jira throws ISSUE_UPDATED event), that can be caught and processed by listeners. To make listener with Scriprunner go to add-ons -> Script listeners -> Add -> Custom script listener
Project key: What project lister will be affect
Event: On what event it will be triggered (in your case Issue Updated)
Inline/file script: And your script that will do all kind of magic you need.
Here is example of script that will catch changes of Component/s field:
def change = event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "Component"} if (change) { log.debug "Value changed from ${change.oldstring} to ${change.newstring}" // your actions if the field has changed }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ Huge thanks! You make it clearer! Now it is really clear about events.
However, is it possible:
1. To get components and populate custom field by this components? I mean like Components field.
2. To have behaviour like Components field - when I input letter in custom field, then autosuggestion of components will work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @zaharovvv_suek_ru ,
Did this work in your case , coz I am also having similar requirement, if not, then what was the thing that worked.
Thanks in Advance,
Nasreen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.