The CreatorCon Call for Content is officially open! Get started here.

change the status from work in progress to pending

Aurelijus Raudo
Kilo Contributor

hi,

need help on building the condition on sc_request table.

when request state changed to Work in progress, after 10 days change status to Pending.

 

Thank's

Aurelijus

 

1 REPLY 1

Muhammad Hamza
Kilo Sage

Hey Aurelijus Raudo ,

  • We need time when the request state changed to Work In Progress. For this, you can create a read-only date field.
  • Then, create a Business rule so whenever the state is changed to Work in progress. Populate the date field with the current date.
  • Create a Scheduled job (daily), which queries the sc_request records which are in Work in progress state, and then for each record, get the value of the date field and compare it with the current date.
  • You can use gs.datediff() to get the duration between dates.
  • Then, if the duration is more than 10 days update the record.

If this answers your question, kindly mark this as a Solution.

 

Regards,

Muhammad Hamza