Hi All,
I want to add a dynamic URL : "https://<jira-instance>.com/secure/EditIssue!default.jspa?id={issue.id}" in a custom field.
When a user clicks on the Create button present on Create Issue screen after filling the necessary fields, the above Edit Issue link should automatically fetch the {issue.id} and the updated link should save in a custom field.
Then user should see that dynamic hyperlink in a custom field in HTML format like "To Edit Issue, Click here".
Please guide on how we can configure it using Automation/ Post Functions/ Behaviour using scriptrunner/ JMWE?
And please provide screenshots for reference, it will be a great help to fulfil this use-case.
Thank you
Hi @Digvijay Singh Gehlot After issue creation only you can get issue.key, on Create screen you can't get issue Id.
You need to apply Post function here or use project automation. In Automation use "Issue Created" trigger and Action >> Edt issue >> Select Field Enter string : https://<jira-instance>.com/secure/EditIssue!default.jspa?id={{issue.key}}
Thanks
It worked by using Automation: When: Issue created > Then: Edit issue fields > Selecting an URL custom field > And Set the dynamic url as https://<jira-instance>.com/secure/EditIssue!default.jspa?id={{issue.id}}.
Now, how can I use URL custom field in HTML format so that I can show this dynamic link as "Click here" in the custom field value?
Thank you for your assistance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In URL you can't add Wiki Markup.
You need to use Multi-line text field in which Wiki style rendering should be enabled, then you only it works like button.
[Wikipedia|https://www.wikipedia.org]
[link text|http://www.example.com]
Edit option available in Jira, why need to Custom field with Edit link?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried with Multi-line text field by enabling Wiki style rendering, but the dynamic url with {issue.id} is not displaying as "Click here" on Edit/ View Issue screen.
My use-case is,
1) I want that my Sales representatives directly see their Dashboard only when they login
2) Create issue by clicking on Create Issue Link (using direct HTML link i.e. /secure/CreateIssueDetails!init.jspa?pid=<projectid>&issuetype=<issueid>)
3) When they hit the Create button on that link, they are redirected to Dashboard again.
4) Once issue is created, they can see Edit Issue Link (dynamic url with {issue.id}) present on Dashboard, restricting them to access/ bypass the View Issue screen.
Please guide further how can I achieve this as per the given workflow or at least show them the Edit Issue (dynamic link) on the Dashboard.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Digvijay Singh Gehlot How is it showing on View screen ? Or field is not visible on View screen ? Is it simple text not showing as hyperlink ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We've done something similar as a Scriptrunner fragment. It's a button that, when selected, copies the Issue Key and summary as an HTML link that redirects back to the issue. Below is the code for the button. You'll need to modify it slightly, but this should probably get you what you're looking for.
The makeXMLFriendly function at the bottom is to replace restricted characters from the Summary with their HTML equivalent. If you're just looking for the link, you wouldn't need to worry about that, since you're not including the Summary as the name of your link.
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.