Comments (9)
@toshiro92
The dynamic fields are a property of the OTRS ticket. An OTRS article does not have dynamic fields.
from python-otrs.
Hum ok, so the way to extract information from Article is to do like I wrote:
for el in ticket.articles():
print(el.attrs['CustomerUserID'])
print(el.attrs['Subject'])
print(el.attrs['Body'])
Or is there a better way about ?
from python-otrs.
You could do it like you are doing. You can also access the attributes directly, like this:
for el in ticket.articles():
print(el.CustomerUserID)
print(el.Subject)
print(el.Body)
from python-otrs.
Ok great ! Thank you @ewsterrenburg
from python-otrs.
Articles can have dynamic fields as well. I do not use them myself but when creating dynamic fields there are options to create them for either tickets or articles
from python-otrs.
@mjducharme @toshiro92
I stand corrected here, never used them either and falsely assumed they were only available for tickets.
Guess it would be best if dynamic fields for both tickets, articles, faq's, ... are handled the same way the articles are treated for a ticket (i.e. give back a list of DynamicFields if any, an empty list otherwise).
Reopening this issue.
from python-otrs.
I use dynamicfields for tickets, but not for articles. When I coded the function, I tested it only with ticket dynamic fields, and I use it with that in production; I assumed it would work for article dynamicfields as well.
from python-otrs.
@mjducharme in your new code, this is handled fine
from python-otrs.
FYI: About the DynamicFields into an Article, on my side I can see that they are named as below into an Article:
attrs = {
'Title' : 'A title',
'DynamicField_Element1' : 'An element',
'DynamicField_Element2' : 'Another element'
[...]
}
from python-otrs.
Related Issues (20)
- Little Question HOT 9
- Not able to re-use stored session_id properly HOT 3
- TicketSearch with mutiples States HOT 2
- ticket PendingTime State HOT 2
- "out of memory" Exception while retrieving ticket with ~1G attachements HOT 3
- Search tickets between dates HOT 1
- Invalid Webservice Name but returning SessionID HOT 1
- TicketGet problem(delete, plz) HOT 1
- Ticket search with multiple StateIDs results in Traceback HOT 1
- Missing ticket.merge HOT 2
- Completion SessionGet operations question HOT 3
- Ticket Pending time HOT 1
- Error with ScriptAlias HOT 1
- TicketCreate() assumes falsely that a ticket number looks like a number (an int) HOT 3
- base64 encoding for attachments with Python 3 HOT 1
- In otrs/objects.py, assumptions made by "autocast" are error-prone (for values with a leading zero) HOT 1
- getchildren deprecation is resolved by PR HOT 1
- Rewrite tests to work with https://hub.docker.com/r/juanluisbaptiste/otrs
- Make Python 3 only.
- GenericInterfaceClient: timeout parameter seems not to work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-otrs.