Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Start/end attributes are always imported using DATETIME format #649

@panisson

Description

@panisson

To reproduce this issue, create a gexf file with a dynamic graph using the date timeformat and some nodes with start and end represented as datetime.
Example:

<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2">
  <graph timeformat="date" defaultedgestyle="directed" mode="dynamic">
    <attributes class="node" mode="static">
      <attribute type="string" id="0" title="desc"/>
    </attributes>
    <nodes>
      <node id="1" desc="a" start="2005-01-03 11:30:00" end="2005-01-03 11:35:00">
      </node>
      <node id="2" desc="b" start="2005-12-15 12:30:00" end="2005-12-15 12:35:00">
      </node>
    </nodes>
  </graph>
</gexf>

The dynamic node attributes will be imported using the datetime format, and not the date format.

It is nice to import it using the best precision as possible, however it has some side effects.
For example: enabling the timeline and trying to customize the bounds and interval, the default values do not pass the form validation, because the form fields are formatted using the original graph format.

This issue can be solved in three ways:

  1. update the graph fileformat to datetime if any of the imported attributes are represented as datetime;
  2. import dynamic attributes as date and truncate all datetime formatted attributes;
  3. change the forms that use date format and use datetime format.

I prefer the first option, issuing a warning in the import report informing the user about the update.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions