Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,348
Community Members
 
Community Events
184
Community Groups

JMWE - Set issue's field to parent's key (as a hyperlink)

Hi,

I'm trying to set the issue's field to its parent's url.

I can get the key of parent but I cant reach the parent's url.

Parent: TD-10

Sub-task: TD-11

I want "TD-10" in TD-11's screen as a hyperlink.

I tried below,

JMWE.jpg

Can anyone help?

 

Thanks

2 answers

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021

Hi @Aslıhan Paksoy and welcome to the community!

Which field are you trying to place, and where exactly? You want to place the parent's URL on the e.g. summary of the child issue? 

Hi @Alex Koxaras _Relational_ , I have a text field in the sub-task , I'm trying to place the parent's URL on this field.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021

I would use:

https://YOURINSTANCENAME.atlassian.net/browse/{{ issue.fields.parent.key }}

But, I would definitely try to find another way to get the base url from JMWE. Give me a couple of minutes.

And I would add a condition for that post function to run only if parent issue exists (unless you have this PF on a workflow used only by a subtask) 

Does the field have to be a text field or url field?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021

I would make it a URL field.

I wrote in JMWE


[{{parentIssue.fields.summary}}|https://myinstance/browse/{{parentIssue.key}}]

I'm trying to insert an hyperlink; summary of parent will be seen as link alias

:( url field gives an error:
customfield_10201: Specify a valid URL for the Custom Field

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021

Yes, because this is not a valid URL. You are trying to enter a URL as a [MYSUMMARY|https://myinstance/browse/YOURKEY]

The valid URL would be only the code I've given you (starting with https). If you want to include the summary and the wiki notation, then use a text field.

I have tried this,

jmweTest.jpg

But in the issue view, this is the result, summary and key is not shown
jresult.jpg

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021 • edited

Hi @Aslıhan Paksoy ,

the parentIssue variable is only available in post-functions that operate explicitly on the parent issue. Here, the post function operates on the current issue (the issue on which you're setting the field value). To access the current issue's parent, you need this:

[{{issue.fields.parent.fields.summary}}|URL/browse/{{issue.fields.parent.key}}]
Like # people like this
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021

Do what David told you :)

@David Fischer _Appfire_ hi, values are okay but now the link is not clickable :(

jwme.jpgjwmelink.jpg

Suprija Sirikonda _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 05, 2021

Hi Aslihan,

The field should've "Wiki Style Renderer" for the value to be displayed as expected.

However, in the new issue view, Short text only supports plain text, so the renderer settings don't apply. Use the Paragraph custom field for rich text like links to URLs.

Thanks,

Suprija

@Suprija Sirikonda _Appfire_ I have created another field like you said but it did not work,

rich.jpg

Suprija Sirikonda _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 05, 2021

Hi @Aslıhan Paksoy ,

Does the field have "Wiki Style Renderer"? 

What's the type of the field and on which view(new/old) you're seeing this?

Regards,

Suprija

Okay, I have changed my field's renderer. Unfortunately it was default text renderer. Sorry and thank you all for helping me :)

Suprija Sirikonda _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 05, 2021

Great to hear that!

Hi Aslihan,

To get the URL you will need to use the following URL:

{{null | serverInfo | field("baseUrl")}}

For more details please check our documentation linked below:

 So your template in Set issue field post function should be something like this:

{% if issue.fields.parent.key %} [{{issue.fields.parent.key}}|{{ null | serverInfo | field("baseUrl")}}/browse/{{ issue.fields.parent.key }}] {% endif %}

result.png

Hope it helps and let us know how it goes.

I cant find Groovy option in JMWE :(

Sayed Bares
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 05, 2021

Hi Aslihan, 

I just noticed you are using JMWE for Jira cloud, I have updated the above solution accordingly. Let us know if you were able to get the parent issue URL.

Thanks, David's way have worked , but I will try this to

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events