Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advisory "revision"/"release" date #519

Closed
ctron opened this issue Sep 12, 2023 · 2 comments
Closed

Advisory "revision"/"release" date #519

ctron opened this issue Sep 12, 2023 · 2 comments
Assignees

Comments

@ctron
Copy link
Contributor

ctron commented Sep 12, 2023

We have a column "revision" in the advisory result table. We want to sort & filter by this. The idea is to give the user "a set of recently changed documents".

Revision is actually this:

Column::Revision => date(self.summary.date),

Which seems to come from this:

date: item.advisory_date,

Which seems to come from this:

let advisory_date = field2date(&doc, self.fields.advisory_current)?;

Which seems to be the "current release" date:

document.add_date(
self.fields.advisory_current,
DateTime::from_timestamp_millis(csaf.document.tracking.current_release_date.timestamp_millis()),
);

However, searching by "release" brings up weird results. I assume this is due to the fact that Release, does a bit more:

Vulnerabilities::Release(ordered) => {
let q1 = create_date_query(
self.fields.advisory_current,
self.schema.get_field_name(self.fields.advisory_current),
ordered,
);
let q2 = create_date_query(
self.fields.cve_release,
self.schema.get_field_name(self.fields.cve_release),
ordered,
);
Box::new(BooleanQuery::union(vec![q1, q2]))


Couldn't we have a single "release" date, which carries the "last modified" date? (defaulting to the initial date if that isn't present).

@lulf
Copy link
Contributor

lulf commented Sep 13, 2023

@ctron So what I get from this is that you want the search only to search by the advisory_current rather than both advisory_current and cve_release? Maybe we can split this into two separate qualifiers instead, advisory_current and cve_release? Rather than mixing them. Then if you really want to search both one can use an OR

@ctron
Copy link
Contributor Author

ctron commented Sep 13, 2023

Maybe we can split this into two separate qualifiers instead, advisory_current and cve_release? Rather than mixing them. Then if you really want to search both one can use an OR

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants