XML in otrs 6

Moderator: crythias

Post Reply
sahara
OTRS newbie
Posts: 3
Joined: 25 Apr 2019, 13:32
OTRS Version?: ITSM 6

XML in otrs 6

Post by sahara » 02 May 2019, 08:46

Hello,

I am very new to otrs so sorry if solution is obvious. I had a XML for otrs5, which I want to use in 6. I used the XML migration command but still, it does not appear in sysconfig.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

-<otrs_config init="Application" version="2.0">


-<Setting Name="Frontend::Module###OldOTRS" Required="0" Valid="1">

<Description Translatable="1">Old OTRS</Description>

<Group>Test</Group>

<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>


-<Setting>


-<FrontendModuleReg>

<Description Translatable="1">Old OTRS</Description>

<NavBarName>Ticket</NavBarName>

<Title Translatable="1">New phone ticket</Title>


-<NavBar>

<Description Translatable="1">Old OTRS</Description>

<Name Translatable="1">Old OTRS</Name>

<Type>Menu</Type>

<Block>ItemArea</Block>

<Link>Action=AgentTicketStatusView;Subaction=Report;URL=URL/otrs/index.pl</Link>

<LinkOption>Target="_Blank"</LinkOption>

<NavBar>Old OTRS</NavBar>

<AccessKey/>

<Prio>8545</Prio>

</NavBar>

</FrontendModuleReg>

</Setting>

</Setting>

</otrs_config>
I have the xml bothe under /Files and under Files/XML as I am not sure which one is correct right now. XML name is otrsold.xml
xml is to have a button in otrs 6 with the link to old otrs 3.1

Thank you!

root
Moderator
Posts: 1849
Joined: 18 Dec 2007, 12:23
OTRS Version?: 4/5/6
Real Name: Roy Kaldung
Company: Znuny Inc.
Contact:

Re: XML in otrs 6

Post by root » 02 May 2019, 19:52

Hi,

This doesn't look like valid XML to me. Maybe you can upload your file.

-Roy
OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

sahara
OTRS newbie
Posts: 3
Joined: 25 Apr 2019, 13:32
OTRS Version?: ITSM 6

Re: XML in otrs 6

Post by sahara » 03 May 2019, 08:15

Hi Roy,

this is the file I received which is working oín v5.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

-<otrs_config init="Application" version="1.0">


-<ConfigItem Valid="1" Required="0" Name="Frontend::Module###OldOTRS">

<Description Translatable="1">Old OTRS</Description>

<Group>Test</Group>

<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>


-<Setting>


-<FrontendModuleReg>

<Description Translatable="1">Old OTRS</Description>

<NavBarName>Ticket</NavBarName>

<Title Translatable="1">New phone ticket</Title>


-<NavBar>

<Description Translatable="1">Old OTRS</Description>

<Name Translatable="1">Old OTRS</Name>

<Type>Menu</Type>

<Block>ItemArea</Block>

<Link>Action=AgentTicketStatusView;Subaction=Report;URL=hostname/otrs/index.pl</Link>

<LinkOption>Target="_Blank"</LinkOption>

<NavBar>Old OTRS</NavBar>

<AccessKey/>

<Prio>8545</Prio>

</NavBar>

</FrontendModuleReg>

</Setting>

</ConfigItem>

</otrs_config>
Not sure if <Group>Test</Group> is OK, I also have <Group>FIGROUP</Group>


Thanks

root
Moderator
Posts: 1849
Joined: 18 Dec 2007, 12:23
OTRS Version?: 4/5/6
Real Name: Roy Kaldung
Company: Znuny Inc.
Contact:

Re: XML in otrs 6

Post by root » 03 May 2019, 12:46

Hi,

For sure this is wrong:

Code: Select all

-<
- Roy
OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

sahara
OTRS newbie
Posts: 3
Joined: 25 Apr 2019, 13:32
OTRS Version?: ITSM 6

Re: XML in otrs 6

Post by sahara » 04 May 2019, 15:58

That is how explorer displays xml files, the xml itself does not have it.

crythias
Moderator
Posts: 10108
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: XML in otrs 6

Post by crythias » 11 May 2019, 07:08

Based upon
https://github.com/OTRS/otrs/blob/59e79 ... .xml#L7506

the top part of your xml file might look like:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<otrs_config init="Application" version="2.0">
	<Setting Valid="1" Required="0" Name="Frontend::Module###OldOTRS">
		<Description Translatable="1">Old OTRS</Description>
		<Navigation>Frontend::Agent::ModuleRegistration</Navigation>
		<Group>Test</Group>
		<SubGroup>Frontend::Agent::ModuleRegistration</SubGroup>
		<Value>
			<Item ValueType="FrontendRegistration">
				<Hash>
					<Item Key="Group">
						<Array>
						</Array>
					</Item>
					<Item Key="GroupRo">
						<Array>
						</Array>
					</Item>
					<Item Key="Description" Translatable="1">Old OTRS</Item>
					<Item Key="NavBarName">Ticket</Item>
					<Item Key="Title" Translatable="1">New phone ticket	</Item>
				</Hash>
			</Item>
		</Value>
	</Setting>
There's more that should follow the same kind of pattern. The XML has changed so that the markup tag is more consistent with <Item> and set the Key to the old markup tag. The other flag(s), such as Translatable are exactly as is.

You may have to test a few things to make sure they fall into place, but look at the attached link for more information on the gist of how the new XML flows. Don't forget to close the tags appropriately.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

Post Reply