Goal: Have a CSS rule that can utilize a date field extrapolated from a Jira Issue field (Parent.fields.customfield_10102) to create a rule to color the field when the Jira issue date is greater than [today].
Current Attempt: Parent.fields.customfield_10102:>[today]
Explanation of Effort
I've tried several versions of the filter using different virtual functions such as timestamp, jiraDate, formatDate, convertDate none of which worked. Sure I'm missing something with handling the date field from the Jira issue, but can't figure out how to manipulate the value correctly. The same process is used in another place on the page with a filter of Target:>[today]and works perfectly. Here though the Target field is as standard Confiforms date field.
<ac:structured-macro ac:macro-id="db8e41cc-9495-416e-b435-1919fae27086" ac:name="confiform-card" ac:schema-version="1">
<ac:parameter ac:name="useCache">true</ac:parameter>
<ac:parameter ac:name="formName">ProjectInfo</ac:parameter>
<ac:parameter ac:name="enableGridEdit">true</ac:parameter>
<ac:parameter ac:name="showEmptyValues">true</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="10f66642-9cc0-42b4-a491-48651c70d551" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">Project Item</ac:parameter>
<ac:parameter ac:name="fieldName">Parent</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="f2c7a7d5-c35b-4dbd-be1a-827b9828a88d" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">Status</ac:parameter>
<ac:parameter ac:name="fieldName">Parent.fields.status.name</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="341f7feb-eb0b-439a-9ffd-6afe608df490" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">Target Due Date</ac:parameter>
<ac:parameter ac:name="fieldName">Parent.fields.customfield_10102</ac:parameter>
</ac:structured-macro> </p>
<p>
<ac:structured-macro ac:macro-id="718aa7d7-4c32-4b5c-852e-c02d3353799f" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">Project Manager</ac:parameter>
<ac:parameter ac:name="fieldName">Parent.fields.assignee.displayName</ac:parameter>
</ac:structured-macro>
</p>
<h1>
<ac:structured-macro ac:macro-id="5ab9539c-f5a6-426d-89d5-fd2d793a73e4" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">Last Updated</ac:parameter>
<ac:parameter ac:name="fieldName">Updated</ac:parameter>
</ac:structured-macro>
</h1>
<p>
<ac:structured-macro ac:macro-id="9b077991-4ceb-4a46-a863-7685974f970e" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">HideComplete</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="eabdf136-ca42-4802-ac15-44f6d5bfc364" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ActionUpdate</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="ad7840a1-a4b3-404d-83bb-b9c61a94495d" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">id.queryCount(ProjectActivities:@self;(Target:<[today] AND !JiraIssue.fields.status.statusCategory.name:done))</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<p>
<ac:structured-macro ac:macro-id="5cc8dd37-09f0-4654-a84d-df3f6c5e0d72" ac:name="confiform-field-css" ac:schema-version="1">
<ac:parameter ac:name="condition">Parent.fields.customfield_10102:>[today]</ac:parameter>
<ac:parameter ac:name="css">color:white;background-color:green</ac:parameter>
<ac:parameter ac:name="fieldName">Parent.fields.customfield_10102</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
Parent.fields.customfield_10102 is a Date field in Jira. This display the date value fine when used as the source for a field in Confiforms but doesn't seem to operate the same when used in a filter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is taken as a text value, consider using parseDate function to parse it as date and then you can compare it with other dates
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This makes sense. However, identifying the format of the field is proving tricky. When displayed using Parent.fields.customfield_10102 the value is displayed as 2025-09-23.
Trying the filter Parent.fields.customfield_10102.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSS'Z'):>[today] as referenced in the virutal functions documentation had no effect. Swiching the date format to yyy-MM-dd to match the displayed value also did not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it is a date field and uses the format yyyy-MM-dd then you need to use it as a date formatting pattern in the formatDate function
Parent.fields.customfield_10102.parseDate(yyyy-MM-dd):>[entry._now]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah ha! I did use the yyy-MM-dd format to no effect. However, the other piece I was missing you hit on. I was using [today] which works in other filters based on Confiform date fields. When using the Jira extrapolated field with virtual function it was required to switch to [entry._now].
This final change fixed it. Thanks you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The formatting patterns should also be
yyyy-MM-dd
not
yyy-MM-dd
(as in your comment... but maybe be it is just a typo)
Alex
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.