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

The fields "create_date" and "update_date" both hold the same "update_date" in the plugin meta #69

Closed
suricactus opened this issue Mar 12, 2020 · 3 comments · Fixed by #70
Assignees

Comments

@suricactus
Copy link

suricactus commented Mar 12, 2020

Literally the title. The problem is that the template model does not have access to the date of creation of the plugin, but only the date of creation of the version. Unfortunately, I'm not that familiar with Django to be able to solve it.

<create_date>{{ version.created_on.isoformat }}</create_date>
<update_date>{{ version.created_on.isoformat }}</update_date>

@suricactus
Copy link
Author

I am just looking at the diff, the create_date and modified_on are still related only to the plugin version, but not to the plugin itself. In theory they would rarely have different values. I see this is a very ancient Django and this project barely lives, so I am sorry for causing you headaches. If it is possible to add the XML fields plugin_create_date and plugin_update_date I would be happy. The field plugin_create_date is the one that I actually need to sort the plugins in the Plugin manager (qgis/QGIS#35008). The query should be something like this:

        SELECT DISTINCT ON (pv.plugin_id) pv.*,
        pv.created_by_id IN %(trusted_users_ids)s AS is_trusted,
		p.created_on AS plugin_created_on,
        p.modified_on AS plugin_modified_on
            FROM %(pv_table)s pv
            JOIN %{p_table}s p ON p.id = pv.plugin
            WHERE (
                pv.approved = True
                AND pv."max_qg_version" >= '%(qg_version)s'
                AND pv."min_qg_version" <= '%(qg_version)s'
                AND pv.experimental = %(experimental)s
            )
            ORDER BY pv.plugin_id, pv.version DESC

If it does not work, leave it, we can live without sorting the plugins by their initial release.

@elpaso
Copy link
Contributor

elpaso commented Mar 12, 2020

@suricactus I'm sorry, but my time is very limited (you know how active I am on QGIS core). I'm not actively maintaining this project anymore, it's one of the oldest pieces of code of mines that is already running, sometimes I'm surprised it has been in production for so long without major issues.

@suricactus
Copy link
Author

No problem, it is not that important. Better spend your time on the core :) .
Nevertheless, it's a pity it is in a such a sorry state. Are there any plans to replace/upgrade? I might have more free time after a month or two...

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

Successfully merging a pull request may close this issue.

2 participants