jmckay123 Absent Member.
Absent Member.
351 views

Creating a task with a start date in the past

I am creating a task, trying to specify a start date that is prior to the current date. Sample code shown below (run on 4/21/2019).
The API changes the start date to 4/21/2019 even though the dates that I specified (begins and startDate) are 4/20/2019. I noticed
that the GroupWise client also refuses to allow a start date in the past, so I assume I can do nothing about this? This is a migration
application, so to be accurate, there will be entries with a start date in the past.
---------------------------------------------
<m:createItemRequest>
<item type="Task">
<container>1A.Transend.PO.100.0.1.0.1@31</container>
<status>
<completed>1</completed>
</status>
<subject>Book flight to Paris</subject>
<options>
<priority>Low</priority>
</options>
<checklist>
<dueDate>2019-05-16T07:00:00T</dueDate>
<startDate>2019-04-20T07:00:00T</startDate>
<begins>2019-04-20T07:00:00T</begins>
<percentComplete>100</percentComplete>
</checklist>
<dueDate>2019-05-16</dueDate>
<startDate>2019-04-20</startDate>
<message>
<part contentType="text/plain" length="64">
SGVyZSBpcyBzb21lIHRleHQgdG8gZ28gYWxvbmcgd2l0aCB0aGUgdGFzay4NCg0K
</part>
</message>
</item>
</m:createItemRequest>
Labels (1)
0 Likes
3 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Creating a task with a start date in the past

Tasks have the concept of an <assignedDate>.
That is the date the task was originally assigned.
When the task becomes overdue, the <startDate> is
changed to today, so the tasks will show on today's date.

At midnight, the task's startDate is updated to today,
(I don't remember if the startDate rolls over at midnight
if it is not overdue yet.)
Try setting the <assignedDate> value.

Preston


>>>


> I am creating a task, trying to specify a start date that is prior to
> the current date. Sample code shown below (run on 4/21/2019).
> The API changes the start date to 4/21/2019 even though the dates that I
> specified (begins and startDate) are 4/20/2019. I noticed
> that the GroupWise client also refuses to allow a start date in the
> past, so I assume I can do nothing about this? This is a migration
> application, so to be accurate, there will be entries with a start date
> in the past.
>

‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑â
€‘‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑
> <m:createItemRequest>
> <item type="Task">
> <container>1A.Transend.PO.100.0.1.0.1@31</container>
> <status>
> <completed>1</completed>
> </status>
> <subject>Book flight to Paris</subject>
> <options>
> <priority>Low</priority>
> </options>
> <checklist>
> <dueDate>2019‑05‑16T07:00:00T</dueDate>
> <startDate>2019‑04‑20T07:00:00T</startDate>
> <begins>2019‑04‑20T07:00:00T</begins>
> <percentComplete>100</percentComplete>
> </checklist>
> <dueDate>2019‑05‑16</dueDate>
> <startDate>2019‑04‑20</startDate>
> <message>
> <part contentType="text/plain" length="64">
> SGVyZSBpcyBzb21lIHRleHQgdG8gZ28gYWxvbmcgd2l0aCB0aGUgdGFzay4NCg0K
> </part>
> </message>
> </item>
> </m:createItemRequest>


0 Likes
jmckay123 Absent Member.
Absent Member.

Re: Creating a task with a start date in the past

That didn't seem to work (see new code below). I suspect it will not be possible, given that the GW client will not allow a start date in the past.
It's not really that critical, but if you think of something else to try, let me know.
-------------------------------------------------------
<m:createItemRequest>
<item type="Task">
<container>1A.Transend.PO.100.0.1.0.1@31</container>
<subject>Book flight to Paris</subject>
<options>
<priority>Low</priority>
</options>
<checklist>
<dueDate>2019-05-16T07:00:00Z</dueDate>
<startDate>2019-04-20T07:00:00Z</startDate>
<assignedDate>2019-04-20T07:00:00Z</assignedDate>
<begins>2019-04-20T07:00:00Z</begins>
<percentComplete>100</percentComplete>
</checklist>
<dueDate>2019-05-16</dueDate>
<startDate>2019-04-20</startDate>
<assignedDate>2019-04-20</assignedDate>
<message>
<part contentType="text/plain" length="64">
SGVyZSBpcyBzb21lIHRleHQgdG8gZ28gYWxvbmcgd2l0aCB0aGUgdGFzay4NCg0K
</part>
</message>
</item>
</m:createItemRequest>
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Creating a task with a start date in the past

Sorry, I didn't look at yours to see if I could detect what is wrong.
Here is an example that I did:

<ns3:createItemRequest
xmlns="http://schemas.novell.com/2005/01/GroupWise/types"
xmlns:ns3="http://schemas.novell.com/2005/01/GroupWise/methods">
<ns3:item xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="Task">
<source>received</source>
<subject>task in the past</subject>
<distribution>
<from>
<displayName>John Smith</displayName>
</from>
<recipients>
<recipient>
<displayName>Preston Stephenson</displayName>
<email>preston.stephenson@prestons.provo.novell.com</email>
</recipient>
</recipients>
</distribution>
<message>
<part>b2xkIHRhc2sK</part>
</message>
<checklist>
<percentComplete>20</percentComplete>
</checklist>
<startDate>2019-04-22+02:00</startDate>
<dueDate>2019-04-17+02:00</dueDate>
<assignedDate>2019-04-17+02:00</assignedDate>
</ns3:item>
</ns3:createItemRequest>

<gwm:getItemsResponse>
<gwm:items>
<gwt:item xsi:type="gwt:Task">

<gwt:id>5CBF0370.domain.PO1.100.1776172.1.15AB6.1@3:7.domain.PO1.100.0.1.0.1
@16</gwt:id>
<gwt:sid>88758</gwt:sid>
<gwt:version>2</gwt:version>
<gwt:modified>2019-04-23T10:22:08Z</gwt:modified>
<gwt:container>7.domain.PO1.100.0.1.0.1@16</gwt:container>
<gwt:created>2019-04-23T10:22:08Z</gwt:created>
<gwt:msgId>5CBEE750.domain.PO1.200.20000C2.1.2196F.1</gwt:msgId>
<gwt:clientMessageId>5CBEE750.804 : 194 : 18298</gwt:clientMessageId>
<gwt:source>received</gwt:source>
<gwt:delivered>2019-04-23T12:00:00Z</gwt:delivered>
<gwt:security>Normal</gwt:security>
<gwt:subject>task in the past</gwt:subject>
<gwt:distribution>
<gwt:from>
<gwt:displayName>John Smith</gwt:displayName>
<gwt:email>pstephenson@prestons.provo.novell.com</gwt:email>
</gwt:from>
<gwt:to>pstephenson@prestons.provo.novell.com</gwt:to>
<gwt:sendoptions>
<gwt:statusTracking>All</gwt:statusTracking>
<gwt:statusTrackingFlags>
<gwt:full>1</gwt:full>
</gwt:statusTrackingFlags>
<gwt:notifyRecipients>1</gwt:notifyRecipients>
<gwt:internetStatusTracking>
<gwt:enableDeliveryConfirmaion>1</gwt:enableDeliveryConfirmaion>
</gwt:internetStatusTracking>
</gwt:sendoptions>
</gwt:distribution>
<gwt:options>
<gwt:priority>Standard</gwt:priority>
</gwt:options>
<gwt:size>661</gwt:size>
<gwt:checklist>
<gwt:sequence>1073740799</gwt:sequence>
<gwt:dueDate>2019-04-17T12:00:00Z</gwt:dueDate>
<gwt:percentComplete>20</gwt:percentComplete>
</gwt:checklist>
<gwt:retentionModified>2019-04-23T10:22:08Z</gwt:retentionModified>
<gwt:begins>2019-04-23T12:00:00Z</gwt:begins>

<gwt:iCalId>2019-04-23T10:22:08Z_477A00C2804@prestons.provo.novell.com</gwt:
iCalId>
<gwt:startDate>2019-04-23</gwt:startDate>
<gwt:dueDate>2019-04-17</gwt:dueDate>
<gwt:assignedDate>2019-04-17</gwt:assignedDate>
</gwt:item>
</gwm:items>
<gwm:status>
<gwt:code>0</gwt:code>
</gwm:status>
</gwm:getItemsResponse>

Let me know if you need more help.

Preston
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.