Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,394
Community Members
 
Community Events
168
Community Groups

Date as smartvalue of CustomFIeld Insight Objects in an issue

Hello together, 

we use JSM Cloud Premium.

We do have Insight objects with a custom date attribute. 

In JSM i created a Custom Issue field pointing to this objects.

Next i created a custom Automation Rule where i want to do some date calculation on the objects custom date attribute. just as described in Jira smart values - date and time | Cloud automation Cloud | Atlassian Support 

It seems that the date function only work with "native" issue field, but not with insight connected objects. 

I do only get a string in dd/MMM/yy format (eg. 16/Sep/2022)

My goal is to check if this date is within a defined date range ... but i do not have any chance to do that within automation rule.    

Can someone confirm this behavior or give me a tipp how to solve my Problem.

Thanks in advanced   

Regards 

Hannes 

4 answers

1 accepted

2 votes
Answer accepted

Hello, 

I opened a supportcase and Atlassian confirmed that this behaviour is a kind of bug.

JSDCLOUD-10177 

The workaround is to put the fieldvalue into an variable, convert it to a date and go on...

>>

Workaround

  1. Create a variable "datevar" to store the date value:
    issue.objectcustomfield.AnotherDate
  2. Then use the functions on the variable name:
    {{datevar.toDate.jqlDate}}
1 vote
Ana Viseu Atlassian Team Sep 20, 2022

Hi :) 
I'm assisting Hannes on this issue and wanted to share with anyone interested that this is a known bug which is already added to our long term backlog!
To those interested you can vote and add yourselves as watchers here so you can get all updates:
https://jira.atlassian.com/browse/JSDCLOUD-10177

We have added the workaround to this bug to the ticket above so that anyone facing this can continue to create their rules without issues.

Hi @Mark Segall
ok lets go into it.
this is an example of an object to process 

2022-09-19_08h13_49.png

the attribute is configured as date:

2022-09-19_08h16_47.png

 

lets go into the Automation Rule. 

I added a Log action with different outpute for the custom field which locks like this 

2022-09-19_08h30_13.png

## {{issue."Mobile Contract"."End of binding period"}}

## {{issue."Mobile Contract"."End of binding period".jiraDate}}

## {{issue."Mobile Contract"."End of binding period".format("dd.MM.yyyy")}}

##

when i trigger the rule to log output looks like this:

as you can see only the FIeld value itself is printet. also functions as described here are not processed or return nothing... 

2022-09-19_08h33_19.png

my current workaround is using a webhook to an azure logic app which parses the field data and returns something, but is think this is not the way is should.

 

I just tested it with the default create attribute of the object, this seems to work as described, but this attribute is an dateTIME attribute, not a date.

Can someone confirm that a date (only) attribute is not supportet by smart value date and time functions or  could shit be a bug.

Mark Segall Community Leader Sep 19, 2022

You're correct that there's something off with date only attributes.  I just played around with it in my sandbox with the same results.  The only thing I can think of is that Insight formats the date only attribute as dd/mmm/yy and smart values are designed to work with yyyy-mm-dd format, but I'm not 100% on that.  I'll need to defer to other community members on this one.

I will open a support case on that.
Thanks for you confirmation.

Like Mark Segall likes this
Mark Segall Community Leader Sep 19, 2022

Please share the results here!  You have me intrigued.

0 votes
Mark Segall Community Leader Sep 16, 2022

Hi @Hannes Vorholz - The date smart values should work with Insight as well.  Can you please share a screenshot of your automation rule so we can have a little more context to help you?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events