XML in otrs 6

Moderator: crythias

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

XML in otrs 6

Post by sahara »

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
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: XML in otrs 6

Post by root »

Hi,

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

-Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
sahara
Znuny newbie
Posts: 3
Joined: 25 Apr 2019, 13:32
Znuny Version: ITSM 6

Re: XML in otrs 6

Post by sahara »

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
Administrator
Posts: 3954
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: XML in otrs 6

Post by root »

Hi,

For sure this is wrong:

Code: Select all

-<
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
sahara
Znuny newbie
Posts: 3
Joined: 25 Apr 2019, 13:32
Znuny Version: ITSM 6

Re: XML in otrs 6

Post by sahara »

That is how explorer displays xml files, the xml itself does not have it.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: XML in otrs 6

Post by crythias »

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 6.0.x (private/testing/public) on Linux with MySQL database.
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