Hello,
We are using a customzied Version of AgentChangesInEventCalendarEvents.pm (https://github.com/reneeb/otrs-ChangesI ... rEvents.pm) and i'm unsure how i get the Change-State (text) in to a Variable,
our change states comes from ITSM::ChangeManagement::Change::State. I'd like to fil a Variable with "successful" or "aborted" etc.
Thanks for a Tip
Oliver
How to get the Change-State by Perl
Moderator: crythias
-
Rasputin80
- Znuny newbie
- Posts: 16
- Joined: 29 Feb 2016, 20:04
- Znuny Version: 4.0.18
- Real Name: Oliver
-
reneeb
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: How to get the Change-State by Perl
The ChangeGet method returns a hash with various information, there is a key 'ChangeState'... https://github.com/OTRS/ITSMChangeManag ... MChange.pm
And you can get all states with the GeneralCatalog-Object:
And you can get all states with the GeneralCatalog-Object:
Code: Select all
my $StateList = $Kernel::OM->Get('Kernel::System::GeneralCatalog')->ItemList(
Class => 'ITSM::ChangeManagement::Change::State',
);Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
Rasputin80
- Znuny newbie
- Posts: 16
- Joined: 29 Feb 2016, 20:04
- Znuny Version: 4.0.18
- Real Name: Oliver
Re: How to get the Change-State by Perl
So actually that should work?
Code: Select all
my $Change = $ITSMChangeObject->ChangeGet(
UserID => $Self->{UserID},
ChangeID => $WorkOrder->{ChangeID},
);
my $ChangeState = $Change->{ChangeState};-
reneeb
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: How to get the Change-State by Perl
yes
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de