You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...the cicero draft command incorrectly produces the following sample.md
Name of the person to greet: "Fred Blogs".
The date of this agreement is: 08/16/2021
Thank you!
...which is not as expected.
Cicero has incorrectly inserted the current date and time values in place of the undefined DateTime attribute.
Expected Example 2
What was expected was...
Name of the person to greet: "Fred Blogs".
The date of this agreement is: undefined
Thank you!
We'd expect the undefined optional DateTime variable to appear as undefined in the output MD files, in the same was as undefined String variables appear as undefined.
Why is this an issue
At the moment, we are unable to distinguish when an optional DateTime variable has been passed in via data.json and when an optional DateTime variable has legitimately been omitted.
function dateTimeDrafter(value,format) {
if(value){
const f = format ? format : 'MM/DD/YYYY';
return dayjs.utc(value).format(f);
}else{
return "undefined";
}
}
Bug Report 🐛
Details
Consider the following
asset
declaration.As the
DateTime date
variable is optional then a user may, or may not, pass a value in via thedata.json
payload.Example 1
Using the following
data.json
...the
cicero draft
command produces the followingsample.md
...which is as expected.
Example 2
Using the following
data.json
which is missing the optional DateTime attribute, as allowed...the
cicero draft
command incorrectly produces the followingsample.md
...which is not as expected.
Cicero has incorrectly inserted the current date and time values in place of the undefined DateTime attribute.
Expected Example 2
What was expected was...
We'd expect the undefined optional DateTime variable to appear as
undefined
in the output MD files, in the same was as undefined String variables appear asundefined
.Why is this an issue
At the moment, we are unable to distinguish when an optional DateTime variable has been passed in via
data.json
and when an optional DateTime variable has legitimately been omitted.Attached example HelloWorld CTA
helloworld.zip
The text was updated successfully, but these errors were encountered: