Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.11: Custom Queues Conditions #4702

Open
jdelhome3578 opened this issue Feb 8, 2019 · 9 comments
Open

1.11: Custom Queues Conditions #4702

jdelhome3578 opened this issue Feb 8, 2019 · 9 comments

Comments

@jdelhome3578
Copy link
Contributor

Unable to set Create date in the last n days to 4 hours on a sub-queue. It is working on a top-level queue.
image

image

php 5.6.38
IIS

@JediKev
Copy link
Contributor

JediKev commented Feb 8, 2019

@jdelhome3578

I cannot replicate this locally using v1.11 from our site and PHP 5.6.

Custom SubQueue Conditions:
screen shot 2019-02-08 at 09 35 07

Custom SubQueue View:
screen shot 2019-02-08 at 09 34 50

Any errors via error logs? Any steps to replicate?

Cheers.

@jdelhome3578
Copy link
Contributor Author

jdelhome3578 commented Feb 8, 2019

@JediKev No Errors. I try to enter exactly as you did db saves: {"criteria":[["status__id","!includes",{"10":"Waiting for Response","12":"Waiting on Vendor"}],["status__state","includes",{"open":"Open"}],["created","set",null],["est_duedate","set",null],["cdata__priority","!includes",{"5":"Project"}]],"conditions":[{"crit":["created","ndaysago",{"until":"4","int":{"d":"days","h":"hours"}}],"prop":{"background-color":"#ff2020"}}]}

Post data from Chrome:

do: update
a: 
id: 20
queue-name: Workable
parent_id: 1
fields[]: status__id
fields[]: status__state
fields[]: created
fields[]: est_duedate
fields[]: cdata__priority
fd3ebc8360b3db: 
_field-checkboxes[]: 1073741823
4d917df66eccab[]: !includes
c520dab48151e0[]: 10
c520dab48151e0[]: 12
_field-checkboxes[]: 1073741823
63577c18bd9b06[]: includes
468c705defe139[]: open
_field-checkboxes[]: 1073741823
7b2359af69eb92[]: set
3f180918c3571c: 
7a7c2a4b8646bb: 
445a43268bb1c7: 
445a43268bb1c7:time: 10:45
da90054e423413: 
da90054e423413:time: 10:45
dc0e0412c47bbf: 
43d1eb2af0f252: 
f1d651fcc08cd3[]: 
6f6a6a9045fa84: 4
5acc0a50a37f9f[]: d
2c5468e4585bb7: 
ddccf76094cd93[]: d
6f43e373b327d6: 
57293b9f47b4ab[]: d
5126eef5c6a420: 
e5390b1aa33482[]: d
_field-checkboxes[]: 1073741823
e906485541f287[]: set
431d6fddc804d4: 
786a6fa730262b: 
d0428e34c44e3c: 
d0428e34c44e3c:time: 10:45
8b3c3e676e5d44: 
8b3c3e676e5d44:time: 10:45
f45c223df2e7b7: 
a758f7d83427b2: 
0a75b40aa0bc63[]: 
4bc30963206078: 
9ce07734660644[]: d
0574d76eed0877: 
1c77fa40cbe07f[]: d
4e86b471b06d38: 
8d3ab2dbdc1802[]: d
fca5cc67c619b4: 
b23c639ce39102[]: d
_field-checkboxes[]: 1073741823
9c20345cd1f301[]: !includes
00350d0a90f2a1[]: 5
new-field: 
filter: ::
sort_id: ::
inherit-columns: on
columns[1][column_id]: 1
columns[1][heading]: Ticket
columns[1][width]: 75
columns[1][sortable]: on
columns[10][column_id]: 10
columns[10][heading]: Last Updated
columns[10][width]: 140
columns[10][sortable]: on
columns[3][column_id]: 3
columns[3][heading]: Subject
columns[3][width]: 200
columns[3][sortable]: on
columns[4][column_id]: 4
columns[4][heading]: From
columns[4][width]: 120
columns[4][sortable]: on
columns[5][column_id]: 5
columns[5][heading]: Priority
columns[5][width]: 40
columns[5][sortable]: on
columns[6][column_id]: 6
columns[6][heading]: Status
columns[6][width]: 80
columns[6][sortable]: on
columns[8][column_id]: 8
columns[8][heading]: Assigned To
columns[8][width]: 80
columns[8][sortable]: on
inherit-exports: on
exports[number][name]: Ticket Number
exports[number][heading]: Ticket Number
exports[created][name]: Date Created
exports[created][heading]: Date Created
exports[cdata__subject][name]: Subject
exports[cdata__subject][heading]: Subject
exports[user__name][name]: From
exports[user__name][heading]: From
exports[user__emails__address][name]: From Email
exports[user__emails__address][heading]: From Email
exports[cdata__priority][name]: Priority
exports[cdata__priority][heading]: Priority
exports[dept_id][name]: Department
exports[dept_id][heading]: Department
exports[topic_id][name]: Help Topic
exports[topic_id][heading]: Help Topic
exports[source][name]: Source
exports[source][heading]: Source
exports[status__id][name]: Current Status
exports[status__id][heading]: Current Status
exports[lastupdate][name]: Last Updated
exports[lastupdate][heading]: Last Updated
exports[est_duedate][name]: SLA Due Date
exports[est_duedate][heading]: SLA Due Date
exports[duedate][name]: Due Date
exports[duedate][heading]: Due Date
exports[closed][name]: Closed Date
exports[closed][heading]: Closed Date
exports[isoverdue][name]: Overdue
exports[isoverdue][heading]: Overdue
exports[isanswered][name]: Answered
exports[isanswered][heading]: Answered
exports[staff_id][name]: Agent Assigned
exports[staff_id][heading]: Agent Assigned
exports[team_id][name]: Team Assigned
exports[team_id][heading]: Team Assigned
exports[thread_count][name]: Thread Count
exports[thread_count][heading]: Thread Count
exports[reopen_count][name]: Reopen Count
exports[reopen_count][heading]: Reopen Count
exports[attachment_count][name]: Attachment Count
exports[attachment_count][heading]: Attachment Count
new-field: 
inherit-sorting: on
sorts[]: 1
sorts[]: 2
sorts[]: 3
sorts[]: 4
sorts[]: 6
sorts[]: 7
conditions[]: 1
condition_column[]: 20
condition_field[]: created
0fdeb9427f693f[]: ndaysago
ab6f8f634c0f18: 
93ca9519264537: 
59e2e1961e7677: 
59e2e1961e7677:time: 10:45
a1ebfde67f14d2: 
a1ebfde67f14d2:time: 10:45
dc0e0412c47bbf: 
43d1eb2af0f252: 
ace3840455c077[]: 
6f6a6a9045fa84: 4
5acc0a50a37f9f[]: h
2c5468e4585bb7: 
ddccf76094cd93[]: d
6f43e373b327d6: 
57293b9f47b4ab[]: d
5126eef5c6a420: 
e5390b1aa33482[]: d
properties[]: 1
property_name[]: color
a36873be52050c: #008200
submit: Save Changes

@jdelhome3578
Copy link
Contributor Author

@JediKev It must have something to do with the setup of the queue {"criteria":[["status__id","!includes",{"10":"Waiting for Response","12":"Waiting on Vendor"}],["status__state","includes",{"open":"Open"}],["created","set",null],["est_duedate","set",null],["cdata__priority","!includes",{"5":"Project"}]],"conditions":[{"crit":["created","ndaysago",{"until":"4","int":{"d":"days","h":"hours"}}],"prop":{"background-color":"#ff2020"}}]}. I have tried on other subqueues with less and it is working fine. FYI I did not set: TicketStatus / State State includes Open; Create Date Create Date has a value; SLA Due Date SLA Due Date has a value it appeared after saving the criteria.

@JediKev
Copy link
Contributor

JediKev commented Feb 8, 2019

@jdelhome3578

I will try to add more to mine to see if that breaks it.

FYI I did not set: TicketStatus / State State includes Open; Create Date Create Date has a value; SLA Due Date SLA Due Date has a value it appeared after saving the criteria.

Most likely inherited criteria.

Cheers.

@jdelhome3578
Copy link
Contributor Author

image

@greezybacon
Copy link
Contributor

It seems that it works if you save it, but not in the preview tab?

@JediKev
Copy link
Contributor

JediKev commented Feb 14, 2019

@greezybacon

The preview tab doesn't work due to the update to the custom show event to trigger afterShow. The new show method never gets called therefore the afterShow is not triggered.
https://github.com/osTicket/osTicket/blob/1.11.x/scp/js/scp.js#L1304-L1325

I can console.log() before the re-define of the show method (ie. #L1306) but if I console.log() in the actual re-define of the show method (ie. #L1309) nothing happens.

I reverted this back to the old way (before you updated it), removed the if (!this.selector) if statement, and it was working fine again. Not sure why the updated code doesn't work yet, still looking into it.

Cheers.

@greezybacon
Copy link
Contributor

@JediKev that's not what I'm talking about. Even after fixing the preview tab showing nothing, it does not show the changes to the configuration of the "Conditions" tab for the queue. However, after saving the queue and then visiting the Preview, the it does show the changes.

And where's the if (!this.selector) code. I don't see it anywhere in the current source tree.

@JediKev
Copy link
Contributor

JediKev commented Feb 15, 2019

@greezybacon it’s in the old re-define of the show method. I had to revert back the old way and remove that if statement to get preview to work. You can disregard as you got it working (like you always do lol). 🙂

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants