How to make the scripted field (release date for the fix versions) visible in the issue page ?

Aisha M February 27, 2018

I am fairly new to Scriptrunner and is someone who is not from a development background. Anyway, I had been looking for ways to make the release date visible along with the fix versions. So, created a scripted field (Date picker) and added the script for the same and it works fine. My question now is, what is the next step for making this field visible in the issue page along with the Fix version. How should we do that. Dos simply adding the field to the screens work ? I am actually clueless. Kindly help. Thanks

3 answers

2 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2018

Add it to the view screen, like any other custom field.  It will only appear in view. as a scripted field.

Aisha M February 27, 2018

Thank you for the quick help ! :):)

0 votes
Answer accepted
Ivan Tovbin
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.
February 27, 2018

Hi Aisha,

Now that you have created your field you have to add it at least to your issue 'Veiw' screen.

1) Go to your Project Settings -> Screens and check which screen is associated with the 'View' operation

2) Go to Administration -> Issues -> Custom Fields, find your field in the list of fields and click on the 'gear' icon to the right of it to open a context menu. Click on 'Screens' in that menu to bring up a list of screens to add this field to. Check the screens you need and click 'Update' at the bottom.

You can find more details about screens in this documentation.

Aisha M February 27, 2018

Thank you ! Will do the same :) Appreciate your help :)

0 votes
sandeepsai December 21, 2018

Hi Aisha,

Could you please share the script here ? 
i want to use Version Release date on issue.

Regards,

Sandeep

Aisha M December 27, 2018

Hi @sandeepsai

Template - Date Time picker

Inline script - 

import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.issue.IssueService
import java.lang.Exception
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.project.version.Version
import java.text.SimpleDateFormat
import java.sql.Timestamp
import java.text.DateFormat
import java.util.Date

Collection versions = issue.getFixVersions()

if (versions==null || versions.size()!=1)
return null
def version = versions.iterator().next()
new Date(version.releaseDate.time)
sandeepsai January 22, 2019

$dateFormatterWithoutTime.format($value) this is showing in result  no success

Like KPSA likes this
Kristofer Hansson Aspman _Riada_ November 13, 2019

Sandeep, check what Search Template you've used for the custom field. Should be Date Time Range Picker. Configuration is made from Jira Administration -> Issues -> Custom Fields -> search for your field -> Edit.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events