Bug 1295529 - REST Query API: startDate and endDate parameters do not work
Summary: REST Query API: startDate and endDate parameters do not work
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Shelly McGowan
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On: 1260881
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-04 18:44 UTC by Alessandro Lazarotti
Modified: 2020-03-27 19:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1260881
Environment:
Last Closed: 2020-03-27 19:41:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alessandro Lazarotti 2016-01-04 18:44:59 UTC
+++ This bug was initially created as a clone of Bug #1260881 +++

Description of problem:
When you use a process query containing either startDate or endDate as a single parameter, no process instances will be found.

Version-Release number of selected component (if applicable):
6.2.0 ER1

Steps to Reproduce:
1. Deploy and run a process.
2. Try http://localhost:8080/business-central/rest/query/runtime/process?startDate_min=*ENTER_TODAY_HERE*
3. See that there is a single result.
4. Try http://localhost:8080/business-central/rest/query/runtime/process?startDate=*ENTER_TODAY_HERE*

Actual results:
There is no result.

Expected results:
The process instance started in step 1 should be returned.

Additional info:
Note that all date range parameters (startDate_min, startDate_max, endDate_min, endDate_max) seem to be working as expected.

--- Additional comment from Marco Rietveld on 2015-12-14 15:36:56 EST ---

PR submitted: https://github.com/droolsjbpm/droolsjbpm-integration/pull/255

--- Additional comment from Marco Rietveld on 2015-12-18 13:49:42 EST ---

Fixed. Commits: 

master: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/3c098ab7

Comment 1 Marco Rietveld 2016-01-25 15:18:04 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1260881#c7

"For 6.3, which has not yet been released, I will try to change the behaviour to do hat Radovan suggests, which is a much more logical and user-friendly variant (submitting "yy-MM-DD" retrieves _all_ process instances retrieved that day, or in other words, is equivalent to startDate_min="yy-MM-DD"&&startDate_max="yy-MM-DD+1" )."

Comment 2 Radovan Synek 2016-01-25 15:32:56 UTC
Marco,

maybe what I am going to write is unnecessary, but just to make it clear - the idea was it should work on every component of the datetime expression, e.g.:
"yy-MM-DD" => "I don't care about hours, minutes nor seconds"
"yy-MM" => "I don't care even about days, get me processes of the given month"
The same goes for hours, minutes, seconds.

Thanks!

Comment 3 Marco Rietveld 2016-01-25 16:57:09 UTC
Radovan, 

Your specification is incomplete: could you specify the feature more? 

Should users be able to submit only one number and have the REST service know which part of the date this specifies? 

For example, if the user does "startDate=14", is that by default the year? 

If you're going to specify a feature, please specify *exactly* what you want! Otherwise, this will become rather frustrating for both of us...

Comment 4 Radovan Synek 2016-01-26 13:51:06 UTC
After a discussion on IRC we agreed on the following behaviour:
"yy-MM-DD_HH_mm_ss.SSS" => returns all processes started exactly that time, including milliseconds
"yy-MM-DD" => returns all processes (or other entities) started that day, regardless of hours,minutes,etc.
"yy-MM-DD_HH_mm_ss" => returns all processes started that time, regardless of milliseconds, i.e. all instances started between ss.000 and ss.999
"HH_mm_ss" => all processes started that time today.

Comment 5 Marco Rietveld 2016-02-08 14:11:12 UTC
Unfortunately, this feature will not be included in product 6.3.


Note You need to log in before you can comment on or make changes to this bug.