I want all the date fields to be displayed under the DATES section of the issue page. There seem to be all over the place at random places.
Any help please. Thank you
Hello,
Could you provide a screenshot? Usually all dates go into the dates web panel in the issue detail view.
@Alexey Matveev I can't screenshot due to security reasons :( I have a scripted field for displaying the Fix Version release Date. It shows up under the DATES section sometimes, and at the others places. Looks so random. Is there a way to group the fields on how they appear ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use tabs in the screens to grouping fields. You can find more info about tabs here:
https://confluence.atlassian.com/adminjiraserver/defining-a-screen-938847288.html
Go to the Configuring a screen's tabs and fields part.
But still dates must go to the dates part. Are you sure that you provided the correct template for your scripted 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.
It is a strange behaviour. As far as I understand this scripted field is from the ScriptRunner plugin. If so I would open a ticket in Adaptivist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev Hey, I had used a custom template for the scripted field, since I had to remove the time stamp from it. So, hence its showing up at random places. Is there a possibility to make the field show up under the DATES on the issue page, inspiote of using a custom template ? Your thoughts on this please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The template has to be the date/time one for Jira to recognise it as a date and move it to the date/time panel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- At the CUSTOM FIELD configuration page, the search template for the field is defined as DATE TIME RANGE PICKER.
Also, the field is a scripted field which is supposed to display the Release date associated with a Fix Version. Initially the script returned a DATE & TIME value which caused some issues due to time zone differences. Hence, I added the below custom template to the scripted field to remove the TIME STAMP,
$datePickerFormatter.withStyle($dateTimeStyle.DATE).format($value)
Now, the field is not showing up under the dates section. Any help on how to fix this, please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aisha M Hopefully someone from Adaptavist can answer your question. I do not have access to source code, that is why I am not sure how it works internally.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the template for the output also a date-time template? You can't use a string or number etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- I have included the script for your reference.
Custom Template -
$datePickerFormatter.withStyle($dateTimeStyle.DATE).format($value)
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)
The output returns only the DATE value without the time stamp.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to use the date/time template, not a custom one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- If I do that, I get the date and time as the output. I want only the date. Can that not be done ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira won't see it as a date/time unless you use the date output type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- Okay. So, is there any possibility of getting only a date value by using the date and time template ? Because, it is crucial to not have a time stamp in my case
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think it is. You need a template that announces the field as a date/time in order to get the field in the date/time panel, but they'll always have a time element, as the template is used for date and time.
You can remove it by using other templates, but then the field can't be grouped becuase it's not the right type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- There is another template available called "Absolute Date Picker". Can that be modified to return only the date value without the time ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not without hacking ScriptRunner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- hmm, I guess I ll have to either have my fields grouped together, or remove the time stamp. Anyway, thank you !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I couldn't really solve it, I think we're stuck with the templates only saying "hey, I'm a date" for full date/time sets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- Anyway, thank you so much Nic for keeping up with all my questions :) Really appreciate your inputs
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.