Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

How to calculate wo...
 
Notifications
Clear all

How to calculate workflow available status for SimpleTicket ?

5 Posts
2 Users
0 Reactions
3,462 Views
(@lfrugere)
Posts: 39
Active Member
Topic starter
 
[#1501]

Hi Babynus,

I'm looking for customize SimpleTicket class in order to make status field editable.

On $_fieldsAttributes, I change

"idStatus"=>"required,readonly"

to

"idStatus"=>"required"

and that's work.

But I've an error on status list.
Although SimpleTicket class extends Ticket, list of available status (calculated from workflow) are not correct (all status are displayed).

Questions : How to calculate correctly this list ? On whih class is calculated workflows ?

Thanks in advance,

Lionel.


 
Posted : 03 Dec 2013 8H45
babynus
(@babynus)
Posts: 14953
Main Contributor Admin
 

Hi,

It is very complicated as TicketSimple should be taken into account exactly like Ticket. :silly:

In /tool/html.php, add on line after line 93 to get things like this :

    } else if ($col=='idStatus') {
      if ($class=='TicketSimple') $class='Ticket';
      $idType='id' . $class . 'Type';
      $typeClass=$class . 'Type';

Very complicated indeed. 😛

Regards.
Babynus.


 
Posted : 03 Dec 2013 14H54
(@lfrugere)
Posts: 39
Active Member
Topic starter
 

Thanks Babynus for your answer and sorry for my late reply : that works perfectly.

A last question to solve complety my problem : how to set automaticaly the idle flag when status is "Finished" ?

I looked at updateSqlElement function on SqlElement.php but I didn't find how to fix it.

Can you help me ?

Lionel.


 
Posted : 05 Dec 2013 13H56
babynus
(@babynus)
Posts: 14953
Main Contributor Admin
 

You just have to set idle field as visible (for instance as readonly) in TicketSimple.php.

For information, in V4.1 it will be possible to preserve your curtom classes.
You'll just have to paste your custom classes in /model/custom folder.


 
Posted : 05 Dec 2013 15H25
(@lfrugere)
Posts: 39
Active Member
Topic starter
 

Chapeau bas !

Very simple indeed.

As attachment my TicketSimple class. It's my workaround for Ticket #1213.

Thank you again.

Lionel.


 
Posted : 05 Dec 2013 17H27
Share:

Scroll to Top