Skip to content

[Bug] TheHive 4.0.4 cannot show tasks created in previous versions #1763

Closed
@albertogordillo

Description

@albertogordillo

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) 10
TheHive version / git hash 4.0.4
Package Type DEB
Browser type & version Chrome

Problem Description

After upgrading from TheHive 4.0.2 to 4.0.4 all the case tasks created in previous versions are no longer showed in the web interface. It shows that there are tasks (e.g. "Tasks List (0 of 12)") but are not showed.

application.log shows an error related to "actionRequired"

[ERROR] from akka.actor.ActorSystemImpl in application-akka.actor.default-dispatcher-32 [|] Response stream for [POST /api/v1/query] failed with 'The provided traverser does not map to a value: v[2703540376]->[JanusGraphVertexStep(IN,[ShareTask],edge), TraversalFilterStep([EdgeVertexStep(OUT), JanusGraphVertexStep(IN,[OrganisationShare],vertex), NoOpBarrierStep(2500), HasStep([~id.eq(4152)])]), JanusGraphPropertiesStep([actionRequired],value)]'. Aborting connection.
java.lang.IllegalArgumentException: The provided traverser does not map to a value: v[2703540376]->[JanusGraphVertexStep(IN,[ShareTask],edge), TraversalFilterStep([EdgeVertexStep(OUT), JanusGraphVertexStep(IN,[OrganisationShare],vertex), NoOpBarrierStep(2500), HasStep([~id.eq(4152)])]), JanusGraphPropertiesStep([actionRequired],value)]
        at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalUtil.apply(TraversalUtil.java:46)

I have been able to get the tasks via API removing "actionRequired" from the query. Instead of:

curl -XPOST -H 'Authorization: Bearer xxxxxxxxx' -H 'Content-Type: application/json' http://127.0.0.1:9000/api/v1/query?name=case-tasks -d '{"query":[{"_name":"getCase","idOrName":"~2990170120"},{"_name":"tasks"},{"_name":"filter","_not":{"_field":"status","_value":"Cancel"}},{"_name":"sort","_fields":[{"flag":"desc"},{"order":"asc"},{"startDate":"asc"},{"title":"asc"}]},{"_name":"page","from":0,"to":15,"extraData":["shareCount","actionRequired"]}]}'

This query works

curl -XPOST -H 'Authorization: Bearer xxxxxxxxx' -H 'Content-Type: application/json' http://127.0.0.1:9000/api/v1/query?name=case-tasks -d '{"query":[{"_name":"getCase","idOrName":"~2990170120"},{"_name":"tasks"},{"_name":"filter","_not":{"_field":"status","_value":"Cancel"}},{"_name":"sort","_fields":[{"flag":"desc"},{"order":"asc"},{"startDate":"asc"},{"title":"asc"}]},{"_name":"page","from":0,"to":15,"extraData":["shareCount"]}]}'

It seems that tasks created in previous versions does not have the "actionRequired" field that is a feature of TheHive 4.0.4.

Steps to Reproduce

  1. Create some tasks in TheHive 4.0.2
  2. Upgrade to TheHive 4.0.4
  3. Try to view these tasks in the web interface

Possible Solutions

I guess that the solution is upgrade all the tasks to v4.0.4 (adding the field "actionRequired") or modify the task methods to support legacy tasks.

Metadata

Metadata

Assignees

Labels

TheHive4TheHive4 related issuesbug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions