I am attempting to automatically get the Start Date from the description for new staff, this does successfully retrieve the date and works when I'm commenting the variable, however the variable doesn't work with the Start Date field.
I have attempted to paste the commented date into the Start Date field and that works fine.
Hi @[deleted] , can you share a example of description that you are using ?
Maybe the format the in the Jira are wrong or maybe the description have some wrong format to match.
You can see the description at the bottom-right of my screenshot, it is
"Start Date: 15/12/2022
TEST"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @[deleted]
I recorded a video/tutorial to help you to solve this.
I apologize for my bad english to speak
But if you don't want to see the video, you just need one action that is to convert your variable (text) to Date then set in the correctly desirable field
I hope I helped you.
If this post was helpful, mark it as "Accept Answer" , so you can help others who may have the same difficulties.
If your question has not been resolved, please post again with more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Carlos Faddul ,
That video was brilliant, thank you for your help, however it didn't fix the issue. I've pasted my audit log alongside my Automation configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted]
I run the automation like your automation and the automation runs without problems, follow the json file
{
"cloud": true,
"rules": [
{
"id": 9567540,
"clientKey": "1970ac34-1f27-35b3-b5e4-1b83c6409f94",
"name": "Community Date Convert",
"state": "ENABLED",
"description": "https://community.atlassian.com/t5/Jira-Software-questions/Unable-to-insert-date-variable-into-date-field/qaq-p/2216037?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_answer&utm_content=topic&lightbox-message-images-2216037=230357iFEF26DF132AA3000",
"authorAccountId": "5a871346cad06b3537342818",
"actor": {
"type": "ACCOUNT_ID",
"value": "557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"
},
"created": 1671065392688,
"updated": 1671114221023,
"trigger": {
"id": "195670657",
"component": "TRIGGER",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.jql.scheduled",
"value": {
"schedule": {
"cronExpression": "",
"method": "BASIC",
"rate": 0,
"rateInterval": 86400,
"rRule": "BEGIN:VEVENT\nDTSTART;TZID=America/Sao_Paulo:20221214T204553\nRRULE:FREQ=WEEKLY;BYHOUR=9;BYMINUTE=0;BYSECOND=0;BYDAY=WE;INTERVAL=1\nEND:VEVENT\n"
},
"jql": "key = EK-1129",
"executionMode": "jql",
"onlyUpdatedIssues": false
},
"children": [],
"conditions": [],
"connectionId": null
},
"components": [
{
"id": "195670658",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.create.variable",
"value": {
"id": "_customsmartvalue_id_1671064636412",
"name": {
"type": "FREE",
"value": "StartDate"
},
"type": "SMART",
"query": {
"type": "SMART",
"value": "{{issue.description.match(\"Start Date:\\s(.*)\")}}"
},
"lazy": false
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "195670659",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "codebarrel.action.log",
"value": "StartDate - {{StartDate}}",
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "195670660",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.create.variable",
"value": {
"id": "_customsmartvalue_id_1671065001299",
"name": {
"type": "FREE",
"value": "StartDateFormat"
},
"type": "SMART",
"query": {
"type": "SMART",
"value": "{{StartDate.toDate(\"dd/MM/yyyy\")}}"
},
"lazy": false
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "195670661",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 10,
"type": "jira.issue.edit",
"value": {
"operations": [
{
"field": {
"type": "ID",
"value": "duedate"
},
"fieldType": "duedate",
"type": "SET",
"value": "{{StartDateFormat}}"
}
],
"advancedFields": null,
"sendNotifications": true
},
"children": [],
"conditions": [],
"connectionId": null
},
{
"id": "195670662",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.issue.comment",
"value": {
"comment": "{{StartDateFormat}}",
"publicComment": false,
"commentVisibility": null,
"sendNotifications": true,
"addCommentOnce": false
},
"children": [],
"conditions": [],
"connectionId": null
}
],
"canOtherRuleTrigger": false,
"notifyOnError": "FIRSTERROR",
"projects": [
{
"projectId": "10029",
"projectTypeKey": "software"
}
],
"labels": [],
"tags": [
{
"id": 19798714,
"tagType": "IS_RULE_UPDATED",
"tagValue": "true"
}
],
"ruleScope": {
"resources": [
"ari:cloud:jira:a94c6a97-c44c-49bd-a6f6-d6dbab8ce06b:project/10029"
]
},
"writeAccessType": "UNRESTRICTED",
"collaborators": []
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] when you create the StartDateFormat variable you have a period between the words Start and Date, creating a null value rather than the value you expected...and...to then use a mask you must use the format() function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works, thank you both for helping me with this issue!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
Created variables are text type, and you can set them in a date or date/time field by converting with toDate, such as with this:
{{StartDate.toDate}}
Kind regards,
Bill
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.