[Mayan EDMS: 2631] Re: Migration error using MySql db

2018-08-08 Thread Roberto Rosario
Which version or fork of Mayan are you using? This error is typical of 
MySQL when indexing text fields. Mayan doesn't index text fields. All 
indexed fields are of CHAR 255 type.

On Tuesday, July 17, 2018 at 8:40:05 AM UTC-4, vsolvs...@gmail.com wrote:
>
> I configured project using Django server. I had added the required 
> libraries based on requirement. when I tried to migrate Django using Mysql 
> server, I get error: 
>
> "django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'value' used in 
> key specification without a key length")"
>
> When I searched this error, I found  -->MySQL error: key specification 
> without a key length 
> .
>  but I occur error while migration. 
>
> mysql version - 5.7.20
>
> please help me to find the problem. thanks in advance
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2622] Re: Use document's metadata for filename (Quick Labels)

2018-08-08 Thread Roberto Rosario
We've been testing ideas for something like this. Unfortunately it would 
only work once the document is uploaded and available in the system. This 
is because during the upload wizard the document still doesn't exist and 
cannot be referenced by a template variable like {{ document...}}. 
Templated quick labels would only work after the document is uploaded by 
going to the document properties edit view. 

A related feature we are working on right now is allowing the renaming of a 
document via workflow actions. This way a document is uploaded and when the 
workflow triggers a state (initial or otherwise) the rename action is 
executed. In this format a templated label field would have access to all 
of the document's properties including metadata values. This is in the 
works right now and very possible to be included in the next release 
(version 3.1).


On Wednesday, August 8, 2018 at 8:59:57 AM UTC-4, Martin Kinitzki wrote:
>
> Hey guys,
>
> is there any way to use a document's metadata (I added a metadata field 
> for suppliers) for renaming documents via quick label? I tried it with {{ 
> document.metadata_value_of.supplier }} with supplier being my metadata 
> field. Unfortunately it takes {{ document.metadata_value_of.supplier }} as 
> a String. 
> The reason is that I would like to have the filenames in that way: 
> *-MM-DD 
> Invoice Supplier*
>
> Thanks in advance.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2624] Re: Filtering a document queryset on the ACL/role name

2018-08-08 Thread Roberto Rosario
Makes sense to filter documents. An ideal solution would be to correlation 
the OS username to a Mayan user to inherit the permission. Or in the mean 
time a filtering method via the mountindex command line to avoid needing to 
change the code. Your question brings an interesting proposition to the 
mountindex feature.

On Tuesday, July 31, 2018 at 8:52:01 AM UTC-4, LeVon Smoker wrote:
>
> I figured it out eventually. In the 
> mirroring/management/commands/mountindex.py, I added...
> acls = AccessControlList.objects.filter(role__label='My Role', 
> permissions__name='document_view')
> queryset = queryset.filter(acls__in=acls) 
>
>
>
> On Friday, July 27, 2018 at 10:12:21 AM UTC-4, LeVon Smoker wrote:
>>
>> How can I do this? I intend to make my own version of the mountindex 
>> command that would allow filtering documents based on a role. I assume it's 
>> like filtering on a Generic Relation, but I can't figure it out...
>>
>>
>> https://docs.djangoproject.com/en/1.11/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericRelation
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2630] Re: Migrate sqlite DB to postgres

2018-08-08 Thread Roberto Rosario
We are working on adding and official method to convert the database use 
from SQLite to another like Postgres. Some changes already made it to the 
next version branch and we've execute successful migrations with some large 
document databases.

We have included a "convertdb" command 
(https://gitlab.com/mayan-edms/mayan-edms/blob/versions/next/mayan/apps/common/management/commands/convertdb.py)
 
and will available in the next version.

On Tuesday, July 24, 2018 at 1:33:08 AM UTC-4, Nicholas Loscalzo wrote:
>
> Unfortunately running mayan-edms.py dumpdata from inside the docker 
> container gives me [CommandError: Unable to serialize database: unable to 
> open database file and I'm unsure what's going on.  Is it because Mayan 
> has a lock on the database file ?
>
> The warning messages against using SQLite got me a bit scared, so I'd like 
> to move over to Postgres from SQLite, but I already have a good number of 
> documents in Mayan.  In the worst case scenario, can the database be 
> re-built from scratch if I move the document cache folder into place ?  In 
> that scenario I'd understand if it lost the cabinets, etc
>
> Thanks !
> -Nick
>
> On Friday, July 6, 2018 at 4:43:11 PM UTC-4, Roberto Rosario wrote:
>>
>> The method that most approaches a migration solution is using dumpdata 
>> and loaddata (
>> https://docs.djangoproject.com/en/2.0/ref/django-admin/#dumpdata) (
>> https://docs.djangoproject.com/en/2.0/ref/django-admin/#django-admin-loaddata).
>>  
>> dumpdata create a platform independent JSON file of the data using 
>> serialization. This method requires that support for natural keys is added 
>> to all database models (
>> https://docs.djangoproject.com/en/2.0/topics/serialization/#topics-serialization-natural-keys).
>>  
>> This process was started but is not yet complete.
>>
>> If you tried to do a dumpdata/loaddata migration and it failed, reporting 
>> the apps that failed will help us complete support for this and provide an 
>> official migration process.
>>
>> On Friday, July 6, 2018 at 7:39:01 AM UTC-4, Jay 1972 wrote:
>>>
>>> Hi,
>>>
>>> I'm running in the same issue, that I'm using the SQLite3 DB and getting 
>>> this message on every site in the WebUI.
>>> I'm wondering if there is a standard routine to migrate the DB from 
>>> SQLite3 to PostgreSQL, mySQL or MariaDB?
>>> Maybe other users already done so and have a migration path or useful 
>>> hints, which migration works best?
>>>
>>> Kind regards,
>>> Michael
>>>
>>> Am Donnerstag, 5. Juli 2018 00:51:58 UTC+2 schrieb Roberto Rosario:

 Django itself doesn't provide a method for direct database migrations. 
 What you tried to do is the recommended procedure by the Django project. 
 However for it to work there are some stuff that need to be added to the 
 models so they use unique natural keys and not numeric primary keys which 
 can be repeated (which is the error you encountered). We started adding 
 natural keys a while back but that work is unfinished. What apps reported 
 repeated keys when you did the loaddata command? We can try to work on 
 those to see if the migration finishes without error.

 On Tuesday, July 3, 2018 at 5:19:57 PM UTC-4, hubertu...@5x2.de wrote:
>
> I have updated mayan to 3.0 via docker and I am getting the message, 
> that i should not use sqlite in production. But when I start the docker 
> image with postgresql, the database is empty. i assume, mayan will not 
> automatically convert any existing sqlite databases.
> I tried to export the sqlite data and import on the posgresql 
> installation with mayan-edms.py loaddata , but im getting errors 
> about duplicat keys, etc. (i did a mayan-edms.py flush   before.).
>
> How do I properly migrate my database from >3.0 mayan db.sqlite3 to 
> posgresql?
>
> --
> Hubi
>


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2623] Re: Customize the search form

2018-08-08 Thread Roberto Rosario
Autocomplete is possible but will require a new API to return the top 
result values so that a smart widget like Select2 could display them. 
Possible but requires code changes. 

What do you mean by "change the field labels"? Can you expand on this? This 
one might be simpler to implement.


On Tuesday, July 31, 2018 at 2:17:45 PM UTC-4, LeVon Smoker wrote:
>
> Is there a good way to do this to...
> - change the field labels
> - add a custom search widget (autocomplete)
>
> As always, I don't want to hack the original source code...
>
> Thanks.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2627] Re: Document preprocess on upload

2018-08-08 Thread Roberto Rosario
This is an interesting concept. Since Mayan was originally made to be used 
in government and legal setting, one of the philosophies was to keep the 
uploaded document intact. This is to preserve the chain of evidence. 

In this case the possible solution we've come up with is to add new 
workflow actions to create a new document (PDF) based on a previously 
uploaded document (LaTex one) and then delete the previous document. This 
way there is a log of how the PDF was created and the upload process 
doesn't need to be customized. For this three workflow actions need to be 
created: A document delete action, one to call an external binary and 
another to the upload a new file as a document.

More discussion is needed but just letting you know how far we are in the 
brainstorm.

On Thursday, July 26, 2018 at 6:14:41 AM UTC-4, Dexter wrote:
>
> Hi All,
>
> Is it possible to perform a preprocess on uploaded document ?
>
> The idea is that we would like the sources of the documents to be uploaded 
> ( for example LaTeX files and projects), and make Mayan run the compiler 
> and generate a PDF. This PDF will be what is shown in the preview.
>
> Without this we must upload the PDF version, and find another system to 
> store the sources. We don't like the idea of using two tools to store 
> documents
>
> Thanks
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2625] Re: Deploying mayan edms on ubuntu16.04

2018-08-08 Thread Roberto Rosario
Indeed. The documentation will be updated to specify Ubuntu 18.04. The 
previous 16,04 LTS version works but the old location of the GPG binary 
must be specified via SIGNATURES_GPG_PATH variable. 

On Thursday, July 26, 2018 at 9:34:27 AM UTC-4, Adam Kaney wrote:
>
> I tried doing this and ran into a pile of issues. I found it was easier to 
> install Ubuntu 18.04 and install on that. It was a very seamless install 
> after the upgrade

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2629] Re: New to Mayan, trying to change settings, getting manage.py error

2018-08-08 Thread Roberto Rosario
Try adding an empty __init__.py to mayan.media and to 
mayan.media.mayan_settings so that mysetting is importable
You can use the touch command:

touch /opt/mayan-edms/mayan/media/__init__.py
touch /opt/mayan-edms/mayan/media/mayan_settings/__init__.py

If you installed version 3.0, the initialsetup command should have created 
these for you.

On Wednesday, July 25, 2018 at 1:44:35 PM UTC-4, Adam Kaney wrote:
>
> I just recently installed Mayan doing the advanced install on Ubuntu 
> 18.04. 
>
> I'm trying to change the storage locations.
>
> I created a mysettings file per the instructions on the Mayan website:
>
> #!/opt/mayan-edms/bin/python
> from mayan.settings.production import *
>
> DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS='{location: 
> /media/145mayan/document_cache}'
>
> DOCUMENTS_STORAGE_BACKEND_ARGUMENTS='{location: 
> /media/145mayan/document_storage}'
>
> When I run python manage.py runserver 
> --settings=mayan.media.mayan_settings.mysettings
>
> I get the error: python: can't open file 'manage.py': [Errno 2] No such 
> file or directory
>
> I'm still new to this, so hopefully it is just something simple that I'm 
> missing
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2626] Re: Remove transformations from 1800 documents

2018-08-08 Thread Roberto Rosario
This was most likely caused by the automatic orientation detection. This 
feature now defaults to disable since PDF are not always compliant. In 3.0 
it is possible to select all the document in a page (40) and delete the 
transformations. A entry can be added to the "Tools" menu to clear all 
transformation in the system. In the meantime the only solution would be to 
launch a Python shell inside the Docker instance using:

docker exec -ti  /bin/bash

The launcher a Python shell connected to Mayan.

/usr/local/python shell

execute the following:

from documents.models import Document
from converter.models import Transformation

[Transformation.objects.get_for_model(document).delete() for document in 
Document.objects.all()]

I'll push the option of adding an entry to the tools menu to clear all 
transformation in the queue for next version.

On Thursday, July 26, 2018 at 11:10:23 AM UTC-4, RBS wrote:
>
> BTW, We are using version 2.7.3 running under docker
>
>
> On Thursday, July 26, 2018 at 10:03:17 AM UTC-5, RBS wrote:
>>
>> Just recently started using Mayan and we had a user upload around 1800 
>> documents.  Almost all of these documents had a transformation of 
>> {"degrees": 180} added and should not have.  How can I easily remove the 
>> transformations from all documents in the system?  Thanks!
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2628] Re: Send email on workflow transition

2018-08-08 Thread Roberto Rosario
The first one is already in the published pending work list. And should be 
straight forward. Might be able to push it up to add in the next release.

The second one is harder. Right now the worflow doesn't have support for 
user input during execution. This is something we want to add but requires 
significant refactor. We need to add support for workflow forms and for 
workflow contexts (a means to store values in a workflow). What I can do is 
push up one or two of this requirements so that they can be tested by the 
community in upcomming releases and pave the way for reviewer style feature 
you mention.

On Thursday, July 26, 2018 at 4:29:47 AM UTC-4, Dexter wrote:
>
> Hi All,
>
> Is it possible to setup actions on workflow transition, like send email to 
> author ?
> Is it also possible to setup actions when someone (reviewer) adds a 
> comment to the document ?
>
> Thanks
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2632] Re: Document preprocess on upload

2018-08-08 Thread Dexter
Thanks. Your idea seem to do the what is expected but has the following 
major drawbacks:
- Creating a new doc will destroy the link between the "source" and the 
created PDF
- By deleting the original document, we can no longer have access to the 
source. This is problematic for the review process: in order to change the 
document, we need to download the source, modify it and upload a new 
version in source form. As the link between source and PDF is lost, the 
newly created PDF from the modified source will not be a new PDF version 
but a new document

What I was thinking of is much simpler: You're generating pictures from 
uploaded documents for the preview. In fact, you upload a PDF and preview 
pictures of pages. This time you would upload a LaTeX and still preview 
pictures. You just need to recognize that this is a LaTeX document and run 
the generator locally. This will either be hardcoded in the source (like 
now for PDFs, OO documents, ...) or offer a mean of launching PDF 
generators for unknown types.

Thanks

On Thursday, July 26, 2018 at 12:14:41 PM UTC+2, Dexter wrote:
>
> Hi All,
>
> Is it possible to perform a preprocess on uploaded document ?
>
> The idea is that we would like the sources of the documents to be uploaded 
> ( for example LaTeX files and projects), and make Mayan run the compiler 
> and generate a PDF. This PDF will be what is shown in the preview.
>
> Without this we must upload the PDF version, and find another system to 
> store the sources. We don't like the idea of using two tools to store 
> documents
>
> Thanks
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2633] Re: Deploying mayan edms on ubuntu16.04

2018-08-08 Thread vsolvstab
I have configured mayanedms in ubuntu 16 successfully . But when i tried 
uploading document , document not saved in media folder. I have configured 
redis too .Can you help me solve this error


On Thursday, July 26, 2018 at 2:40:23 PM UTC+5:30, vsol...@gmail.com wrote:
>
> Hi,
>
> I am trying to deploy mayan-edms  a django  
> application on a ubuntu16.04 server in production mode with apache 
> webserver.
>
> please help me to understand and please discus about this topic. 
>
> thanks in advance.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Mayan EDMS: 2621] Use document's metadata for filename (Quick Labels)

2018-08-08 Thread Martin Kinitzki
Hey guys,

is there any way to use a document's metadata (I added a metadata field for 
suppliers) for renaming documents via quick label? I tried it with {{ 
document.metadata_value_of.supplier }} with supplier being my metadata 
field. Unfortunately it takes {{ document.metadata_value_of.supplier }} as 
a String. 
The reason is that I would like to have the filenames in that way: *-MM-DD 
Invoice Supplier*

Thanks in advance.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mayan-edms+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.