Menu

autoclose ticket extension cannot autoclose user request

windcar
2021-06-16
2021-12-23
  • windcar

    windcar - 2021-06-16

    Hi Guru,
    I have itop 2.7.4 and extension combodo-autoclose-ticket/1.0.1 (iTop Hub).

    The incident can be autoclosed, but user request cannot.

    The cron log only shows this repeatedly:
    Starting: 1623804602 (2021-06-16 08:50:02)
    Starting: 1623804602 (2021-06-16 08:50:02)
    Already running...
    Exiting: 1623804602 (2021-06-16 08:50:02)
    Already running...
    Exiting: 1623804602 (2021-06-16 08:50:02)
    Exiting: 1623804603 (2021-06-16 08:50:03)
    Starting: 1623804902 (2021-06-16 08:55:02)
    Starting: 1623804902 (2021-06-16 08:55:02)
    Already running...
    Exiting: 1623804902 (2021-06-16 08:55:02)
    Starting: 1623805201 (2021-06-16 09:00:01)
    Already running...
    Exiting: 1623805201 (2021-06-16 09:00:01)
    Starting: 1623805201 (2021-06-16 09:00:01)
    Already running...
    Exiting: 1623805201 (2021-06-16 09:00:01)

    The setting is like this:
    'combodo-autoclose-ticket' => array (
    'incident_autoclose_delay' => '7',
    'userrequest_autoclose_delay' => '7',

        What should I do to find the reason?
    
     
  • barakbar

    barakbar - 2021-06-16

    Hello,
    you can use verbose mode for more detailed logs or you can edit the extension to run faster so you can see the results faster and don't make you wait.

    class AutoCloseTicket implements iBackgroundProcess
    {
        public function GetPeriodicity()
        {   
            return 300; // you can change this number, because by default this number runs every 24 hours, you may be able to edit this to 60 seconds or even every 3 seconds or less
        }
    
        public function Process($iTimeLimit)
        {
    
                $aReport = array();
            if (MetaModel::IsValidClass('UserRequest'))
    
     
  • windcar

    windcar - 2021-06-16

    Hello,
    I used verbose mode and got something like this:
    Skipping asynchronous task: AutoCloseTicket until 2021-06-17 11:35:03

    I checked DB table priv_backgroundtask and AutoCloseTicket is Active.

    Then I realized this might be my fault. I thought the earliest resolution date should be over 7 days, but when I checked it, I was surprised that it is June 10th.

    I have to wait one or two days as I don't want to change the setting.

     
  • windcar

    windcar - 2021-06-21

    Hello,
    More updates here.
    I checked all user requests and there are Closed entries. (And the earliest resolution date is not June 10th). So this AutoCloseTicket extension works fine.

    The problem is, on my welcome page, the label "Closed" shows no quantity, as shown in the attached picture.

    It seems other status label can retrieve data from DB correct, but "Closed" does not.

    Any idea how to trouble shoot this?

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-06-25

    Hello,

    Thanks for your feedback, good to know the extension is working fine !

    About the dashlet, where is it located ? Is this a default dashboard or a customized one ?

     
  • windcar

    windcar - 2021-06-25

    Hello,
    It is dashlet on the welcome page. The default one has status "new, assigned,escalated TTO, escalated TTR, resolved". I edit the dashlet to show all status, then found the "Closed" status shows no quantity.

     
  • windcar

    windcar - 2021-06-25

    I post a pic.

     
  • Vincent @ Combodo

    Hello windcar,
    This made me lough. You've seen your SELECT, there is no way you will get 'closed' ticket in your dashlet.

     
    😄
    1
  • windcar

    windcar - 2021-06-28

    Hello Vincent,
    Thanks for your reply, but in my understanding, the query "SELECT UserRequest WHERE status !="closed" corresponds to the "All open requests" in the upper-left corner of the pic.
    My problem is that, the status "Closed", the third status in the pic, has no quantity, but actually I do have closed user requests.
    Meanwhile, in those status I red-circled, I don't find SELECT query for the status.
    Any advice?

     
  • Vincent @ Combodo

    A "closed" request is not part of "All open requests".
    replace "SELECT UserRequest WHERE status !="closed" by "SELECT UserRequest" and your dashlet will contain "closed" requests.

     
  • windcar

    windcar - 2021-06-29

    Hello Vincent,
    I tried your method and it works. Thanks a lot. Now I understand the status result is based on the query.
    It was the phrase "All open requests" that puzzled me.
    Could you do me one more favor? to change "All open requests" to something like "All requests", which would seem more reasonable.
    I tried to change subtitle from "Menu:UserRequest:OpenRequests" to "Menu:UserRequest:AllRequests" or "Menu:UserRequest:UserRequests" or "Menu:UserRequest:fAllUserRequests", but no luck.

     
  • Andrew Precht

    Andrew Precht - 2021-08-18

    Hi windcar,
    Try dropping the prefix Menu:
    In the subtitle field try just All requests
    When I remove the prefix Menu: iTop displays what ever text I put in.
    If this is wrong someone please let us know...

     
  • windcar

    windcar - 2021-08-20

    Hi Andrew,
    Your way works great. Thanks a lot.
    I also tried All incidents and All changes.

     
  • Andrew Precht

    Andrew Precht - 2021-08-20

    Hi windcar,

    Glad to help.
    If anyone can explain what the prefix Menu: is doing in the background that would be great.

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-12-23

    Hello,

    The Menu:UserRequest:OpenRequests string correspond to a dictionnary key (value defined in the itop-request-mgmt or itop-request-mgmt-itil dictionnaries).

    It is preferable to use a dictionnary string so that all user see a title in their language...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.