You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello, im trying to add link via behaviours of scriptrunner (first part of address) to my custom field after user adding value with ticket number (last part of address), but it works only "on load" when im creating ticket, it automatically adding first part of address to my custom field, any idea why it doesn't work "on change"?
@Ilia Mamontov hi and welcome to the community,
Where is this field located and first filled in? In the portal from the customer?
In addition you have placed a behavior on customfield_10038 and you try to change its behavior when you will change its value?
@Ilia Mamontov in addition, SR on cloud only work on create screen:
Please note that Behaviours inside of ScriptRunner for Jira Cloud use the UI Modifications API in order to modify Jira's issue create screen.
Using your script I confirm that everything works (almost) as expected during creation screen. And the script I used was:
const link = "https://google.com/"
const currentData = getFieldById("customfield_10042").getValue()
getFieldById("customfield_10042").setValue(link+currentData)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im trying to make this script for link creating for new and existing issues in my jira cloud, users will add only ticket number in this field, it should be automatically transformed into link with this number in the end, for example user adding ticket number 555, behaviour should convert it to the link: https://freshdesk.com/tickets/555
but now it works only for new tickets, and it creates only link without number, as i understand behaviour should work only after someone adding any value, not before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ilia Mamontov as I said on my previous comment: Behaviors cloud works only on create screen. So you shouldn't have any problem with your script during issue creation.
For existing issues, behaviors can't do much. I would assume that:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras _Relational_ oh, i miss this information about cloud behaviour works only on create screen, thanks, i will try another option!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Ilia Mamontov
Welcome to the community.
Could you please try with .setFormValue instead of setValue function.
Let me know how it went for you.
Cheers,
Karim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Karim ABO HASHISH setFormValue is only for SR server. On cloud you have only setValue:
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.