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

0.91 associated items #424

Merged
merged 6 commits into from
Feb 17, 2016
Merged

0.91 associated items #424

merged 6 commits into from
Feb 17, 2016

Conversation

korial29
Copy link

@korial29 korial29 commented Feb 2, 2016

I've added an Ajax mini-form to add/delete a list of items on ticket.
It's now possible to set multiple items with predefined values (ticket template)
It's also possible to set multiple items with the ticket rules
Migration added to convert templates with the new functionnality

@korial29 korial29 self-assigned this Feb 2, 2016
@korial29 korial29 added this to the 0.91 milestone Feb 2, 2016
@korial29 korial29 changed the title 0.91 associated items #327 0.91 associated items Feb 2, 2016
@korial29
Copy link
Author

korial29 commented Feb 3, 2016

fix #283

@orthagh
Copy link
Contributor

orthagh commented Feb 10, 2016

There is conflict (sorry for delay), could you fix them ?

Some comments incoming.

} else {
$rand = mt_rand();
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefers this notation :

$rand = mt_rand();
if (isset($_POST["rand"])) {
   $rand = $_POST["rand"];
}

korial29 added 2 commits February 15, 2016 14:14
Conflicts:
	inc/dropdown.class.php
	install/update_0901_091.php
@korial29
Copy link
Author

I fixed all conflicts

@orthagh
Copy link
Contributor

orthagh commented Feb 15, 2016

Some comments (maybe more incoming) :

  • I see some tab spaces in install/update_0901_091.php
  • on update process, this error triggers :
*** PHP Notice(8): Undefined index: use_rich_text
  Backtrace :
  inc/commonitilobject.class.php:2670                
  inc/ticket.class.php:2165                          CommonITILObject->getSearchOptionsMain()
  inc/search.class.php:5284                          Ticket->getSearchOptions()
  install/update_0901_091.php:357                    Search::getOptions()
  install/update.php:791                             update0901to091()
  install/update.php:943                             updateDbUpTo031()

@orthagh
Copy link
Contributor

orthagh commented Feb 15, 2016

The feature seems ok.
After clean of trailing spaces and fix update, we'll can merge

Fix install
@orthagh
Copy link
Contributor

orthagh commented Feb 16, 2016

One problem, if you create a ticket from an asset (from ticket tab of a computer for example), an error triggers :

2016-02-16 09:40:19 [27@adelaunay-ThinkPad-Edge-E320]
  *** PHP Warning(2): Invalid argument supplied for foreach()
  Backtrace :
  inc/item_ticket.class.php:276                      
  inc/ticket.class.php:4159                          Item_Ticket::itemAddForm()
  inc/commonglpi.class.php:464                       Ticket->showForm()
  ajax/common.tabs.php:94                            CommonGLPI::displayStandardTab()
2016-02-16 09:40:19 [27@adelaunay-ThinkPad-Edge-E320]
  *** PHP Warning(2): Invalid argument supplied for foreach()
  Backtrace :
  inc/item_ticket.class.php:285                      
  inc/ticket.class.php:4159                          Item_Ticket::itemAddForm()
  inc/commonglpi.class.php:464                       Ticket->showForm()
  ajax/common.tabs.php:94                            CommonGLPI::displayStandardTab()

@korial29
Copy link
Author

Ok i cleaned the remaining trailing spaces :)

@orthagh
Copy link
Contributor

orthagh commented Feb 16, 2016

in install/update_0901_091.php, you have always some trailing tabs l383-432

Clean trailing spaces
@korial29
Copy link
Author

I fixed the ticket add from assets, and cleaned trailing spaces

@orthagh orthagh merged commit 9a91eb2 into glpi-project:master Feb 17, 2016
@yllen yllen mentioned this pull request Feb 19, 2016
@yllen
Copy link
Collaborator

yllen commented Mar 11, 2016

Undefined index: id in /home/yllen/gitsvn/inc/item_ticket.class.php at line 238

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

Successfully merging this pull request may close these issues.

3 participants