when a issue is created based on the created time the field "Timer for resolution" should be autopopulated only with hour of the day
say created time is 13.00.00
The field should populate with 13
consider using Automation smartvalue as below. You can use mediumtime possibly?
Takes a date and time that you provide, and returns it in a format of your choosing. This is useful for converting the default output for dates (jiraDateTime), to a format that is easier to read. You can add a dateformat to the end of any of the date smart values listed on this page.
The full list of formats are below:
Format |
Thursday, November 1, 1979 6:23:12 AM UTC |
---|---|
Default (none specified) |
1979-11-01T11:23:12.0+0000 |
jiraDate |
1979-11-01 |
jiraDateTime |
1979-11-01T06:23:12.0-0500 |
jqlDate |
1979-11-01 |
jqlDateTime |
1979-11-01 06:23 |
shortDate |
11/1/79 |
shortTime |
6:23 AM |
shortDateTime |
11/1/79 6:23 AM |
mediumDate |
Nov 1, 1979 |
mediumTime |
6:23:12 AM |
mediumDateTime |
Nov 1, 1979 6:23:12 AM |
longDate |
November 1, 1979 |
longTime |
6:23:12 AM EST |
longDateTime |
November 1, 1979 6:23:12 AM EST |
fullDate |
Thursday, November 1, 1979 |
fullTime |
6:23:12 AM EST |
fullDateTime |
Thursday, November 1, 1979 6:23:12 AM EST |
format("<pattern>") e.g. format("dd/MM/yyyy") Refer to the Java documentation for pattern syntax. |
01/11/1979 |
Hi @shankara vijayendran - My name is Habib maybe this might also help.
```
import java.time.LocalTime;def createdTime = issue.getCreated();
def hour = LocalTime.from(createdTime).getHour();
issue.setCustomFieldValue(customFieldManager.getCustomFieldObjectByName("Timer for resolution"), hour);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Habib
Greetings
The post function is not available for our version I guess
May be our plan too
Can you let me know Which plan your using
Thanks
Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your case you can inform de Field in Automation with this value:
{{issue.created.format("H")}}
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.
Hello Juan Carlos Vera,
I have attached the image of a ticket
It shows as 4 hours in Time hours
Can you let me know Y
Thanks
Have a nice day
Shankar
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.